Skip to content

Commit

Permalink
Use A1111's ToolButton impl (#2820)
Browse files Browse the repository at this point in the history
* Use A1111's ToolButton impl

* Use FormHTML
  • Loading branch information
huchenlei authored Apr 28, 2024
1 parent f596474 commit 960e930
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
5 changes: 2 additions & 3 deletions scripts/controlnet_ui/controlnet_ui_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
from scripts.logging import logger
from scripts.controlnet_ui.openpose_editor import OpenposeEditor
from scripts.controlnet_ui.preset import ControlNetPresetUI
from scripts.controlnet_ui.tool_button import ToolButton
from scripts.controlnet_ui.photopea import Photopea
from scripts.controlnet_ui.advanced_weight_control import AdvancedWeightControl
from scripts.enums import InputMode
from modules import shared
from modules.ui_components import FormRow
from modules.ui_components import FormRow, FormHTML, ToolButton


@dataclass
Expand Down Expand Up @@ -430,7 +429,7 @@ def render(self, tabname: str, elem_id_tabname: str) -> None:
)

with gr.Row(elem_classes="controlnet_image_controls"):
gr.HTML(
FormHTML(
value="<p>Set the preprocessor to [invert] If your image has white background and black lines.</p>",
elem_classes="controlnet_invert_warning",
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/controlnet_ui/preset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from typing import Dict, List

from modules import scripts
from modules.ui_components import ToolButton
from scripts.infotext import parse_unit, serialize_unit
from scripts.controlnet_ui.tool_button import ToolButton
from scripts.logging import logger
from scripts import external_code
from scripts.supported_preprocessor import Preprocessor
Expand Down
12 changes: 0 additions & 12 deletions scripts/controlnet_ui/tool_button.py

This file was deleted.

0 comments on commit 960e930

Please sign in to comment.