mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-05-01 11:41:23 +00:00
@@ -315,6 +315,8 @@ class ControlNetUiGroup(object):
|
||||
|
||||
with gr.Group(visible=not self.is_img2img) as self.image_upload_panel:
|
||||
self.save_detected_map = gr.Checkbox(value=True, visible=False)
|
||||
with gr.Tabs():
|
||||
with gr.Tab(label="Single Image") as self.upload_tab:
|
||||
with gr.Row(elem_classes=["cnet-image-row"], equal_height=True):
|
||||
with gr.Group(elem_classes=["cnet-input-image-group"]):
|
||||
self.image = gr.Image(
|
||||
@@ -373,11 +375,6 @@ class ControlNetUiGroup(object):
|
||||
interactive=True,
|
||||
)
|
||||
|
||||
with gr.Row(visible=False):
|
||||
with gr.Tabs():
|
||||
with gr.Tab(label="Single Image") as self.upload_tab:
|
||||
pass
|
||||
|
||||
with gr.Tab(label="Batch") as self.batch_tab:
|
||||
self.batch_image_dir = gr.Textbox(
|
||||
label="Input Directory",
|
||||
|
||||
@@ -88,11 +88,20 @@ class ControlNetForForgeOfficial(scripts.Script):
|
||||
with gr.Group(elem_id=elem_id_tabname):
|
||||
with gr.Accordion(f"ControlNet Integrated", open=False, elem_id="controlnet"):
|
||||
photopea = Photopea() if not shared.opts.data.get("controlnet_disable_photopea_edit", False) else None
|
||||
if max_models > 1:
|
||||
with gr.Tabs(elem_id=f"{elem_id_tabname}_tabs"):
|
||||
for i in range(max_models):
|
||||
with gr.Accordion(f"ControlNet Unit {i}", elem_classes=['cnet-unit-tab'], open=i == 0):
|
||||
with gr.Tab(f"ControlNet Unit {i}",
|
||||
elem_classes=['cnet-unit-tab']):
|
||||
group, state = self.uigroup(f"ControlNet-{i}", is_img2img, elem_id_tabname, photopea)
|
||||
ui_groups.append(group)
|
||||
controls.append(state)
|
||||
else:
|
||||
with gr.Column():
|
||||
group, state = self.uigroup(f"ControlNet", is_img2img, elem_id_tabname, photopea)
|
||||
ui_groups.append(group)
|
||||
controls.append(state)
|
||||
|
||||
for i, ui_group in enumerate(ui_groups):
|
||||
infotext.register_unit(i, ui_group)
|
||||
if shared.opts.data.get("control_net_sync_field_args", True):
|
||||
|
||||
Reference in New Issue
Block a user