mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-04-30 03:01:18 +00:00
feat(scripts): enable each tap
This commit is contained in:
20
aaaaaa/ui.py
20
aaaaaa/ui.py
@@ -162,7 +162,7 @@ def adui(
|
||||
states.append(state)
|
||||
infotext_fields.extend(infofields)
|
||||
|
||||
# components: [bool, dict, dict, ...]
|
||||
# components: [bool, bool, dict, dict, ...]
|
||||
components = [ad_enable, ad_skip_img2img, *states]
|
||||
return components, infotext_fields
|
||||
|
||||
@@ -171,14 +171,22 @@ def one_ui_group(n: int, is_img2img: bool, webui_info: WebuiInfo):
|
||||
w = Widgets()
|
||||
eid = partial(elem_id, n=n, is_img2img=is_img2img)
|
||||
|
||||
model_choices = (
|
||||
[*webui_info.ad_model_list, "None"]
|
||||
if n == 0
|
||||
else ["None", *webui_info.ad_model_list]
|
||||
)
|
||||
|
||||
with gr.Group():
|
||||
with gr.Row():
|
||||
model_choices = (
|
||||
[*webui_info.ad_model_list, "None"]
|
||||
if n == 0
|
||||
else ["None", *webui_info.ad_model_list]
|
||||
with gr.Row(variant="compact"):
|
||||
w.ad_tap_enable = gr.Checkbox(
|
||||
label=f"Enable this tap ({ordinal(n + 1)})",
|
||||
value=True,
|
||||
visible=True,
|
||||
elem_id=eid("ad_tap_enable"),
|
||||
)
|
||||
|
||||
with gr.Row():
|
||||
w.ad_model = gr.Dropdown(
|
||||
label="ADetailer detector" + suffix(n),
|
||||
choices=model_choices,
|
||||
|
||||
Reference in New Issue
Block a user