refactor: use central flag for ControlNet image count
This commit is contained in:
parent
c3ab9f1f30
commit
20e53028a4
|
|
@ -147,7 +147,7 @@ def worker():
|
|||
metadata_scheme = MetadataScheme(args.pop()) if not args_manager.args.disable_metadata else MetadataScheme.FOOOCUS
|
||||
|
||||
cn_tasks = {x: [] for x in flags.ip_list}
|
||||
for _ in range(4):
|
||||
for _ in range(flags.controlnet_image_count):
|
||||
cn_img = args.pop()
|
||||
cn_stop = args.pop()
|
||||
cn_weight = args.pop()
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ metadata_scheme = [
|
|||
lora_count = 5
|
||||
lora_count_with_lcm = lora_count + 1
|
||||
|
||||
controlnet_image_count = 4
|
||||
|
||||
class Steps(Enum):
|
||||
QUALITY = 60
|
||||
SPEED = 30
|
||||
|
|
|
|||
2
webui.py
2
webui.py
|
|
@ -152,7 +152,7 @@ with shared.gradio_root:
|
|||
ip_weights = []
|
||||
ip_ctrls = []
|
||||
ip_ad_cols = []
|
||||
for _ in range(4):
|
||||
for _ in range(flags.controlnet_image_count):
|
||||
with gr.Column():
|
||||
ip_image = grh.Image(label='Image', source='upload', type='numpy', show_label=False, height=300)
|
||||
ip_images.append(ip_image)
|
||||
|
|
|
|||
Loading…
Reference in New Issue