feat: add Qwen-Image-2.1 ControlNet support, consolidate unified pipeline, and significantly reduce frontend components
Browse files- README.md +3 -0
- chain_injectors/anima_controlnet_lllite_injector.py +0 -53
- chain_injectors/controlnet_injector.py +278 -60
- chain_injectors/diffsynth_controlnet_injector.py +0 -75
- chain_injectors/krea2_controlnet_injector.py +0 -78
- comfy_integration/setup.py +7 -0
- core/pipelines/pipeline_input_processor.py +0 -52
- core/pipelines/sd_image_pipeline.py +1 -7
- core/pipelines/workflow_recipes/_partials/conditioning/anima-3.8b-v1.1.yaml +3 -2
- core/pipelines/workflow_recipes/_partials/conditioning/anima-3.8b.yaml +3 -2
- core/pipelines/workflow_recipes/_partials/conditioning/anima.yaml +3 -2
- core/pipelines/workflow_recipes/_partials/conditioning/krea-2.yaml +3 -2
- core/pipelines/workflow_recipes/_partials/conditioning/qwen-image-2.1.yaml +1 -1
- core/pipelines/workflow_recipes/_partials/conditioning/sd15.yaml +1 -0
- core/pipelines/workflow_recipes/_partials/conditioning/z-image.yaml +2 -2
- mcp_tools/common.py +8 -74
- mcp_tools/get_feature_list.py +6 -11
- ui/events/__init__.py +0 -6
- ui/events/chain_handlers.py +0 -299
- ui/events/change_handlers.py +2 -85
- ui/events/config_loaders.py +0 -111
- ui/events/main.py +4 -58
- ui/events/run_handlers.py +1 -7
- ui/imagegen_ui.py +1 -4
- ui/shared/ui_components.py +0 -132
- yaml/anima_controlnet_lllite_models.yaml +0 -16
- yaml/chain_features.yaml +0 -93
- yaml/controlnet_models.yaml +34 -0
- yaml/diffsynth_controlnet_models.yaml +0 -8
- yaml/file_list.yaml +5 -0
- yaml/krea2_controlnet_models.yaml +0 -7
- yaml/model_architecture_features.yaml +6 -5
- yaml/model_architectures.yaml +1 -1
- yaml/task_features.yaml +0 -15
README.md
CHANGED
|
@@ -15,6 +15,7 @@ models:
|
|
| 15 |
# Directly Run Models
|
| 16 |
- abenzerps/Qwen-Image-2.1-Uncensored-GGUF
|
| 17 |
- AiAF/Illustrious-XL-v0.1.safetensors
|
|
|
|
| 18 |
- alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union-2.1
|
| 19 |
- black-forest-labs/FLUX.1-Redux-dev
|
| 20 |
- black-forest-labs/FLUX.2-dev-NVFP4
|
|
@@ -99,6 +100,7 @@ models:
|
|
| 99 |
- jdopensource/JoyAI-Image-Edit-Plus-ComfyUI
|
| 100 |
- kandinskylab/Kandinsky-5.0-T2I-Lite
|
| 101 |
- Kijai/flux-fp8
|
|
|
|
| 102 |
- Laxhar/noob_openpose
|
| 103 |
- Laxhar/noobai-XL-1.1
|
| 104 |
- Laxhar/noobai-XL-Vpred-1.0
|
|
@@ -141,6 +143,7 @@ models:
|
|
| 141 |
# Upstream Base Models
|
| 142 |
- AIDC-AI/Ovis-Image-7B
|
| 143 |
- Alpha-VLLM/Lumina-Image-2.0
|
|
|
|
| 144 |
- baidu/ERNIE-Image
|
| 145 |
- baidu/ERNIE-Image-Turbo
|
| 146 |
- black-forest-labs/FLUX.1-dev
|
|
|
|
| 15 |
# Directly Run Models
|
| 16 |
- abenzerps/Qwen-Image-2.1-Uncensored-GGUF
|
| 17 |
- AiAF/Illustrious-XL-v0.1.safetensors
|
| 18 |
+
- alibaba-pai/Qwen-Image-2.1-Fun-Controlnet-Union
|
| 19 |
- alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union-2.1
|
| 20 |
- black-forest-labs/FLUX.1-Redux-dev
|
| 21 |
- black-forest-labs/FLUX.2-dev-NVFP4
|
|
|
|
| 100 |
- jdopensource/JoyAI-Image-Edit-Plus-ComfyUI
|
| 101 |
- kandinskylab/Kandinsky-5.0-T2I-Lite
|
| 102 |
- Kijai/flux-fp8
|
| 103 |
+
- Kijai/QwenImage_experimental
|
| 104 |
- Laxhar/noob_openpose
|
| 105 |
- Laxhar/noobai-XL-1.1
|
| 106 |
- Laxhar/noobai-XL-Vpred-1.0
|
|
|
|
| 143 |
# Upstream Base Models
|
| 144 |
- AIDC-AI/Ovis-Image-7B
|
| 145 |
- Alpha-VLLM/Lumina-Image-2.0
|
| 146 |
+
- alibaba-pai/Qwen-Image-2.1-Fun-Controlnet-Union
|
| 147 |
- baidu/ERNIE-Image
|
| 148 |
- baidu/ERNIE-Image-Turbo
|
| 149 |
- black-forest-labs/FLUX.1-dev
|
chain_injectors/anima_controlnet_lllite_injector.py
DELETED
|
@@ -1,53 +0,0 @@
|
|
| 1 |
-
def inject(assembler, chain_definition, chain_items):
|
| 2 |
-
if not chain_items:
|
| 3 |
-
return
|
| 4 |
-
|
| 5 |
-
ksampler_name = chain_definition.get('ksampler_node', 'ksampler')
|
| 6 |
-
if ksampler_name not in assembler.node_map:
|
| 7 |
-
print(f"Warning: KSampler node '{ksampler_name}' not found for Anima LLLite chain. Skipping.")
|
| 8 |
-
return
|
| 9 |
-
|
| 10 |
-
ksampler_id = assembler.node_map[ksampler_name]
|
| 11 |
-
|
| 12 |
-
if 'model' not in assembler.workflow[ksampler_id]['inputs']:
|
| 13 |
-
print(f"Warning: KSampler node '{ksampler_name}' is missing 'model' input. Skipping.")
|
| 14 |
-
return
|
| 15 |
-
|
| 16 |
-
current_model_connection = assembler.workflow[ksampler_id]['inputs']['model']
|
| 17 |
-
|
| 18 |
-
for item_data in chain_items:
|
| 19 |
-
image_loader_id = assembler._get_unique_id()
|
| 20 |
-
image_loader_node = assembler._get_node_template("LoadImage")
|
| 21 |
-
image_loader_node['inputs']['image'] = item_data['image']
|
| 22 |
-
assembler.workflow[image_loader_id] = image_loader_node
|
| 23 |
-
|
| 24 |
-
image_scaler_id = assembler._get_unique_id()
|
| 25 |
-
image_scaler_node = assembler._get_node_template("ImageScaleToTotalPixels")
|
| 26 |
-
image_scaler_node['inputs']['image'] = [image_loader_id, 0]
|
| 27 |
-
image_scaler_node['inputs']['upscale_method'] = 'nearest-exact'
|
| 28 |
-
image_scaler_node['inputs']['megapixels'] = 1.0
|
| 29 |
-
assembler.workflow[image_scaler_id] = image_scaler_node
|
| 30 |
-
|
| 31 |
-
patch_loader_id = assembler._get_unique_id()
|
| 32 |
-
patch_loader_node = assembler._get_node_template("ModelPatchLoader")
|
| 33 |
-
patch_loader_node['inputs']['name'] = item_data['control_net_name']
|
| 34 |
-
assembler.workflow[patch_loader_id] = patch_loader_node
|
| 35 |
-
|
| 36 |
-
apply_cn_id = assembler._get_unique_id()
|
| 37 |
-
apply_cn_node = assembler._get_node_template("AnimaLLLiteApply")
|
| 38 |
-
|
| 39 |
-
apply_cn_node['inputs']['strength'] = item_data['strength']
|
| 40 |
-
apply_cn_node['inputs']['start_percent'] = item_data.get('start_percent', 0.0)
|
| 41 |
-
apply_cn_node['inputs']['end_percent'] = item_data.get('end_percent', 1.0)
|
| 42 |
-
|
| 43 |
-
apply_cn_node['inputs']['model'] = current_model_connection
|
| 44 |
-
apply_cn_node['inputs']['model_patch'] = [patch_loader_id, 0]
|
| 45 |
-
apply_cn_node['inputs']['image'] = [image_scaler_id, 0]
|
| 46 |
-
|
| 47 |
-
assembler.workflow[apply_cn_id] = apply_cn_node
|
| 48 |
-
|
| 49 |
-
current_model_connection = [apply_cn_id, 0]
|
| 50 |
-
|
| 51 |
-
assembler.workflow[ksampler_id]['inputs']['model'] = current_model_connection
|
| 52 |
-
|
| 53 |
-
print(f"Anima LLLite injector applied. KSampler model input re-routed through {len(chain_items)} LLLite(s).")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chain_injectors/controlnet_injector.py
CHANGED
|
@@ -1,60 +1,278 @@
|
|
| 1 |
-
def inject(assembler, chain_definition, chain_items):
|
| 2 |
-
if not chain_items:
|
| 3 |
-
return
|
| 4 |
-
|
| 5 |
-
ksampler_name = chain_definition.get('ksampler_node', 'ksampler')
|
| 6 |
-
if ksampler_name not in assembler.node_map:
|
| 7 |
-
print(f"Warning: Target node '{ksampler_name}' for ControlNet chain not found. Skipping chain injection.")
|
| 8 |
-
return
|
| 9 |
-
|
| 10 |
-
ksampler_id = assembler.node_map[ksampler_name]
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
def inject(assembler, chain_definition, chain_items):
|
| 2 |
+
if not chain_items:
|
| 3 |
+
return
|
| 4 |
+
|
| 5 |
+
ksampler_name = chain_definition.get('ksampler_node', 'ksampler')
|
| 6 |
+
if ksampler_name not in assembler.node_map:
|
| 7 |
+
print(f"Warning: Target node '{ksampler_name}' for ControlNet chain not found. Skipping chain injection.")
|
| 8 |
+
return
|
| 9 |
+
|
| 10 |
+
ksampler_id = assembler.node_map[ksampler_name]
|
| 11 |
+
|
| 12 |
+
vae_source_str = chain_definition.get('vae_source')
|
| 13 |
+
vae_connection = None
|
| 14 |
+
if vae_source_str and ':' in vae_source_str:
|
| 15 |
+
vae_node_name, vae_idx_str = vae_source_str.split(':')
|
| 16 |
+
if vae_node_name in assembler.node_map:
|
| 17 |
+
vae_connection = [assembler.node_map[vae_node_name], int(vae_idx_str)]
|
| 18 |
+
else:
|
| 19 |
+
print(f"Warning: VAE source node '{vae_node_name}' for ControlNet chain not found.")
|
| 20 |
+
|
| 21 |
+
template_name = chain_definition.get('template', 'ControlNetApplyAdvanced')
|
| 22 |
+
|
| 23 |
+
# Resolution scaling: SD1.5 defaults to 0.75 MP, all other architectures default to 1.0 MP
|
| 24 |
+
model_type = getattr(assembler, 'dynamic_values', {}).get('model_type', '')
|
| 25 |
+
if isinstance(model_type, str) and model_type.lower() in ('sd15', 'sd1.5', 'sd-1.5'):
|
| 26 |
+
default_megapixels = 0.75
|
| 27 |
+
else:
|
| 28 |
+
default_megapixels = 1.0
|
| 29 |
+
megapixels = float(chain_definition.get('megapixels', default_megapixels))
|
| 30 |
+
|
| 31 |
+
# 1. Qwen-Image-2.1 Fun ControlNet
|
| 32 |
+
if template_name == "QwenImage21FunControlNetApply":
|
| 33 |
+
if 'model' not in assembler.workflow[ksampler_id]['inputs']:
|
| 34 |
+
print(f"Warning: KSampler node '{ksampler_name}' is missing 'model' input. Skipping Qwen Fun ControlNet.")
|
| 35 |
+
return
|
| 36 |
+
|
| 37 |
+
current_model_connection = assembler.workflow[ksampler_id]['inputs']['model']
|
| 38 |
+
|
| 39 |
+
for item_data in chain_items:
|
| 40 |
+
patch_loader_id = assembler._get_unique_id()
|
| 41 |
+
patch_loader_node = assembler._get_node_template("ModelPatchLoader")
|
| 42 |
+
patch_loader_node['inputs']['name'] = item_data['control_net_name']
|
| 43 |
+
assembler.workflow[patch_loader_id] = patch_loader_node
|
| 44 |
+
|
| 45 |
+
image_loader_id = assembler._get_unique_id()
|
| 46 |
+
image_loader_node = assembler._get_node_template("LoadImage")
|
| 47 |
+
image_loader_node['inputs']['image'] = item_data['image']
|
| 48 |
+
assembler.workflow[image_loader_id] = image_loader_node
|
| 49 |
+
|
| 50 |
+
image_scaler_id = assembler._get_unique_id()
|
| 51 |
+
image_scaler_node = assembler._get_node_template("ImageScaleToTotalPixels")
|
| 52 |
+
image_scaler_node['inputs']['image'] = [image_loader_id, 0]
|
| 53 |
+
image_scaler_node['inputs']['upscale_method'] = 'nearest-exact'
|
| 54 |
+
image_scaler_node['inputs']['megapixels'] = megapixels
|
| 55 |
+
assembler.workflow[image_scaler_id] = image_scaler_node
|
| 56 |
+
|
| 57 |
+
apply_cn_id = assembler._get_unique_id()
|
| 58 |
+
apply_cn_node = assembler._get_node_template(template_name)
|
| 59 |
+
apply_cn_node['inputs']['strength'] = item_data.get('strength', 1.0)
|
| 60 |
+
apply_cn_node['inputs']['start_percent'] = 0.0
|
| 61 |
+
apply_cn_node['inputs']['end_percent'] = 1.0
|
| 62 |
+
apply_cn_node['inputs']['model'] = current_model_connection
|
| 63 |
+
apply_cn_node['inputs']['model_patch'] = [patch_loader_id, 0]
|
| 64 |
+
apply_cn_node['inputs']['control_image'] = [image_scaler_id, 0]
|
| 65 |
+
if vae_connection:
|
| 66 |
+
apply_cn_node['inputs']['vae'] = vae_connection
|
| 67 |
+
|
| 68 |
+
assembler.workflow[apply_cn_id] = apply_cn_node
|
| 69 |
+
current_model_connection = [apply_cn_id, 0]
|
| 70 |
+
|
| 71 |
+
assembler.workflow[ksampler_id]['inputs']['model'] = current_model_connection
|
| 72 |
+
print(f"Qwen Fun ControlNet injector applied. KSampler model input redirected through {len(chain_items)} node(s).")
|
| 73 |
+
return
|
| 74 |
+
|
| 75 |
+
# 2. Anima LLLite ControlNet
|
| 76 |
+
if template_name == "AnimaLLLiteApply":
|
| 77 |
+
if 'model' not in assembler.workflow[ksampler_id]['inputs']:
|
| 78 |
+
print(f"Warning: KSampler node '{ksampler_name}' is missing 'model' input. Skipping Anima LLLite.")
|
| 79 |
+
return
|
| 80 |
+
|
| 81 |
+
current_model_connection = assembler.workflow[ksampler_id]['inputs']['model']
|
| 82 |
+
|
| 83 |
+
for item_data in chain_items:
|
| 84 |
+
image_loader_id = assembler._get_unique_id()
|
| 85 |
+
image_loader_node = assembler._get_node_template("LoadImage")
|
| 86 |
+
image_loader_node['inputs']['image'] = item_data['image']
|
| 87 |
+
assembler.workflow[image_loader_id] = image_loader_node
|
| 88 |
+
|
| 89 |
+
image_scaler_id = assembler._get_unique_id()
|
| 90 |
+
image_scaler_node = assembler._get_node_template("ImageScaleToTotalPixels")
|
| 91 |
+
image_scaler_node['inputs']['image'] = [image_loader_id, 0]
|
| 92 |
+
image_scaler_node['inputs']['upscale_method'] = 'nearest-exact'
|
| 93 |
+
image_scaler_node['inputs']['megapixels'] = megapixels
|
| 94 |
+
assembler.workflow[image_scaler_id] = image_scaler_node
|
| 95 |
+
|
| 96 |
+
patch_loader_id = assembler._get_unique_id()
|
| 97 |
+
patch_loader_node = assembler._get_node_template("ModelPatchLoader")
|
| 98 |
+
patch_loader_node['inputs']['name'] = item_data['control_net_name']
|
| 99 |
+
assembler.workflow[patch_loader_id] = patch_loader_node
|
| 100 |
+
|
| 101 |
+
apply_cn_id = assembler._get_unique_id()
|
| 102 |
+
apply_cn_node = assembler._get_node_template("AnimaLLLiteApply")
|
| 103 |
+
apply_cn_node['inputs']['strength'] = item_data.get('strength', 1.0)
|
| 104 |
+
apply_cn_node['inputs']['start_percent'] = item_data.get('start_percent', 0.0)
|
| 105 |
+
apply_cn_node['inputs']['end_percent'] = item_data.get('end_percent', 1.0)
|
| 106 |
+
apply_cn_node['inputs']['model'] = current_model_connection
|
| 107 |
+
apply_cn_node['inputs']['model_patch'] = [patch_loader_id, 0]
|
| 108 |
+
apply_cn_node['inputs']['image'] = [image_scaler_id, 0]
|
| 109 |
+
|
| 110 |
+
assembler.workflow[apply_cn_id] = apply_cn_node
|
| 111 |
+
current_model_connection = [apply_cn_id, 0]
|
| 112 |
+
|
| 113 |
+
assembler.workflow[ksampler_id]['inputs']['model'] = current_model_connection
|
| 114 |
+
print(f"Anima LLLite ControlNet injector applied. KSampler model input redirected through {len(chain_items)} node(s).")
|
| 115 |
+
return
|
| 116 |
+
|
| 117 |
+
# 3. DiffSynth ControlNet (Z-Image)
|
| 118 |
+
if template_name in ("QwenImageDiffsynthControlnet", "ZImage_ControlNet"):
|
| 119 |
+
model_sampler_name = chain_definition.get('model_sampler_node')
|
| 120 |
+
target_node_id = None
|
| 121 |
+
target_input_name = 'model'
|
| 122 |
+
|
| 123 |
+
if model_sampler_name and model_sampler_name in assembler.node_map:
|
| 124 |
+
model_sampler_id = assembler.node_map[model_sampler_name]
|
| 125 |
+
if target_input_name in assembler.workflow[model_sampler_id]['inputs']:
|
| 126 |
+
target_node_id = model_sampler_id
|
| 127 |
+
|
| 128 |
+
if not target_node_id:
|
| 129 |
+
if target_input_name in assembler.workflow[ksampler_id]['inputs']:
|
| 130 |
+
target_node_id = ksampler_id
|
| 131 |
+
else:
|
| 132 |
+
print(f"Warning: Neither model_sampler nor ksampler found with 'model' input. Skipping DiffSynth ControlNet.")
|
| 133 |
+
return
|
| 134 |
+
|
| 135 |
+
current_model_connection = assembler.workflow[target_node_id]['inputs'][target_input_name]
|
| 136 |
+
|
| 137 |
+
for item_data in chain_items:
|
| 138 |
+
patch_loader_id = assembler._get_unique_id()
|
| 139 |
+
patch_loader_node = assembler._get_node_template("ModelPatchLoader")
|
| 140 |
+
patch_loader_node['inputs']['name'] = item_data['control_net_name']
|
| 141 |
+
assembler.workflow[patch_loader_id] = patch_loader_node
|
| 142 |
+
|
| 143 |
+
image_loader_id = assembler._get_unique_id()
|
| 144 |
+
image_loader_node = assembler._get_node_template("LoadImage")
|
| 145 |
+
image_loader_node['inputs']['image'] = item_data['image']
|
| 146 |
+
assembler.workflow[image_loader_id] = image_loader_node
|
| 147 |
+
|
| 148 |
+
image_scaler_id = assembler._get_unique_id()
|
| 149 |
+
image_scaler_node = assembler._get_node_template("ImageScaleToTotalPixels")
|
| 150 |
+
image_scaler_node['inputs']['image'] = [image_loader_id, 0]
|
| 151 |
+
image_scaler_node['inputs']['upscale_method'] = 'nearest-exact'
|
| 152 |
+
image_scaler_node['inputs']['megapixels'] = megapixels
|
| 153 |
+
assembler.workflow[image_scaler_id] = image_scaler_node
|
| 154 |
+
|
| 155 |
+
apply_cn_id = assembler._get_unique_id()
|
| 156 |
+
apply_cn_node = assembler._get_node_template(template_name)
|
| 157 |
+
apply_cn_node['inputs']['strength'] = item_data.get('strength', 1.0)
|
| 158 |
+
apply_cn_node['inputs']['model'] = current_model_connection
|
| 159 |
+
apply_cn_node['inputs']['model_patch'] = [patch_loader_id, 0]
|
| 160 |
+
apply_cn_node['inputs']['image'] = [image_scaler_id, 0]
|
| 161 |
+
if vae_connection and 'vae' in apply_cn_node.get('inputs', {}):
|
| 162 |
+
apply_cn_node['inputs']['vae'] = vae_connection
|
| 163 |
+
|
| 164 |
+
assembler.workflow[apply_cn_id] = apply_cn_node
|
| 165 |
+
current_model_connection = [apply_cn_id, 0]
|
| 166 |
+
|
| 167 |
+
assembler.workflow[target_node_id]['inputs'][target_input_name] = current_model_connection
|
| 168 |
+
print(f"DiffSynth ControlNet injector applied. Target 'model' input redirected through {len(chain_items)} node(s).")
|
| 169 |
+
return
|
| 170 |
+
|
| 171 |
+
# 4. Krea-2 ControlNet
|
| 172 |
+
if template_name == "Krea2ControlApply":
|
| 173 |
+
if 'model' not in assembler.workflow[ksampler_id]['inputs']:
|
| 174 |
+
print(f"Warning: KSampler node '{ksampler_name}' is missing 'model' input. Skipping Krea2 ControlNet.")
|
| 175 |
+
return
|
| 176 |
+
|
| 177 |
+
latent_connection = assembler.workflow[ksampler_id]['inputs'].get('latent_image')
|
| 178 |
+
if not latent_connection:
|
| 179 |
+
print(f"Warning: KSampler node '{ksampler_name}' is missing 'latent_image' input. Krea2 ControlNet requires it. Skipping.")
|
| 180 |
+
return
|
| 181 |
+
|
| 182 |
+
current_model_connection = assembler.workflow[ksampler_id]['inputs']['model']
|
| 183 |
+
|
| 184 |
+
for item_data in chain_items:
|
| 185 |
+
image_loader_id = assembler._get_unique_id()
|
| 186 |
+
image_loader_node = assembler._get_node_template("LoadImage")
|
| 187 |
+
image_loader_node['inputs']['image'] = item_data['image']
|
| 188 |
+
assembler.workflow[image_loader_id] = image_loader_node
|
| 189 |
+
|
| 190 |
+
image_scaler_id = assembler._get_unique_id()
|
| 191 |
+
image_scaler_node = assembler._get_node_template("ImageScaleToTotalPixels")
|
| 192 |
+
image_scaler_node['inputs']['image'] = [image_loader_id, 0]
|
| 193 |
+
image_scaler_node['inputs']['upscale_method'] = 'nearest-exact'
|
| 194 |
+
image_scaler_node['inputs']['megapixels'] = megapixels
|
| 195 |
+
image_scaler_node['inputs']['resolution_steps'] = 1
|
| 196 |
+
assembler.workflow[image_scaler_id] = image_scaler_node
|
| 197 |
+
|
| 198 |
+
lora_loader_id = assembler._get_unique_id()
|
| 199 |
+
lora_loader_node = assembler._get_node_template("Krea2ControlLoRALoader")
|
| 200 |
+
lora_loader_node['inputs']['lora_name'] = item_data['control_net_name']
|
| 201 |
+
lora_loader_node['inputs']['strength'] = item_data.get('strength', 1.0)
|
| 202 |
+
lora_loader_node['inputs']['model'] = current_model_connection
|
| 203 |
+
assembler.workflow[lora_loader_id] = lora_loader_node
|
| 204 |
+
|
| 205 |
+
img_encode_id = assembler._get_unique_id()
|
| 206 |
+
img_encode_node = assembler._get_node_template("Krea2ControlImageEncode")
|
| 207 |
+
img_encode_node['inputs']['resize'] = "match_latent_size"
|
| 208 |
+
img_encode_node['inputs']['upscale_method'] = "lanczos"
|
| 209 |
+
img_encode_node['inputs']['crop'] = "center"
|
| 210 |
+
img_encode_node['inputs']['channel_mode'] = "rgb"
|
| 211 |
+
img_encode_node['inputs']['normalize'] = "none"
|
| 212 |
+
img_encode_node['inputs']['invert'] = False
|
| 213 |
+
img_encode_node['inputs']['batch_mode'] = "independent_images"
|
| 214 |
+
img_encode_node['inputs']['control_image'] = [image_scaler_id, 0]
|
| 215 |
+
if vae_connection:
|
| 216 |
+
img_encode_node['inputs']['vae'] = vae_connection
|
| 217 |
+
img_encode_node['inputs']['latent'] = latent_connection
|
| 218 |
+
assembler.workflow[img_encode_id] = img_encode_node
|
| 219 |
+
|
| 220 |
+
apply_cn_id = assembler._get_unique_id()
|
| 221 |
+
apply_cn_node = assembler._get_node_template("Krea2ControlApply")
|
| 222 |
+
apply_cn_node['inputs']['model'] = [lora_loader_id, 0]
|
| 223 |
+
apply_cn_node['inputs']['control_latent'] = [img_encode_id, 0]
|
| 224 |
+
|
| 225 |
+
assembler.workflow[apply_cn_id] = apply_cn_node
|
| 226 |
+
current_model_connection = [apply_cn_id, 0]
|
| 227 |
+
|
| 228 |
+
assembler.workflow[ksampler_id]['inputs']['model'] = current_model_connection
|
| 229 |
+
print(f"Krea2 ControlNet injector applied. KSampler model input redirected through {len(chain_items)} node(s).")
|
| 230 |
+
return
|
| 231 |
+
|
| 232 |
+
# 5. Default: Classical Conditioning ControlNet (SD1.5, SDXL, SD3.5, FLUX.1, Qwen-Image)
|
| 233 |
+
if 'positive' not in assembler.workflow[ksampler_id]['inputs'] or \
|
| 234 |
+
'negative' not in assembler.workflow[ksampler_id]['inputs']:
|
| 235 |
+
print(f"Warning: KSampler node '{ksampler_name}' is missing 'positive' or 'negative' inputs. Skipping ControlNet chain.")
|
| 236 |
+
return
|
| 237 |
+
|
| 238 |
+
if not vae_connection:
|
| 239 |
+
print("Warning: 'vae_source' definition missing or invalid in the recipe for the ControlNet chain. Skipping.")
|
| 240 |
+
return
|
| 241 |
+
|
| 242 |
+
current_positive_connection = assembler.workflow[ksampler_id]['inputs']['positive']
|
| 243 |
+
current_negative_connection = assembler.workflow[ksampler_id]['inputs']['negative']
|
| 244 |
+
|
| 245 |
+
for item_data in chain_items:
|
| 246 |
+
cn_loader_id = assembler._get_unique_id()
|
| 247 |
+
cn_loader_node = assembler._get_node_template("ControlNetLoader")
|
| 248 |
+
cn_loader_node['inputs']['control_net_name'] = item_data['control_net_name']
|
| 249 |
+
assembler.workflow[cn_loader_id] = cn_loader_node
|
| 250 |
+
|
| 251 |
+
image_loader_id = assembler._get_unique_id()
|
| 252 |
+
image_loader_node = assembler._get_node_template("LoadImage")
|
| 253 |
+
image_loader_node['inputs']['image'] = item_data['image']
|
| 254 |
+
assembler.workflow[image_loader_id] = image_loader_node
|
| 255 |
+
|
| 256 |
+
image_scaler_id = assembler._get_unique_id()
|
| 257 |
+
image_scaler_node = assembler._get_node_template("ImageScaleToTotalPixels")
|
| 258 |
+
image_scaler_node['inputs']['image'] = [image_loader_id, 0]
|
| 259 |
+
image_scaler_node['inputs']['upscale_method'] = 'nearest-exact'
|
| 260 |
+
image_scaler_node['inputs']['megapixels'] = megapixels
|
| 261 |
+
assembler.workflow[image_scaler_id] = image_scaler_node
|
| 262 |
+
|
| 263 |
+
apply_cn_id = assembler._get_unique_id()
|
| 264 |
+
apply_cn_node = assembler._get_node_template(template_name)
|
| 265 |
+
apply_cn_node['inputs']['strength'] = item_data.get('strength', 1.0)
|
| 266 |
+
apply_cn_node['inputs']['positive'] = current_positive_connection
|
| 267 |
+
apply_cn_node['inputs']['negative'] = current_negative_connection
|
| 268 |
+
apply_cn_node['inputs']['control_net'] = [cn_loader_id, 0]
|
| 269 |
+
apply_cn_node['inputs']['image'] = [image_scaler_id, 0]
|
| 270 |
+
apply_cn_node['inputs']['vae'] = vae_connection
|
| 271 |
+
|
| 272 |
+
assembler.workflow[apply_cn_id] = apply_cn_node
|
| 273 |
+
current_positive_connection = [apply_cn_id, 0]
|
| 274 |
+
current_negative_connection = [apply_cn_id, 1]
|
| 275 |
+
|
| 276 |
+
assembler.workflow[ksampler_id]['inputs']['positive'] = current_positive_connection
|
| 277 |
+
assembler.workflow[ksampler_id]['inputs']['negative'] = current_negative_connection
|
| 278 |
+
print(f"ControlNet injector applied. KSampler inputs redirected through {len(chain_items)} ControlNet node(s).")
|
chain_injectors/diffsynth_controlnet_injector.py
DELETED
|
@@ -1,75 +0,0 @@
|
|
| 1 |
-
def inject(assembler, chain_definition, chain_items):
|
| 2 |
-
if not chain_items:
|
| 3 |
-
return
|
| 4 |
-
|
| 5 |
-
model_sampler_name = chain_definition.get('model_sampler_node')
|
| 6 |
-
ksampler_name = chain_definition.get('ksampler_node', 'ksampler')
|
| 7 |
-
|
| 8 |
-
target_node_id = None
|
| 9 |
-
target_input_name = 'model'
|
| 10 |
-
|
| 11 |
-
if model_sampler_name and model_sampler_name in assembler.node_map:
|
| 12 |
-
model_sampler_id = assembler.node_map[model_sampler_name]
|
| 13 |
-
if target_input_name in assembler.workflow[model_sampler_id]['inputs']:
|
| 14 |
-
target_node_id = model_sampler_id
|
| 15 |
-
print(f"ControlNet Model Patch injector targeting ModelSamplingAuraFlow node '{model_sampler_name}'.")
|
| 16 |
-
|
| 17 |
-
if not target_node_id:
|
| 18 |
-
if ksampler_name in assembler.node_map:
|
| 19 |
-
ksampler_id = assembler.node_map[ksampler_name]
|
| 20 |
-
if target_input_name in assembler.workflow[ksampler_id]['inputs']:
|
| 21 |
-
target_node_id = ksampler_id
|
| 22 |
-
print(f"ControlNet Model Patch injector targeting KSampler node '{ksampler_name}'.")
|
| 23 |
-
else:
|
| 24 |
-
print(f"Warning: Neither ModelSamplingAuraFlow node '{model_sampler_name}' nor KSampler node '{ksampler_name}' found for ControlNet patch chain. Skipping.")
|
| 25 |
-
return
|
| 26 |
-
|
| 27 |
-
if not target_node_id:
|
| 28 |
-
print(f"Warning: Could not find a valid 'model' input on target nodes. Skipping ControlNet patch chain.")
|
| 29 |
-
return
|
| 30 |
-
|
| 31 |
-
current_model_connection = assembler.workflow[target_node_id]['inputs'][target_input_name]
|
| 32 |
-
|
| 33 |
-
vae_source_str = chain_definition.get('vae_source')
|
| 34 |
-
vae_connection = None
|
| 35 |
-
if vae_source_str:
|
| 36 |
-
try:
|
| 37 |
-
vae_node_name, vae_idx_str = vae_source_str.split(':')
|
| 38 |
-
if vae_node_name in assembler.node_map:
|
| 39 |
-
vae_connection = [assembler.node_map[vae_node_name], int(vae_idx_str)]
|
| 40 |
-
else:
|
| 41 |
-
print(f"Warning: VAE source node '{vae_node_name}' not found for ControlNet patch chain. VAE will not be connected.")
|
| 42 |
-
except ValueError:
|
| 43 |
-
print(f"Warning: Invalid 'vae_source' format '{vae_source_str}' for ControlNet patch chain. Expected 'node_name:index'. VAE will not be connected.")
|
| 44 |
-
else:
|
| 45 |
-
print(f"Warning: 'vae_source' not defined for ControlNet patch chain definition. VAE may not be connected.")
|
| 46 |
-
|
| 47 |
-
for item_data in chain_items:
|
| 48 |
-
patch_loader_id = assembler._get_unique_id()
|
| 49 |
-
patch_loader_node = assembler._get_node_template("ModelPatchLoader")
|
| 50 |
-
patch_loader_node['inputs']['name'] = item_data['control_net_name']
|
| 51 |
-
assembler.workflow[patch_loader_id] = patch_loader_node
|
| 52 |
-
|
| 53 |
-
image_loader_id = assembler._get_unique_id()
|
| 54 |
-
image_loader_node = assembler._get_node_template("LoadImage")
|
| 55 |
-
image_loader_node['inputs']['image'] = item_data['image']
|
| 56 |
-
assembler.workflow[image_loader_id] = image_loader_node
|
| 57 |
-
|
| 58 |
-
apply_cn_id = assembler._get_unique_id()
|
| 59 |
-
apply_cn_node = assembler._get_node_template(chain_definition['template'])
|
| 60 |
-
|
| 61 |
-
apply_cn_node['inputs']['strength'] = item_data.get('strength', 1.0)
|
| 62 |
-
apply_cn_node['inputs']['model'] = current_model_connection
|
| 63 |
-
apply_cn_node['inputs']['model_patch'] = [patch_loader_id, 0]
|
| 64 |
-
apply_cn_node['inputs']['image'] = [image_loader_id, 0]
|
| 65 |
-
|
| 66 |
-
if 'vae' in apply_cn_node['inputs'] and vae_connection:
|
| 67 |
-
apply_cn_node['inputs']['vae'] = vae_connection
|
| 68 |
-
|
| 69 |
-
assembler.workflow[apply_cn_id] = apply_cn_node
|
| 70 |
-
|
| 71 |
-
current_model_connection = [apply_cn_id, 0]
|
| 72 |
-
|
| 73 |
-
assembler.workflow[target_node_id]['inputs'][target_input_name] = current_model_connection
|
| 74 |
-
|
| 75 |
-
print(f"ControlNet Model Patch injector applied. Target 'model' input re-routed through {len(chain_items)} patch(es).")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chain_injectors/krea2_controlnet_injector.py
DELETED
|
@@ -1,78 +0,0 @@
|
|
| 1 |
-
def inject(assembler, chain_definition, chain_items):
|
| 2 |
-
if not chain_items:
|
| 3 |
-
return
|
| 4 |
-
|
| 5 |
-
ksampler_name = chain_definition.get('ksampler_node', 'ksampler')
|
| 6 |
-
if ksampler_name not in assembler.node_map:
|
| 7 |
-
print(f"Warning: Target node '{ksampler_name}' for Krea2 ControlNet chain not found. Skipping.")
|
| 8 |
-
return
|
| 9 |
-
|
| 10 |
-
ksampler_id = assembler.node_map[ksampler_name]
|
| 11 |
-
|
| 12 |
-
if 'model' not in assembler.workflow[ksampler_id]['inputs']:
|
| 13 |
-
print(f"Warning: KSampler node '{ksampler_name}' is missing 'model' input. Skipping.")
|
| 14 |
-
return
|
| 15 |
-
|
| 16 |
-
vae_source_str = chain_definition.get('vae_source')
|
| 17 |
-
vae_connection = None
|
| 18 |
-
if vae_source_str:
|
| 19 |
-
vae_node_name, vae_idx_str = vae_source_str.split(':')
|
| 20 |
-
if vae_node_name in assembler.node_map:
|
| 21 |
-
vae_connection = [assembler.node_map[vae_node_name], int(vae_idx_str)]
|
| 22 |
-
|
| 23 |
-
latent_connection = assembler.workflow[ksampler_id]['inputs'].get('latent_image')
|
| 24 |
-
if not latent_connection:
|
| 25 |
-
print(f"Warning: KSampler node '{ksampler_name}' is missing 'latent_image' input. Krea2 ControlNet requires it. Skipping.")
|
| 26 |
-
return
|
| 27 |
-
|
| 28 |
-
current_model_connection = assembler.workflow[ksampler_id]['inputs']['model']
|
| 29 |
-
|
| 30 |
-
for item_data in chain_items:
|
| 31 |
-
image_loader_id = assembler._get_unique_id()
|
| 32 |
-
image_loader_node = assembler._get_node_template("LoadImage")
|
| 33 |
-
image_loader_node['inputs']['image'] = item_data['image']
|
| 34 |
-
assembler.workflow[image_loader_id] = image_loader_node
|
| 35 |
-
|
| 36 |
-
image_scaler_id = assembler._get_unique_id()
|
| 37 |
-
image_scaler_node = assembler._get_node_template("ImageScaleToTotalPixels")
|
| 38 |
-
image_scaler_node['inputs']['image'] = [image_loader_id, 0]
|
| 39 |
-
image_scaler_node['inputs']['upscale_method'] = 'nearest-exact'
|
| 40 |
-
image_scaler_node['inputs']['megapixels'] = 1.0
|
| 41 |
-
image_scaler_node['inputs']['resolution_steps'] = 1
|
| 42 |
-
assembler.workflow[image_scaler_id] = image_scaler_node
|
| 43 |
-
|
| 44 |
-
lora_loader_id = assembler._get_unique_id()
|
| 45 |
-
lora_loader_node = assembler._get_node_template("Krea2ControlLoRALoader")
|
| 46 |
-
lora_loader_node['inputs']['lora_name'] = item_data['control_net_name']
|
| 47 |
-
lora_loader_node['inputs']['strength'] = item_data.get('strength', 1.0)
|
| 48 |
-
lora_loader_node['inputs']['model'] = current_model_connection
|
| 49 |
-
assembler.workflow[lora_loader_id] = lora_loader_node
|
| 50 |
-
|
| 51 |
-
img_encode_id = assembler._get_unique_id()
|
| 52 |
-
img_encode_node = assembler._get_node_template("Krea2ControlImageEncode")
|
| 53 |
-
img_encode_node['inputs']['resize'] = "match_latent_size"
|
| 54 |
-
img_encode_node['inputs']['upscale_method'] = "lanczos"
|
| 55 |
-
img_encode_node['inputs']['crop'] = "center"
|
| 56 |
-
img_encode_node['inputs']['channel_mode'] = "rgb"
|
| 57 |
-
img_encode_node['inputs']['normalize'] = "none"
|
| 58 |
-
img_encode_node['inputs']['invert'] = False
|
| 59 |
-
img_encode_node['inputs']['batch_mode'] = "independent_images"
|
| 60 |
-
img_encode_node['inputs']['control_image'] = [image_scaler_id, 0]
|
| 61 |
-
if vae_connection:
|
| 62 |
-
img_encode_node['inputs']['vae'] = vae_connection
|
| 63 |
-
if latent_connection:
|
| 64 |
-
img_encode_node['inputs']['latent'] = latent_connection
|
| 65 |
-
assembler.workflow[img_encode_id] = img_encode_node
|
| 66 |
-
|
| 67 |
-
apply_cn_id = assembler._get_unique_id()
|
| 68 |
-
apply_cn_node = assembler._get_node_template("Krea2ControlApply")
|
| 69 |
-
apply_cn_node['inputs']['model'] = [lora_loader_id, 0]
|
| 70 |
-
apply_cn_node['inputs']['control_latent'] = [img_encode_id, 0]
|
| 71 |
-
|
| 72 |
-
assembler.workflow[apply_cn_id] = apply_cn_node
|
| 73 |
-
|
| 74 |
-
current_model_connection = [apply_cn_id, 0]
|
| 75 |
-
|
| 76 |
-
assembler.workflow[ksampler_id]['inputs']['model'] = current_model_connection
|
| 77 |
-
|
| 78 |
-
print(f"Krea2 ControlNet injector applied. KSampler model input redirected through {len(chain_items)} Krea2 ControlNet nodes.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
comfy_integration/setup.py
CHANGED
|
@@ -25,6 +25,13 @@ def initialize_comfyui():
|
|
| 25 |
else:
|
| 26 |
print("✅ ComfyUI repository already exists.")
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
print(f"--- Merging ComfyUI from '{COMFYUI_TEMP_DIR}' to '{APP_DIR}' ---")
|
| 29 |
for item in os.listdir(COMFYUI_TEMP_DIR):
|
| 30 |
src_path = os.path.join(COMFYUI_TEMP_DIR, item)
|
|
|
|
| 25 |
else:
|
| 26 |
print("✅ ComfyUI repository already exists.")
|
| 27 |
|
| 28 |
+
try:
|
| 29 |
+
print("--- [Setup] Applying PR #16519 for ComfyUI (Qwen-Image 2.1 Fun ControlNet) ---")
|
| 30 |
+
os.system(f"git -C {COMFYUI_TEMP_DIR} fetch --depth 1 origin pull/16519/head && git -c user.name=dev -c user.email=dev@example.com -C {COMFYUI_TEMP_DIR} merge --no-edit FETCH_HEAD || git -C {COMFYUI_TEMP_DIR} checkout -f FETCH_HEAD")
|
| 31 |
+
print("✅ Successfully applied PR #16519.")
|
| 32 |
+
except Exception as e:
|
| 33 |
+
print(f"⚠️ Warning: Could not apply PR #16519 for ComfyUI: {e}")
|
| 34 |
+
|
| 35 |
print(f"--- Merging ComfyUI from '{COMFYUI_TEMP_DIR}' to '{APP_DIR}' ---")
|
| 36 |
for item in os.listdir(COMFYUI_TEMP_DIR):
|
| 37 |
src_path = os.path.join(COMFYUI_TEMP_DIR, item)
|
core/pipelines/pipeline_input_processor.py
CHANGED
|
@@ -184,55 +184,6 @@ def process_pipeline_inputs(ui_inputs: Dict[str, Any], progress: gr.Progress, wo
|
|
| 184 |
"image": os.path.basename(cn_temp_path), "strength": cn_strengths[i],
|
| 185 |
"start_percent": 0.0, "end_percent": 1.0, "control_net_name": cn_filepaths[i]
|
| 186 |
})
|
| 187 |
-
|
| 188 |
-
anima_controlnet_lllite_data = ui_inputs.get('anima_controlnet_lllite_data', [])
|
| 189 |
-
active_anima_controlnets = []
|
| 190 |
-
if 'anima_controlnet_lllite' in enabled_chains and anima_controlnet_lllite_data:
|
| 191 |
-
(cn_images, _, _, cn_strengths, cn_filepaths, cn_starts, cn_ends) = [anima_controlnet_lllite_data[i::7] for i in range(7)]
|
| 192 |
-
for i in range(len(cn_images)):
|
| 193 |
-
if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":
|
| 194 |
-
_ensure_model_downloaded(cn_filepaths[i], progress)
|
| 195 |
-
if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)
|
| 196 |
-
cn_temp_path = os.path.join(INPUT_DIR, f"temp_anima_cn_{i}_{random.randint(1000, 9999)}.png")
|
| 197 |
-
cn_images[i].save(cn_temp_path, "PNG")
|
| 198 |
-
temp_files_to_clean.append(cn_temp_path)
|
| 199 |
-
active_anima_controlnets.append({
|
| 200 |
-
"image": os.path.basename(cn_temp_path), "strength": cn_strengths[i],
|
| 201 |
-
"start_percent": cn_starts[i], "end_percent": cn_ends[i], "control_net_name": cn_filepaths[i]
|
| 202 |
-
})
|
| 203 |
-
|
| 204 |
-
diffsynth_controlnet_data = ui_inputs.get('diffsynth_controlnet_data', [])
|
| 205 |
-
active_diffsynth_controlnets = []
|
| 206 |
-
if 'diffsynth_controlnet' in enabled_chains and diffsynth_controlnet_data:
|
| 207 |
-
(cn_images, _, _, cn_strengths, cn_filepaths) = [diffsynth_controlnet_data[i::5] for i in range(5)]
|
| 208 |
-
for i in range(len(cn_images)):
|
| 209 |
-
if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":
|
| 210 |
-
ensure_controlnet_model_downloaded(cn_filepaths[i], progress)
|
| 211 |
-
if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)
|
| 212 |
-
cn_temp_path = os.path.join(INPUT_DIR, f"temp_diffsynth_cn_{i}_{random.randint(1000, 9999)}.png")
|
| 213 |
-
cn_images[i].save(cn_temp_path, "PNG")
|
| 214 |
-
temp_files_to_clean.append(cn_temp_path)
|
| 215 |
-
active_diffsynth_controlnets.append({
|
| 216 |
-
"image": os.path.basename(cn_temp_path), "strength": cn_strengths[i],
|
| 217 |
-
"control_net_name": cn_filepaths[i]
|
| 218 |
-
})
|
| 219 |
-
|
| 220 |
-
krea2_controlnet_data = ui_inputs.get('krea2_controlnet_data', [])
|
| 221 |
-
active_krea2_controlnets = []
|
| 222 |
-
if 'krea2_controlnet' in enabled_chains and krea2_controlnet_data:
|
| 223 |
-
(cn_images, _, _, cn_strengths, cn_filepaths) = [krea2_controlnet_data[i::5] for i in range(5)]
|
| 224 |
-
for i in range(len(cn_images)):
|
| 225 |
-
if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":
|
| 226 |
-
ensure_controlnet_model_downloaded(cn_filepaths[i], progress)
|
| 227 |
-
if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)
|
| 228 |
-
cn_temp_path = os.path.join(INPUT_DIR, f"temp_krea2_cn_{i}_{random.randint(1000, 9999)}.png")
|
| 229 |
-
cn_images[i].save(cn_temp_path, "PNG")
|
| 230 |
-
temp_files_to_clean.append(cn_temp_path)
|
| 231 |
-
active_krea2_controlnets.append({
|
| 232 |
-
"image": os.path.basename(cn_temp_path), "strength": cn_strengths[i],
|
| 233 |
-
"control_net_name": cn_filepaths[i]
|
| 234 |
-
})
|
| 235 |
-
|
| 236 |
ipadapter_data = ui_inputs.get('ipadapter_data', [])
|
| 237 |
active_ipadapters = []
|
| 238 |
if 'ipadapter' in enabled_chains and ipadapter_data:
|
|
@@ -483,9 +434,6 @@ def process_pipeline_inputs(ui_inputs: Dict[str, Any], progress: gr.Progress, wo
|
|
| 483 |
"active_loras_for_gpu": active_loras_for_gpu,
|
| 484 |
"active_loras_for_meta": active_loras_for_meta,
|
| 485 |
"active_controlnets": active_controlnets,
|
| 486 |
-
"active_anima_controlnets": active_anima_controlnets,
|
| 487 |
-
"active_diffsynth_controlnets": active_diffsynth_controlnets,
|
| 488 |
-
"active_krea2_controlnets": active_krea2_controlnets,
|
| 489 |
"active_ipadapters": active_ipadapters,
|
| 490 |
"active_flux1_ipadapters": active_flux1_ipadapters,
|
| 491 |
"active_sd3_ipadapters": active_sd3_ipadapters,
|
|
|
|
| 184 |
"image": os.path.basename(cn_temp_path), "strength": cn_strengths[i],
|
| 185 |
"start_percent": 0.0, "end_percent": 1.0, "control_net_name": cn_filepaths[i]
|
| 186 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
ipadapter_data = ui_inputs.get('ipadapter_data', [])
|
| 188 |
active_ipadapters = []
|
| 189 |
if 'ipadapter' in enabled_chains and ipadapter_data:
|
|
|
|
| 434 |
"active_loras_for_gpu": active_loras_for_gpu,
|
| 435 |
"active_loras_for_meta": active_loras_for_meta,
|
| 436 |
"active_controlnets": active_controlnets,
|
|
|
|
|
|
|
|
|
|
| 437 |
"active_ipadapters": active_ipadapters,
|
| 438 |
"active_flux1_ipadapters": active_flux1_ipadapters,
|
| 439 |
"active_sd3_ipadapters": active_sd3_ipadapters,
|
core/pipelines/sd_image_pipeline.py
CHANGED
|
@@ -106,9 +106,6 @@ class SdImagePipeline(BasePipeline):
|
|
| 106 |
active_loras_for_gpu = processed["active_loras_for_gpu"]
|
| 107 |
active_loras_for_meta = processed["active_loras_for_meta"]
|
| 108 |
active_controlnets = processed["active_controlnets"]
|
| 109 |
-
active_anima_controlnets = processed["active_anima_controlnets"]
|
| 110 |
-
active_diffsynth_controlnets = processed["active_diffsynth_controlnets"]
|
| 111 |
-
active_krea2_controlnets = processed.get("active_krea2_controlnets", [])
|
| 112 |
active_ipadapters = processed["active_ipadapters"]
|
| 113 |
active_flux1_ipadapters = processed["active_flux1_ipadapters"]
|
| 114 |
active_sd3_ipadapters = processed["active_sd3_ipadapters"]
|
|
@@ -167,10 +164,7 @@ class SdImagePipeline(BasePipeline):
|
|
| 167 |
"denoise": ui_inputs['denoise'],
|
| 168 |
"vae_name": ui_inputs.get('vae_name') if 'vae' in enabled_chains else None,
|
| 169 |
"lora_chain": active_loras_for_gpu,
|
| 170 |
-
"controlnet_chain": active_controlnets
|
| 171 |
-
"anima_controlnet_lllite_chain": active_anima_controlnets,
|
| 172 |
-
"diffsynth_controlnet_chain": active_diffsynth_controlnets,
|
| 173 |
-
"krea2_controlnet_chain": active_krea2_controlnets,
|
| 174 |
"ipadapter_chain": active_ipadapters,
|
| 175 |
"flux1_ipadapter_chain": active_flux1_ipadapters,
|
| 176 |
"sd3_ipadapter_chain": active_sd3_ipadapters,
|
|
|
|
| 106 |
active_loras_for_gpu = processed["active_loras_for_gpu"]
|
| 107 |
active_loras_for_meta = processed["active_loras_for_meta"]
|
| 108 |
active_controlnets = processed["active_controlnets"]
|
|
|
|
|
|
|
|
|
|
| 109 |
active_ipadapters = processed["active_ipadapters"]
|
| 110 |
active_flux1_ipadapters = processed["active_flux1_ipadapters"]
|
| 111 |
active_sd3_ipadapters = processed["active_sd3_ipadapters"]
|
|
|
|
| 164 |
"denoise": ui_inputs['denoise'],
|
| 165 |
"vae_name": ui_inputs.get('vae_name') if 'vae' in enabled_chains else None,
|
| 166 |
"lora_chain": active_loras_for_gpu,
|
| 167 |
+
"controlnet_chain": active_controlnets,
|
|
|
|
|
|
|
|
|
|
| 168 |
"ipadapter_chain": active_ipadapters,
|
| 169 |
"flux1_ipadapter_chain": active_flux1_ipadapters,
|
| 170 |
"sd3_ipadapter_chain": active_sd3_ipadapters,
|
core/pipelines/workflow_recipes/_partials/conditioning/anima-3.8b-v1.1.yaml
CHANGED
|
@@ -58,8 +58,9 @@ dynamic_lora_chains:
|
|
| 58 |
"model": ["ksampler:model", "pos_prompt:model", "neg_prompt:model"]
|
| 59 |
"clip": ["pos_prompt:native_clip", "neg_prompt:native_clip"]
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
|
|
|
| 63 |
ksampler_node: "ksampler"
|
| 64 |
|
| 65 |
dynamic_conditioning_chains:
|
|
|
|
| 58 |
"model": ["ksampler:model", "pos_prompt:model", "neg_prompt:model"]
|
| 59 |
"clip": ["pos_prompt:native_clip", "neg_prompt:native_clip"]
|
| 60 |
|
| 61 |
+
dynamic_controlnet_chains:
|
| 62 |
+
controlnet_chain:
|
| 63 |
+
template: "AnimaLLLiteApply"
|
| 64 |
ksampler_node: "ksampler"
|
| 65 |
|
| 66 |
dynamic_conditioning_chains:
|
core/pipelines/workflow_recipes/_partials/conditioning/anima-3.8b.yaml
CHANGED
|
@@ -59,8 +59,9 @@ dynamic_lora_chains:
|
|
| 59 |
"model": ["ksampler:model", "unified_prompt:model"]
|
| 60 |
"clip": ["unified_prompt:native_clip", "neg_prompt:clip"]
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
|
|
|
| 64 |
ksampler_node: "ksampler"
|
| 65 |
|
| 66 |
dynamic_conditioning_chains:
|
|
|
|
| 59 |
"model": ["ksampler:model", "unified_prompt:model"]
|
| 60 |
"clip": ["unified_prompt:native_clip", "neg_prompt:clip"]
|
| 61 |
|
| 62 |
+
dynamic_controlnet_chains:
|
| 63 |
+
controlnet_chain:
|
| 64 |
+
template: "AnimaLLLiteApply"
|
| 65 |
ksampler_node: "ksampler"
|
| 66 |
|
| 67 |
dynamic_conditioning_chains:
|
core/pipelines/workflow_recipes/_partials/conditioning/anima.yaml
CHANGED
|
@@ -49,8 +49,9 @@ dynamic_lora_chains:
|
|
| 49 |
"model": ["ksampler:model"]
|
| 50 |
"clip": ["pos_prompt:clip", "neg_prompt:clip"]
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
|
|
|
| 54 |
ksampler_node: "ksampler"
|
| 55 |
|
| 56 |
dynamic_conditioning_chains:
|
|
|
|
| 49 |
"model": ["ksampler:model"]
|
| 50 |
"clip": ["pos_prompt:clip", "neg_prompt:clip"]
|
| 51 |
|
| 52 |
+
dynamic_controlnet_chains:
|
| 53 |
+
controlnet_chain:
|
| 54 |
+
template: "AnimaLLLiteApply"
|
| 55 |
ksampler_node: "ksampler"
|
| 56 |
|
| 57 |
dynamic_conditioning_chains:
|
core/pipelines/workflow_recipes/_partials/conditioning/krea-2.yaml
CHANGED
|
@@ -49,8 +49,9 @@ dynamic_lora_chains:
|
|
| 49 |
"model": ["ksampler:model"]
|
| 50 |
"clip": ["pos_prompt:clip", "neg_prompt:clip"]
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
|
|
|
| 54 |
ksampler_node: "ksampler"
|
| 55 |
vae_source: "vae_loader:0"
|
| 56 |
|
|
|
|
| 49 |
"model": ["ksampler:model"]
|
| 50 |
"clip": ["pos_prompt:clip", "neg_prompt:clip"]
|
| 51 |
|
| 52 |
+
dynamic_controlnet_chains:
|
| 53 |
+
controlnet_chain:
|
| 54 |
+
template: "Krea2ControlApply"
|
| 55 |
ksampler_node: "ksampler"
|
| 56 |
vae_source: "vae_loader:0"
|
| 57 |
|
core/pipelines/workflow_recipes/_partials/conditioning/qwen-image-2.1.yaml
CHANGED
|
@@ -51,7 +51,7 @@ dynamic_lora_chains:
|
|
| 51 |
|
| 52 |
dynamic_controlnet_chains:
|
| 53 |
controlnet_chain:
|
| 54 |
-
template: "
|
| 55 |
ksampler_node: "ksampler"
|
| 56 |
vae_source: "vae_loader:0"
|
| 57 |
|
|
|
|
| 51 |
|
| 52 |
dynamic_controlnet_chains:
|
| 53 |
controlnet_chain:
|
| 54 |
+
template: "QwenImage21FunControlNetApply"
|
| 55 |
ksampler_node: "ksampler"
|
| 56 |
vae_source: "vae_loader:0"
|
| 57 |
|
core/pipelines/workflow_recipes/_partials/conditioning/sd15.yaml
CHANGED
|
@@ -50,6 +50,7 @@ dynamic_controlnet_chains:
|
|
| 50 |
template: "ControlNetApplyAdvanced"
|
| 51 |
ksampler_node: "ksampler"
|
| 52 |
vae_source: "ckpt_loader:2"
|
|
|
|
| 53 |
|
| 54 |
dynamic_ipadapter_chains:
|
| 55 |
ipadapter_chain:
|
|
|
|
| 50 |
template: "ControlNetApplyAdvanced"
|
| 51 |
ksampler_node: "ksampler"
|
| 52 |
vae_source: "ckpt_loader:2"
|
| 53 |
+
megapixels: 0.75
|
| 54 |
|
| 55 |
dynamic_ipadapter_chains:
|
| 56 |
ipadapter_chain:
|
core/pipelines/workflow_recipes/_partials/conditioning/z-image.yaml
CHANGED
|
@@ -58,8 +58,8 @@ dynamic_lora_chains:
|
|
| 58 |
"model": ["model_sampler:model"]
|
| 59 |
"clip": ["pos_prompt:clip", "neg_prompt:clip"]
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
template: "QwenImageDiffsynthControlnet"
|
| 64 |
model_sampler_node: "model_sampler"
|
| 65 |
ksampler_node: "ksampler"
|
|
|
|
| 58 |
"model": ["model_sampler:model"]
|
| 59 |
"clip": ["pos_prompt:clip", "neg_prompt:clip"]
|
| 60 |
|
| 61 |
+
dynamic_controlnet_chains:
|
| 62 |
+
controlnet_chain:
|
| 63 |
template: "QwenImageDiffsynthControlnet"
|
| 64 |
model_sampler_node: "model_sampler"
|
| 65 |
ksampler_node: "ksampler"
|
mcp_tools/common.py
CHANGED
|
@@ -421,7 +421,6 @@ def _execute_imagegen_pipeline(task_id: str, params: dict):
|
|
| 421 |
lora_data = []
|
| 422 |
embedding_data = []
|
| 423 |
controlnet_data = []
|
| 424 |
-
diffsynth_controlnet_data = []
|
| 425 |
ipadapter_data = []
|
| 426 |
ipadapter_images = []
|
| 427 |
ipadapter_weights = []
|
|
@@ -442,8 +441,6 @@ def _execute_imagegen_pipeline(task_id: str, params: dict):
|
|
| 442 |
style_strengths = []
|
| 443 |
krea2_identity_edit_data = []
|
| 444 |
krea2_reference_edit_data = []
|
| 445 |
-
krea2_controlnet_data = []
|
| 446 |
-
anima_controlnet_lllite_data = []
|
| 447 |
reference_latent_data = []
|
| 448 |
reference_image_data = []
|
| 449 |
joyai_reference_data = []
|
|
@@ -531,18 +528,18 @@ def _execute_imagegen_pipeline(task_id: str, params: dict):
|
|
| 531 |
cn_strength,
|
| 532 |
cn_filepath
|
| 533 |
])
|
| 534 |
-
elif itype
|
|
|
|
| 535 |
cn_type = item.get("type", item.get("Type", ""))
|
| 536 |
cn_series = item.get("series", item.get("Series", ""))
|
| 537 |
cn_strength = float(item.get("strength", 1.0))
|
| 538 |
-
cn_start = float(item.get("start_percent", 0.0))
|
| 539 |
-
cn_end = float(item.get("end_percent", 1.0))
|
| 540 |
cn_img = _parse_image_param(item.get("image"))
|
| 541 |
|
| 542 |
cn_filepath = item.get("control_net_name", "None")
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
|
|
|
|
| 546 |
entry_types = entry.get("Type", [])
|
| 547 |
if isinstance(entry_types, str):
|
| 548 |
entry_types = [entry_types]
|
|
@@ -555,68 +552,7 @@ def _execute_imagegen_pipeline(task_id: str, params: dict):
|
|
| 555 |
cn_type = entry_types[0]
|
| 556 |
break
|
| 557 |
|
| 558 |
-
|
| 559 |
-
cn_img,
|
| 560 |
-
cn_type,
|
| 561 |
-
cn_series,
|
| 562 |
-
cn_strength,
|
| 563 |
-
cn_filepath,
|
| 564 |
-
cn_start,
|
| 565 |
-
cn_end
|
| 566 |
-
])
|
| 567 |
-
elif itype == "diffsynth_controlnet":
|
| 568 |
-
cn_type = item.get("type", "")
|
| 569 |
-
cn_series = item.get("series", "")
|
| 570 |
-
cn_strength = float(item.get("strength", 1.0))
|
| 571 |
-
cn_img = _parse_image_param(item.get("image"))
|
| 572 |
-
|
| 573 |
-
cn_filepath = "None"
|
| 574 |
-
diffsynth_raw = _load_yaml(os.path.join(_YAML_DIR, "diffsynth_controlnet_models.yaml")).get("DiffSynth_ControlNet", {})
|
| 575 |
-
diffsynth_entries = []
|
| 576 |
-
if isinstance(diffsynth_raw, dict):
|
| 577 |
-
for val in diffsynth_raw.values():
|
| 578 |
-
if isinstance(val, list):
|
| 579 |
-
diffsynth_entries.extend(val)
|
| 580 |
-
elif isinstance(val, dict):
|
| 581 |
-
diffsynth_entries.append(val)
|
| 582 |
-
elif isinstance(diffsynth_raw, list):
|
| 583 |
-
diffsynth_entries = diffsynth_raw
|
| 584 |
-
|
| 585 |
-
if diffsynth_entries:
|
| 586 |
-
for entry in diffsynth_entries:
|
| 587 |
-
if not cn_type or cn_type in entry.get("Type", []):
|
| 588 |
-
if not cn_series or entry.get("Series") == cn_series:
|
| 589 |
-
cn_filepath = entry.get("Filepath", cn_filepath)
|
| 590 |
-
if not cn_series:
|
| 591 |
-
cn_series = entry.get("Series", cn_series)
|
| 592 |
-
if not cn_type and entry.get("Type"):
|
| 593 |
-
cn_type = entry.get("Type")[0]
|
| 594 |
-
break
|
| 595 |
-
|
| 596 |
-
diffsynth_controlnet_data.extend([
|
| 597 |
-
cn_img,
|
| 598 |
-
cn_type,
|
| 599 |
-
cn_series,
|
| 600 |
-
cn_strength,
|
| 601 |
-
cn_filepath
|
| 602 |
-
])
|
| 603 |
-
elif itype == "krea2_controlnet":
|
| 604 |
-
cn_type = item.get("type", "Depth")
|
| 605 |
-
cn_series = item.get("series", "Patil")
|
| 606 |
-
cn_strength = float(item.get("strength", 1.0))
|
| 607 |
-
cn_img = _parse_image_param(item.get("image"))
|
| 608 |
-
|
| 609 |
-
cn_filepath = "depth-control-lora.safetensors"
|
| 610 |
-
krea2_cfg = _load_yaml(os.path.join(_YAML_DIR, "krea2_controlnet_models.yaml")).get("Krea2_ControlNet", [])
|
| 611 |
-
if krea2_cfg:
|
| 612 |
-
for entry in krea2_cfg:
|
| 613 |
-
if cn_type in entry.get("Type", []):
|
| 614 |
-
if not cn_series or entry.get("Series") == cn_series:
|
| 615 |
-
cn_filepath = entry.get("Filepath", cn_filepath)
|
| 616 |
-
cn_series = entry.get("Series", cn_series)
|
| 617 |
-
break
|
| 618 |
-
|
| 619 |
-
krea2_controlnet_data.extend([
|
| 620 |
cn_img,
|
| 621 |
cn_type,
|
| 622 |
cn_series,
|
|
@@ -734,9 +670,7 @@ def _execute_imagegen_pipeline(task_id: str, params: dict):
|
|
| 734 |
if lora_data: ui_inputs["lora_data"] = lora_data
|
| 735 |
if embedding_data: ui_inputs["embedding_data"] = embedding_data
|
| 736 |
if controlnet_data: ui_inputs["controlnet_data"] = controlnet_data
|
| 737 |
-
|
| 738 |
-
if diffsynth_controlnet_data: ui_inputs["diffsynth_controlnet_data"] = diffsynth_controlnet_data
|
| 739 |
-
if krea2_controlnet_data: ui_inputs["krea2_controlnet_data"] = krea2_controlnet_data
|
| 740 |
if ipadapter_images:
|
| 741 |
preset = ipadapter_global_preset or "STANDARD (medium strength)"
|
| 742 |
embeds_scaling = ipadapter_global_embeds_scaling or "V only"
|
|
|
|
| 421 |
lora_data = []
|
| 422 |
embedding_data = []
|
| 423 |
controlnet_data = []
|
|
|
|
| 424 |
ipadapter_data = []
|
| 425 |
ipadapter_images = []
|
| 426 |
ipadapter_weights = []
|
|
|
|
| 441 |
style_strengths = []
|
| 442 |
krea2_identity_edit_data = []
|
| 443 |
krea2_reference_edit_data = []
|
|
|
|
|
|
|
| 444 |
reference_latent_data = []
|
| 445 |
reference_image_data = []
|
| 446 |
joyai_reference_data = []
|
|
|
|
| 528 |
cn_strength,
|
| 529 |
cn_filepath
|
| 530 |
])
|
| 531 |
+
elif itype in ("anima_controlnet_lllite", "diffsynth_controlnet", "krea2_controlnet"):
|
| 532 |
+
arch_key = "Anima" if itype == "anima_controlnet_lllite" else ("Z-Image" if itype == "diffsynth_controlnet" else "Krea-2")
|
| 533 |
cn_type = item.get("type", item.get("Type", ""))
|
| 534 |
cn_series = item.get("series", item.get("Series", ""))
|
| 535 |
cn_strength = float(item.get("strength", 1.0))
|
|
|
|
|
|
|
| 536 |
cn_img = _parse_image_param(item.get("image"))
|
| 537 |
|
| 538 |
cn_filepath = item.get("control_net_name", "None")
|
| 539 |
+
cn_all = _load_yaml(os.path.join(_YAML_DIR, "controlnet_models.yaml")).get("ControlNet", {})
|
| 540 |
+
legacy_cfg = cn_all.get(arch_key, [])
|
| 541 |
+
if legacy_cfg:
|
| 542 |
+
for entry in legacy_cfg:
|
| 543 |
entry_types = entry.get("Type", [])
|
| 544 |
if isinstance(entry_types, str):
|
| 545 |
entry_types = [entry_types]
|
|
|
|
| 552 |
cn_type = entry_types[0]
|
| 553 |
break
|
| 554 |
|
| 555 |
+
controlnet_data.extend([
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 556 |
cn_img,
|
| 557 |
cn_type,
|
| 558 |
cn_series,
|
|
|
|
| 670 |
if lora_data: ui_inputs["lora_data"] = lora_data
|
| 671 |
if embedding_data: ui_inputs["embedding_data"] = embedding_data
|
| 672 |
if controlnet_data: ui_inputs["controlnet_data"] = controlnet_data
|
| 673 |
+
|
|
|
|
|
|
|
| 674 |
if ipadapter_images:
|
| 675 |
preset = ipadapter_global_preset or "STANDARD (medium strength)"
|
| 676 |
embeds_scaling = ipadapter_global_embeds_scaling or "V only"
|
mcp_tools/get_feature_list.py
CHANGED
|
@@ -22,11 +22,11 @@ def _get_default_example_chain_item(chain_name: str, chain_data: dict) -> dict:
|
|
| 22 |
"weight": 1.0,
|
| 23 |
"preset": "STANDARD (medium strength)",
|
| 24 |
}
|
| 25 |
-
elif chain_name
|
| 26 |
return {
|
| 27 |
-
"injector_type":
|
| 28 |
"type": "Depth",
|
| 29 |
-
"series": "SDXL"
|
| 30 |
"image": "https://example.com/control_depth_map.png",
|
| 31 |
"strength": 1.0,
|
| 32 |
}
|
|
@@ -122,14 +122,9 @@ def _build_feature_entry(chain_name: str, chain_data: dict, task_features: dict
|
|
| 122 |
}
|
| 123 |
if include_schema:
|
| 124 |
schema = deepcopy(chain_data.get("parameters_schema", {}))
|
| 125 |
-
if chain_name
|
| 126 |
-
config_key =
|
| 127 |
-
|
| 128 |
-
else "DiffSynth_ControlNet" if chain_name == "diffsynth_controlnet"
|
| 129 |
-
else "Anima_ControlNet_Lllite" if chain_name == "anima_controlnet_lllite"
|
| 130 |
-
else "ControlNet"
|
| 131 |
-
)
|
| 132 |
-
yaml_filename = f"{chain_name}_models.yaml"
|
| 133 |
model_path = os.path.join(_YAML_DIR, yaml_filename)
|
| 134 |
raw_models = _load_yaml(model_path).get(config_key, [])
|
| 135 |
models_list = []
|
|
|
|
| 22 |
"weight": 1.0,
|
| 23 |
"preset": "STANDARD (medium strength)",
|
| 24 |
}
|
| 25 |
+
elif chain_name == "controlnet":
|
| 26 |
return {
|
| 27 |
+
"injector_type": "controlnet",
|
| 28 |
"type": "Depth",
|
| 29 |
+
"series": "SDXL",
|
| 30 |
"image": "https://example.com/control_depth_map.png",
|
| 31 |
"strength": 1.0,
|
| 32 |
}
|
|
|
|
| 122 |
}
|
| 123 |
if include_schema:
|
| 124 |
schema = deepcopy(chain_data.get("parameters_schema", {}))
|
| 125 |
+
if chain_name == "controlnet":
|
| 126 |
+
config_key = "ControlNet"
|
| 127 |
+
yaml_filename = "controlnet_models.yaml"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
model_path = os.path.join(_YAML_DIR, yaml_filename)
|
| 129 |
raw_models = _load_yaml(model_path).get(config_key, [])
|
| 130 |
models_list = []
|
ui/events/__init__.py
CHANGED
|
@@ -2,11 +2,5 @@ from .main import attach_event_handlers
|
|
| 2 |
from .config_loaders import (
|
| 3 |
load_controlnet_config,
|
| 4 |
get_cn_defaults,
|
| 5 |
-
load_anima_controlnet_lllite_config,
|
| 6 |
-
get_anima_cn_defaults,
|
| 7 |
-
load_diffsynth_controlnet_config,
|
| 8 |
-
get_diffsynth_cn_defaults,
|
| 9 |
-
load_krea2_controlnet_config,
|
| 10 |
-
get_krea2_cn_defaults,
|
| 11 |
load_ipadapter_config
|
| 12 |
)
|
|
|
|
| 2 |
from .config_loaders import (
|
| 3 |
load_controlnet_config,
|
| 4 |
get_cn_defaults,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
load_ipadapter_config
|
| 6 |
)
|
ui/events/chain_handlers.py
CHANGED
|
@@ -10,9 +10,6 @@ from ui.shared.ui_components import (
|
|
| 10 |
)
|
| 11 |
from .config_loaders import (
|
| 12 |
load_controlnet_config,
|
| 13 |
-
load_anima_controlnet_lllite_config,
|
| 14 |
-
load_diffsynth_controlnet_config,
|
| 15 |
-
load_krea2_controlnet_config,
|
| 16 |
load_ipadapter_config
|
| 17 |
)
|
| 18 |
|
|
@@ -201,302 +198,6 @@ def create_controlnet_event_handlers(prefix, ui_components):
|
|
| 201 |
)
|
| 202 |
|
| 203 |
|
| 204 |
-
def create_krea2_controlnet_event_handlers(prefix, ui_components):
|
| 205 |
-
cn_rows = ui_components.get(f'krea2_controlnet_rows_{prefix}')
|
| 206 |
-
if not cn_rows: return
|
| 207 |
-
cn_types = ui_components[f'krea2_controlnet_types_{prefix}']
|
| 208 |
-
cn_series = ui_components[f'krea2_controlnet_series_{prefix}']
|
| 209 |
-
cn_filepaths = ui_components[f'krea2_controlnet_filepaths_{prefix}']
|
| 210 |
-
cn_images = ui_components[f'krea2_controlnet_images_{prefix}']
|
| 211 |
-
cn_strengths = ui_components[f'krea2_controlnet_strengths_{prefix}']
|
| 212 |
-
|
| 213 |
-
count_state = ui_components[f'krea2_controlnet_count_state_{prefix}']
|
| 214 |
-
add_button = ui_components[f'add_krea2_controlnet_button_{prefix}']
|
| 215 |
-
del_button = ui_components[f'delete_krea2_controlnet_button_{prefix}']
|
| 216 |
-
accordion = ui_components[f'krea2_controlnet_accordion_{prefix}']
|
| 217 |
-
|
| 218 |
-
def add_cn_row(c):
|
| 219 |
-
c += 1
|
| 220 |
-
updates = {
|
| 221 |
-
count_state: c,
|
| 222 |
-
cn_rows[c-1]: gr.update(visible=True),
|
| 223 |
-
add_button: gr.update(visible=c < MAX_CONTROLNETS),
|
| 224 |
-
del_button: gr.update(visible=True)
|
| 225 |
-
}
|
| 226 |
-
return updates
|
| 227 |
-
|
| 228 |
-
def del_cn_row(c):
|
| 229 |
-
c -= 1
|
| 230 |
-
updates = {
|
| 231 |
-
count_state: c,
|
| 232 |
-
cn_rows[c]: gr.update(visible=False),
|
| 233 |
-
cn_images[c]: None,
|
| 234 |
-
cn_strengths[c]: 1.0,
|
| 235 |
-
add_button: gr.update(visible=True),
|
| 236 |
-
del_button: gr.update(visible=c > 0)
|
| 237 |
-
}
|
| 238 |
-
return updates
|
| 239 |
-
|
| 240 |
-
add_outputs = [count_state, add_button, del_button] + cn_rows
|
| 241 |
-
del_outputs = [count_state, add_button, del_button] + cn_rows + cn_images + cn_strengths
|
| 242 |
-
add_button.click(fn=add_cn_row, inputs=[count_state], outputs=add_outputs, show_progress=False)
|
| 243 |
-
del_button.click(fn=del_cn_row, inputs=[count_state], outputs=del_outputs, show_progress=False)
|
| 244 |
-
|
| 245 |
-
def on_cn_type_change(selected_type):
|
| 246 |
-
cn_config = load_krea2_controlnet_config()
|
| 247 |
-
series_choices = []
|
| 248 |
-
if selected_type:
|
| 249 |
-
series_choices = sorted(list(set(
|
| 250 |
-
model.get("Series", "Default") for model in cn_config
|
| 251 |
-
if selected_type in model.get("Type", [])
|
| 252 |
-
)))
|
| 253 |
-
default_series = series_choices[0] if series_choices else None
|
| 254 |
-
filepath = "None"
|
| 255 |
-
if default_series:
|
| 256 |
-
for model in cn_config:
|
| 257 |
-
if model.get("Series") == default_series and selected_type in model.get("Type", []):
|
| 258 |
-
filepath = model.get("Filepath")
|
| 259 |
-
break
|
| 260 |
-
return gr.update(choices=series_choices, value=default_series), filepath
|
| 261 |
-
|
| 262 |
-
def on_cn_series_change(selected_series, selected_type):
|
| 263 |
-
cn_config = load_krea2_controlnet_config()
|
| 264 |
-
filepath = "None"
|
| 265 |
-
if selected_series and selected_type:
|
| 266 |
-
for model in cn_config:
|
| 267 |
-
if model.get("Series") == selected_series and selected_type in model.get("Type", []):
|
| 268 |
-
filepath = model.get("Filepath")
|
| 269 |
-
break
|
| 270 |
-
return filepath
|
| 271 |
-
|
| 272 |
-
for i in range(MAX_CONTROLNETS):
|
| 273 |
-
cn_types[i].change(
|
| 274 |
-
fn=on_cn_type_change,
|
| 275 |
-
inputs=[cn_types[i]],
|
| 276 |
-
outputs=[cn_series[i], cn_filepaths[i]],
|
| 277 |
-
show_progress=False
|
| 278 |
-
)
|
| 279 |
-
cn_series[i].change(
|
| 280 |
-
fn=on_cn_series_change,
|
| 281 |
-
inputs=[cn_series[i], cn_types[i]],
|
| 282 |
-
outputs=[cn_filepaths[i]],
|
| 283 |
-
show_progress=False
|
| 284 |
-
)
|
| 285 |
-
|
| 286 |
-
def on_accordion_expand(*images):
|
| 287 |
-
return [gr.update() for _ in images]
|
| 288 |
-
|
| 289 |
-
accordion.expand(
|
| 290 |
-
fn=on_accordion_expand,
|
| 291 |
-
inputs=cn_images,
|
| 292 |
-
outputs=cn_images,
|
| 293 |
-
show_progress=False
|
| 294 |
-
)
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
def create_anima_controlnet_lllite_event_handlers(prefix, ui_components):
|
| 298 |
-
cn_rows = ui_components.get(f'anima_controlnet_lllite_rows_{prefix}')
|
| 299 |
-
if not cn_rows: return
|
| 300 |
-
cn_types = ui_components[f'anima_controlnet_lllite_types_{prefix}']
|
| 301 |
-
cn_series = ui_components[f'anima_controlnet_lllite_series_{prefix}']
|
| 302 |
-
cn_filepaths = ui_components[f'anima_controlnet_lllite_filepaths_{prefix}']
|
| 303 |
-
cn_images = ui_components[f'anima_controlnet_lllite_images_{prefix}']
|
| 304 |
-
cn_strengths = ui_components[f'anima_controlnet_lllite_strengths_{prefix}']
|
| 305 |
-
|
| 306 |
-
count_state = ui_components[f'anima_controlnet_lllite_count_state_{prefix}']
|
| 307 |
-
add_button = ui_components[f'add_anima_controlnet_lllite_button_{prefix}']
|
| 308 |
-
del_button = ui_components[f'delete_anima_controlnet_lllite_button_{prefix}']
|
| 309 |
-
accordion = ui_components[f'anima_controlnet_lllite_accordion_{prefix}']
|
| 310 |
-
|
| 311 |
-
def add_cn_row(c):
|
| 312 |
-
c += 1
|
| 313 |
-
updates = {
|
| 314 |
-
count_state: c,
|
| 315 |
-
cn_rows[c-1]: gr.update(visible=True),
|
| 316 |
-
add_button: gr.update(visible=c < MAX_CONTROLNETS),
|
| 317 |
-
del_button: gr.update(visible=True)
|
| 318 |
-
}
|
| 319 |
-
return updates
|
| 320 |
-
|
| 321 |
-
def del_cn_row(c):
|
| 322 |
-
c -= 1
|
| 323 |
-
updates = {
|
| 324 |
-
count_state: c,
|
| 325 |
-
cn_rows[c]: gr.update(visible=False),
|
| 326 |
-
cn_images[c]: None,
|
| 327 |
-
cn_strengths[c]: 1.0,
|
| 328 |
-
add_button: gr.update(visible=True),
|
| 329 |
-
del_button: gr.update(visible=c > 0)
|
| 330 |
-
}
|
| 331 |
-
return updates
|
| 332 |
-
|
| 333 |
-
add_outputs = [count_state, add_button, del_button] + cn_rows
|
| 334 |
-
del_outputs = [count_state, add_button, del_button] + cn_rows + cn_images + cn_strengths
|
| 335 |
-
add_button.click(fn=add_cn_row, inputs=[count_state], outputs=add_outputs, show_progress=False)
|
| 336 |
-
del_button.click(fn=del_cn_row, inputs=[count_state], outputs=del_outputs, show_progress=False)
|
| 337 |
-
|
| 338 |
-
def on_cn_type_change(selected_type):
|
| 339 |
-
cn_config = load_anima_controlnet_lllite_config()
|
| 340 |
-
series_choices = []
|
| 341 |
-
if selected_type:
|
| 342 |
-
series_choices = sorted(list(set(
|
| 343 |
-
model.get("Series", "Default") for model in cn_config
|
| 344 |
-
if selected_type in model.get("Type", [])
|
| 345 |
-
)))
|
| 346 |
-
default_series = series_choices[0] if series_choices else None
|
| 347 |
-
filepath = "None"
|
| 348 |
-
if default_series:
|
| 349 |
-
for model in cn_config:
|
| 350 |
-
if model.get("Series") == default_series and selected_type in model.get("Type", []):
|
| 351 |
-
filepath = model.get("Filepath")
|
| 352 |
-
break
|
| 353 |
-
return gr.update(choices=series_choices, value=default_series), filepath
|
| 354 |
-
|
| 355 |
-
def on_cn_series_change(selected_series, selected_type):
|
| 356 |
-
cn_config = load_anima_controlnet_lllite_config()
|
| 357 |
-
filepath = "None"
|
| 358 |
-
if selected_series and selected_type:
|
| 359 |
-
for model in cn_config:
|
| 360 |
-
if model.get("Series") == selected_series and selected_type in model.get("Type", []):
|
| 361 |
-
filepath = model.get("Filepath")
|
| 362 |
-
break
|
| 363 |
-
return filepath
|
| 364 |
-
|
| 365 |
-
for i in range(MAX_CONTROLNETS):
|
| 366 |
-
cn_types[i].change(
|
| 367 |
-
fn=on_cn_type_change,
|
| 368 |
-
inputs=[cn_types[i]],
|
| 369 |
-
outputs=[cn_series[i], cn_filepaths[i]],
|
| 370 |
-
show_progress=False
|
| 371 |
-
)
|
| 372 |
-
cn_series[i].change(
|
| 373 |
-
fn=on_cn_series_change,
|
| 374 |
-
inputs=[cn_series[i], cn_types[i]],
|
| 375 |
-
outputs=[cn_filepaths[i]],
|
| 376 |
-
show_progress=False
|
| 377 |
-
)
|
| 378 |
-
|
| 379 |
-
def on_accordion_expand(*images):
|
| 380 |
-
return [gr.update() for _ in images]
|
| 381 |
-
|
| 382 |
-
accordion.expand(
|
| 383 |
-
fn=on_accordion_expand,
|
| 384 |
-
inputs=cn_images,
|
| 385 |
-
outputs=cn_images,
|
| 386 |
-
show_progress=False
|
| 387 |
-
)
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
def create_diffsynth_controlnet_event_handlers(prefix, ui_components):
|
| 391 |
-
cn_rows = ui_components.get(f'diffsynth_controlnet_rows_{prefix}')
|
| 392 |
-
if not cn_rows: return
|
| 393 |
-
cn_types = ui_components[f'diffsynth_controlnet_types_{prefix}']
|
| 394 |
-
cn_series = ui_components[f'diffsynth_controlnet_series_{prefix}']
|
| 395 |
-
cn_filepaths = ui_components[f'diffsynth_controlnet_filepaths_{prefix}']
|
| 396 |
-
cn_images = ui_components[f'diffsynth_controlnet_images_{prefix}']
|
| 397 |
-
cn_strengths = ui_components[f'diffsynth_controlnet_strengths_{prefix}']
|
| 398 |
-
|
| 399 |
-
count_state = ui_components[f'diffsynth_controlnet_count_state_{prefix}']
|
| 400 |
-
add_button = ui_components[f'add_diffsynth_controlnet_button_{prefix}']
|
| 401 |
-
del_button = ui_components[f'delete_diffsynth_controlnet_button_{prefix}']
|
| 402 |
-
accordion = ui_components[f'diffsynth_controlnet_accordion_{prefix}']
|
| 403 |
-
|
| 404 |
-
base_model_comp = ui_components.get(f'base_model_{prefix}')
|
| 405 |
-
actual_arch_comp = base_model_comp if base_model_comp else gr.State("SDXL")
|
| 406 |
-
|
| 407 |
-
def add_cn_row(c):
|
| 408 |
-
c += 1
|
| 409 |
-
updates = {
|
| 410 |
-
count_state: c,
|
| 411 |
-
cn_rows[c-1]: gr.update(visible=True),
|
| 412 |
-
add_button: gr.update(visible=c < MAX_CONTROLNETS),
|
| 413 |
-
del_button: gr.update(visible=True)
|
| 414 |
-
}
|
| 415 |
-
return updates
|
| 416 |
-
|
| 417 |
-
def del_cn_row(c):
|
| 418 |
-
c -= 1
|
| 419 |
-
updates = {
|
| 420 |
-
count_state: c,
|
| 421 |
-
cn_rows[c]: gr.update(visible=False),
|
| 422 |
-
cn_images[c]: None,
|
| 423 |
-
cn_strengths[c]: 1.0,
|
| 424 |
-
add_button: gr.update(visible=True),
|
| 425 |
-
del_button: gr.update(visible=c > 0)
|
| 426 |
-
}
|
| 427 |
-
return updates
|
| 428 |
-
|
| 429 |
-
add_outputs = [count_state, add_button, del_button] + cn_rows
|
| 430 |
-
del_outputs = [count_state, add_button, del_button] + cn_rows + cn_images + cn_strengths
|
| 431 |
-
add_button.click(fn=add_cn_row, inputs=[count_state], outputs=add_outputs, show_progress=False)
|
| 432 |
-
del_button.click(fn=del_cn_row, inputs=[count_state], outputs=del_outputs, show_progress=False)
|
| 433 |
-
|
| 434 |
-
def on_cn_type_change(selected_type, model_name):
|
| 435 |
-
from core.settings import MODEL_TYPE_MAP
|
| 436 |
-
m_type = MODEL_TYPE_MAP.get(model_name, "SDXL") if model_name else "SDXL"
|
| 437 |
-
cn_full_config = load_diffsynth_controlnet_config()
|
| 438 |
-
|
| 439 |
-
architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})
|
| 440 |
-
controlnet_key = architectures_dict.get(m_type, {}).get("controlnet_key", m_type)
|
| 441 |
-
|
| 442 |
-
cn_config = cn_full_config.get(controlnet_key, [])
|
| 443 |
-
series_choices = []
|
| 444 |
-
if selected_type:
|
| 445 |
-
series_choices = sorted(list(set(
|
| 446 |
-
model.get("Series", "Default") for model in cn_config
|
| 447 |
-
if selected_type in model.get("Type", [])
|
| 448 |
-
)))
|
| 449 |
-
default_series = series_choices[0] if series_choices else None
|
| 450 |
-
filepath = "None"
|
| 451 |
-
if default_series:
|
| 452 |
-
for model in cn_config:
|
| 453 |
-
if model.get("Series") == default_series and selected_type in model.get("Type", []):
|
| 454 |
-
filepath = model.get("Filepath")
|
| 455 |
-
break
|
| 456 |
-
return gr.update(choices=series_choices, value=default_series), filepath
|
| 457 |
-
|
| 458 |
-
def on_cn_series_change(selected_series, selected_type, model_name):
|
| 459 |
-
from core.settings import MODEL_TYPE_MAP
|
| 460 |
-
m_type = MODEL_TYPE_MAP.get(model_name, "SDXL") if model_name else "SDXL"
|
| 461 |
-
cn_full_config = load_diffsynth_controlnet_config()
|
| 462 |
-
|
| 463 |
-
architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})
|
| 464 |
-
controlnet_key = architectures_dict.get(m_type, {}).get("controlnet_key", m_type)
|
| 465 |
-
|
| 466 |
-
cn_config = cn_full_config.get(controlnet_key, [])
|
| 467 |
-
filepath = "None"
|
| 468 |
-
if selected_series and selected_type:
|
| 469 |
-
for model in cn_config:
|
| 470 |
-
if model.get("Series") == selected_series and selected_type in model.get("Type", []):
|
| 471 |
-
filepath = model.get("Filepath")
|
| 472 |
-
break
|
| 473 |
-
return filepath
|
| 474 |
-
|
| 475 |
-
for i in range(MAX_CONTROLNETS):
|
| 476 |
-
cn_types[i].change(
|
| 477 |
-
fn=on_cn_type_change,
|
| 478 |
-
inputs=[cn_types[i], actual_arch_comp],
|
| 479 |
-
outputs=[cn_series[i], cn_filepaths[i]],
|
| 480 |
-
show_progress=False
|
| 481 |
-
)
|
| 482 |
-
cn_series[i].change(
|
| 483 |
-
fn=on_cn_series_change,
|
| 484 |
-
inputs=[cn_series[i], cn_types[i], actual_arch_comp],
|
| 485 |
-
outputs=[cn_filepaths[i]],
|
| 486 |
-
show_progress=False
|
| 487 |
-
)
|
| 488 |
-
|
| 489 |
-
def on_accordion_expand(*images):
|
| 490 |
-
return [gr.update() for _ in images]
|
| 491 |
-
|
| 492 |
-
accordion.expand(
|
| 493 |
-
fn=on_accordion_expand,
|
| 494 |
-
inputs=cn_images,
|
| 495 |
-
outputs=cn_images,
|
| 496 |
-
show_progress=False
|
| 497 |
-
)
|
| 498 |
-
|
| 499 |
-
|
| 500 |
def create_flux1_ipadapter_event_handlers(prefix, ui_components):
|
| 501 |
fipa_rows = ui_components.get(f'flux1_ipadapter_rows_{prefix}')
|
| 502 |
if not fipa_rows: return
|
|
|
|
| 10 |
)
|
| 11 |
from .config_loaders import (
|
| 12 |
load_controlnet_config,
|
|
|
|
|
|
|
|
|
|
| 13 |
load_ipadapter_config
|
| 14 |
)
|
| 15 |
|
|
|
|
| 198 |
)
|
| 199 |
|
| 200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
def create_flux1_ipadapter_event_handlers(prefix, ui_components):
|
| 202 |
fipa_rows = ui_components.get(f'flux1_ipadapter_rows_{prefix}')
|
| 203 |
if not fipa_rows: return
|
ui/events/change_handlers.py
CHANGED
|
@@ -12,13 +12,10 @@ from utils.app_utils import get_model_generation_defaults
|
|
| 12 |
from ui.shared.ui_components import RESOLUTION_MAP
|
| 13 |
from .config_loaders import (
|
| 14 |
get_cn_defaults,
|
| 15 |
-
get_anima_cn_defaults,
|
| 16 |
-
get_diffsynth_cn_defaults,
|
| 17 |
-
get_krea2_cn_defaults,
|
| 18 |
load_ipadapter_config
|
| 19 |
)
|
| 20 |
|
| 21 |
-
def make_update_fn(m_comp, cat_comp, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths,
|
| 22 |
def update_fn(*args):
|
| 23 |
arch = args[0]
|
| 24 |
category = args[1]
|
|
@@ -71,9 +68,6 @@ def make_update_fn(m_comp, cat_comp, ar_comp, width_comp, height_comp, cn_types,
|
|
| 71 |
|
| 72 |
if lora_acc: updates[lora_acc] = gr.update(visible=('lora' in enabled_chains))
|
| 73 |
if cn_acc: updates[cn_acc] = gr.update(visible=('controlnet' in enabled_chains))
|
| 74 |
-
if anima_cn_acc: updates[anima_cn_acc] = gr.update(visible=('anima_controlnet_lllite' in enabled_chains))
|
| 75 |
-
if diffsynth_cn_acc: updates[diffsynth_cn_acc] = gr.update(visible=('diffsynth_controlnet' in enabled_chains))
|
| 76 |
-
if krea2_cn_acc: updates[krea2_cn_acc] = gr.update(visible=('krea2_controlnet' in enabled_chains))
|
| 77 |
if ipa_acc: updates[ipa_acc] = gr.update(visible=('ipadapter' in enabled_chains))
|
| 78 |
if flux1_ipa_acc: updates[flux1_ipa_acc] = gr.update(visible=('flux1_ipadapter' in enabled_chains))
|
| 79 |
if sd3_ipa_acc: updates[sd3_ipa_acc] = gr.update(visible=('sd3_ipadapter' in enabled_chains))
|
|
@@ -114,29 +108,6 @@ def make_update_fn(m_comp, cat_comp, ar_comp, width_comp, height_comp, cn_types,
|
|
| 114 |
for f_comp in cn_filepaths:
|
| 115 |
updates[f_comp] = filepath
|
| 116 |
|
| 117 |
-
anima_all_types, anima_default_type, anima_series_choices, anima_default_series, anima_filepath = get_anima_cn_defaults()
|
| 118 |
-
for t_comp in anima_cn_types:
|
| 119 |
-
updates[t_comp] = gr.update(choices=anima_all_types, value=anima_default_type)
|
| 120 |
-
for s_comp in anima_cn_series:
|
| 121 |
-
updates[s_comp] = gr.update(choices=anima_series_choices, value=anima_default_series)
|
| 122 |
-
for f_comp in anima_cn_filepaths:
|
| 123 |
-
updates[f_comp] = anima_filepath
|
| 124 |
-
|
| 125 |
-
diffsynth_all_types, diffsynth_default_type, diffsynth_series_choices, diffsynth_default_series, diffsynth_filepath = get_diffsynth_cn_defaults(controlnet_key)
|
| 126 |
-
for t_comp in diffsynth_cn_types:
|
| 127 |
-
updates[t_comp] = gr.update(choices=diffsynth_all_types, value=diffsynth_default_type)
|
| 128 |
-
for s_comp in diffsynth_cn_series:
|
| 129 |
-
updates[s_comp] = gr.update(choices=diffsynth_series_choices, value=diffsynth_default_series)
|
| 130 |
-
for f_comp in diffsynth_cn_filepaths:
|
| 131 |
-
updates[f_comp] = diffsynth_filepath
|
| 132 |
-
|
| 133 |
-
krea2_all_types, krea2_default_type, krea2_series_choices, krea2_default_series, krea2_filepath = get_krea2_cn_defaults()
|
| 134 |
-
for t_comp in krea2_cn_types:
|
| 135 |
-
updates[t_comp] = gr.update(choices=krea2_all_types, value=krea2_default_type)
|
| 136 |
-
for s_comp in krea2_cn_series:
|
| 137 |
-
updates[s_comp] = gr.update(choices=krea2_series_choices, value=krea2_default_series)
|
| 138 |
-
for f_comp in krea2_cn_filepaths:
|
| 139 |
-
updates[f_comp] = krea2_filepath
|
| 140 |
|
| 141 |
if ipa_preset and (arch_model_type in ["sdxl", "sd15", "sd35"]):
|
| 142 |
config = load_ipadapter_config()
|
|
@@ -159,7 +130,7 @@ def make_update_fn(m_comp, cat_comp, ar_comp, width_comp, height_comp, cn_types,
|
|
| 159 |
return update_fn
|
| 160 |
|
| 161 |
|
| 162 |
-
def make_model_change_fn(cat_comp_ref, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths,
|
| 163 |
def change_fn(*args):
|
| 164 |
model_name = args[0]
|
| 165 |
idx = 1
|
|
@@ -220,9 +191,6 @@ def make_model_change_fn(cat_comp_ref, ar_comp, width_comp, height_comp, cn_type
|
|
| 220 |
|
| 221 |
if lora_acc: updates[lora_acc] = gr.update(visible=('lora' in enabled_chains))
|
| 222 |
if cn_acc: updates[cn_acc] = gr.update(visible=('controlnet' in enabled_chains))
|
| 223 |
-
if anima_cn_acc: updates[anima_cn_acc] = gr.update(visible=('anima_controlnet_lllite' in enabled_chains))
|
| 224 |
-
if diffsynth_cn_acc: updates[diffsynth_cn_acc] = gr.update(visible=('diffsynth_controlnet' in enabled_chains))
|
| 225 |
-
if krea2_cn_acc: updates[krea2_cn_acc] = gr.update(visible=('krea2_controlnet' in enabled_chains))
|
| 226 |
if ipa_acc: updates[ipa_acc] = gr.update(visible=('ipadapter' in enabled_chains))
|
| 227 |
if flux1_ipa_acc: updates[flux1_ipa_acc] = gr.update(visible=('flux1_ipadapter' in enabled_chains))
|
| 228 |
if sd3_ipa_acc: updates[sd3_ipa_acc] = gr.update(visible=('sd3_ipadapter' in enabled_chains))
|
|
@@ -262,30 +230,6 @@ def make_model_change_fn(cat_comp_ref, ar_comp, width_comp, height_comp, cn_type
|
|
| 262 |
updates[s_comp] = gr.update(choices=series_choices, value=default_series)
|
| 263 |
for f_comp in cn_filepaths:
|
| 264 |
updates[f_comp] = filepath
|
| 265 |
-
|
| 266 |
-
anima_all_types, anima_default_type, anima_series_choices, anima_default_series, anima_filepath = get_anima_cn_defaults()
|
| 267 |
-
for t_comp in anima_cn_types:
|
| 268 |
-
updates[t_comp] = gr.update(choices=anima_all_types, value=anima_default_type)
|
| 269 |
-
for s_comp in anima_cn_series:
|
| 270 |
-
updates[s_comp] = gr.update(choices=anima_series_choices, value=anima_default_series)
|
| 271 |
-
for f_comp in anima_cn_filepaths:
|
| 272 |
-
updates[f_comp] = anima_filepath
|
| 273 |
-
|
| 274 |
-
diffsynth_all_types, diffsynth_default_type, diffsynth_series_choices, diffsynth_default_series, diffsynth_filepath = get_diffsynth_cn_defaults(controlnet_key)
|
| 275 |
-
for t_comp in diffsynth_cn_types:
|
| 276 |
-
updates[t_comp] = gr.update(choices=diffsynth_all_types, value=diffsynth_default_type)
|
| 277 |
-
for s_comp in diffsynth_cn_series:
|
| 278 |
-
updates[s_comp] = gr.update(choices=diffsynth_series_choices, value=diffsynth_default_series)
|
| 279 |
-
for f_comp in diffsynth_cn_filepaths:
|
| 280 |
-
updates[f_comp] = diffsynth_filepath
|
| 281 |
-
|
| 282 |
-
krea2_all_types, krea2_default_type, krea2_series_choices, krea2_default_series, krea2_filepath = get_krea2_cn_defaults()
|
| 283 |
-
for t_comp in krea2_cn_types:
|
| 284 |
-
updates[t_comp] = gr.update(choices=krea2_all_types, value=krea2_default_type)
|
| 285 |
-
for s_comp in krea2_cn_series:
|
| 286 |
-
updates[s_comp] = gr.update(choices=krea2_series_choices, value=krea2_default_series)
|
| 287 |
-
for f_comp in krea2_cn_filepaths:
|
| 288 |
-
updates[f_comp] = krea2_filepath
|
| 289 |
|
| 290 |
if ipa_preset and (arch_model_type in ["sdxl", "sd15", "sd35"]):
|
| 291 |
config = load_ipadapter_config()
|
|
@@ -315,9 +259,6 @@ def initialize_all_cn_dropdowns(ui_components):
|
|
| 315 |
controlnet_key = architectures_dict.get(default_m_type, {}).get("controlnet_key", default_m_type)
|
| 316 |
|
| 317 |
all_types, default_type, series_choices, default_series, filepath = get_cn_defaults(controlnet_key)
|
| 318 |
-
anima_all_types, anima_default_type, anima_series_choices, anima_default_series, anima_filepath = get_anima_cn_defaults()
|
| 319 |
-
diffsynth_all_types, diffsynth_default_type, diffsynth_series_choices, diffsynth_default_series, diffsynth_filepath = get_diffsynth_cn_defaults(controlnet_key)
|
| 320 |
-
krea2_all_types, krea2_default_type, krea2_series_choices, krea2_default_series, krea2_filepath = get_krea2_cn_defaults()
|
| 321 |
|
| 322 |
updates = {}
|
| 323 |
for prefix in ["imagegen", "txt2img", "img2img", "inpaint", "outpaint", "hires_fix"]:
|
|
@@ -328,30 +269,6 @@ def initialize_all_cn_dropdowns(ui_components):
|
|
| 328 |
updates[series_dd] = gr.update(choices=series_choices, value=default_series)
|
| 329 |
for filepath_state in ui_components[f'controlnet_filepaths_{prefix}']:
|
| 330 |
updates[filepath_state] = filepath
|
| 331 |
-
|
| 332 |
-
if f'anima_controlnet_lllite_types_{prefix}' in ui_components:
|
| 333 |
-
for type_dd in ui_components[f'anima_controlnet_lllite_types_{prefix}']:
|
| 334 |
-
updates[type_dd] = gr.update(choices=anima_all_types, value=anima_default_type)
|
| 335 |
-
for series_dd in ui_components[f'anima_controlnet_lllite_series_{prefix}']:
|
| 336 |
-
updates[series_dd] = gr.update(choices=anima_series_choices, value=anima_default_series)
|
| 337 |
-
for filepath_state in ui_components[f'anima_controlnet_lllite_filepaths_{prefix}']:
|
| 338 |
-
updates[filepath_state] = anima_filepath
|
| 339 |
-
|
| 340 |
-
if f'diffsynth_controlnet_types_{prefix}' in ui_components:
|
| 341 |
-
for type_dd in ui_components[f'diffsynth_controlnet_types_{prefix}']:
|
| 342 |
-
updates[type_dd] = gr.update(choices=diffsynth_all_types, value=diffsynth_default_type)
|
| 343 |
-
for series_dd in ui_components[f'diffsynth_controlnet_series_{prefix}']:
|
| 344 |
-
updates[series_dd] = gr.update(choices=diffsynth_series_choices, value=default_series)
|
| 345 |
-
for filepath_state in ui_components[f'diffsynth_controlnet_filepaths_{prefix}']:
|
| 346 |
-
updates[filepath_state] = diffsynth_filepath
|
| 347 |
-
|
| 348 |
-
if f'krea2_controlnet_types_{prefix}' in ui_components:
|
| 349 |
-
for type_dd in ui_components[f'krea2_controlnet_types_{prefix}']:
|
| 350 |
-
updates[type_dd] = gr.update(choices=krea2_all_types, value=krea2_default_type)
|
| 351 |
-
for series_dd in ui_components[f'krea2_controlnet_series_{prefix}']:
|
| 352 |
-
updates[series_dd] = gr.update(choices=krea2_series_choices, value=krea2_default_series)
|
| 353 |
-
for filepath_state in ui_components[f'krea2_controlnet_filepaths_{prefix}']:
|
| 354 |
-
updates[filepath_state] = krea2_filepath
|
| 355 |
|
| 356 |
return updates
|
| 357 |
|
|
|
|
| 12 |
from ui.shared.ui_components import RESOLUTION_MAP
|
| 13 |
from .config_loaders import (
|
| 14 |
get_cn_defaults,
|
|
|
|
|
|
|
|
|
|
| 15 |
load_ipadapter_config
|
| 16 |
)
|
| 17 |
|
| 18 |
+
def make_update_fn(m_comp, cat_comp, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths, ipa_preset, lora_acc, cn_acc, ipa_acc, sd3_ipa_acc, flux1_ipa_acc, style_acc, embed_acc, cond_acc, ref_latent_acc, hidream_o1_ref_acc, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp, pid_acc=None, vae_acc=None, joyai_ref_acc=None, krea2_identity_edit_acc=None, krea2_reference_edit_acc=None, qwen_image_edit_acc=None, ref_img_acc=None, sensenova_ref_acc=None, task_type=None, type_comp=None, qwen_pe_acc=None, ming_pe_acc=None):
|
| 19 |
def update_fn(*args):
|
| 20 |
arch = args[0]
|
| 21 |
category = args[1]
|
|
|
|
| 68 |
|
| 69 |
if lora_acc: updates[lora_acc] = gr.update(visible=('lora' in enabled_chains))
|
| 70 |
if cn_acc: updates[cn_acc] = gr.update(visible=('controlnet' in enabled_chains))
|
|
|
|
|
|
|
|
|
|
| 71 |
if ipa_acc: updates[ipa_acc] = gr.update(visible=('ipadapter' in enabled_chains))
|
| 72 |
if flux1_ipa_acc: updates[flux1_ipa_acc] = gr.update(visible=('flux1_ipadapter' in enabled_chains))
|
| 73 |
if sd3_ipa_acc: updates[sd3_ipa_acc] = gr.update(visible=('sd3_ipadapter' in enabled_chains))
|
|
|
|
| 108 |
for f_comp in cn_filepaths:
|
| 109 |
updates[f_comp] = filepath
|
| 110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
if ipa_preset and (arch_model_type in ["sdxl", "sd15", "sd35"]):
|
| 113 |
config = load_ipadapter_config()
|
|
|
|
| 130 |
return update_fn
|
| 131 |
|
| 132 |
|
| 133 |
+
def make_model_change_fn(cat_comp_ref, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths, arch_comp_ref, ipa_preset, lora_acc, cn_acc, ipa_acc, sd3_ipa_acc, flux1_ipa_acc, style_acc, embed_acc, cond_acc, ref_latent_acc, hidream_o1_ref_acc, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp, pid_acc=None, vae_acc=None, joyai_ref_acc=None, krea2_identity_edit_acc=None, krea2_reference_edit_acc=None, qwen_image_edit_acc=None, ref_img_acc=None, sensenova_ref_acc=None, task_type=None, type_comp=None, qwen_pe_acc=None, ming_pe_acc=None):
|
| 134 |
def change_fn(*args):
|
| 135 |
model_name = args[0]
|
| 136 |
idx = 1
|
|
|
|
| 191 |
|
| 192 |
if lora_acc: updates[lora_acc] = gr.update(visible=('lora' in enabled_chains))
|
| 193 |
if cn_acc: updates[cn_acc] = gr.update(visible=('controlnet' in enabled_chains))
|
|
|
|
|
|
|
|
|
|
| 194 |
if ipa_acc: updates[ipa_acc] = gr.update(visible=('ipadapter' in enabled_chains))
|
| 195 |
if flux1_ipa_acc: updates[flux1_ipa_acc] = gr.update(visible=('flux1_ipadapter' in enabled_chains))
|
| 196 |
if sd3_ipa_acc: updates[sd3_ipa_acc] = gr.update(visible=('sd3_ipadapter' in enabled_chains))
|
|
|
|
| 230 |
updates[s_comp] = gr.update(choices=series_choices, value=default_series)
|
| 231 |
for f_comp in cn_filepaths:
|
| 232 |
updates[f_comp] = filepath
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
|
| 234 |
if ipa_preset and (arch_model_type in ["sdxl", "sd15", "sd35"]):
|
| 235 |
config = load_ipadapter_config()
|
|
|
|
| 259 |
controlnet_key = architectures_dict.get(default_m_type, {}).get("controlnet_key", default_m_type)
|
| 260 |
|
| 261 |
all_types, default_type, series_choices, default_series, filepath = get_cn_defaults(controlnet_key)
|
|
|
|
|
|
|
|
|
|
| 262 |
|
| 263 |
updates = {}
|
| 264 |
for prefix in ["imagegen", "txt2img", "img2img", "inpaint", "outpaint", "hires_fix"]:
|
|
|
|
| 269 |
updates[series_dd] = gr.update(choices=series_choices, value=default_series)
|
| 270 |
for filepath_state in ui_components[f'controlnet_filepaths_{prefix}']:
|
| 271 |
updates[filepath_state] = filepath
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
|
| 273 |
return updates
|
| 274 |
|
ui/events/config_loaders.py
CHANGED
|
@@ -42,117 +42,6 @@ def get_cn_defaults(arch_val):
|
|
| 42 |
return all_types, default_type, series_choices, default_series, filepath
|
| 43 |
|
| 44 |
|
| 45 |
-
@lru_cache(maxsize=1)
|
| 46 |
-
def load_anima_controlnet_lllite_config():
|
| 47 |
-
_PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
| 48 |
-
_CN_MODEL_LIST_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'anima_controlnet_lllite_models.yaml')
|
| 49 |
-
try:
|
| 50 |
-
print("--- Loading anima_controlnet_lllite_models.yaml ---")
|
| 51 |
-
with open(_CN_MODEL_LIST_PATH, 'r', encoding='utf-8') as f:
|
| 52 |
-
config = yaml.safe_load(f)
|
| 53 |
-
print("--- ✅ anima_controlnet_lllite_models.yaml loaded successfully ---")
|
| 54 |
-
return config.get("Anima_ControlNet_Lllite", [])
|
| 55 |
-
except Exception as e:
|
| 56 |
-
print(f"Error loading anima_controlnet_lllite_models.yaml: {e}")
|
| 57 |
-
return []
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
def get_anima_cn_defaults():
|
| 61 |
-
cn_config = load_anima_controlnet_lllite_config()
|
| 62 |
-
if not cn_config:
|
| 63 |
-
return [], None, [], None, "None"
|
| 64 |
-
all_types = sorted(list(set(t for model in cn_config for t in model.get("Type", []))))
|
| 65 |
-
default_type = all_types[0] if all_types else None
|
| 66 |
-
series_choices = []
|
| 67 |
-
if default_type:
|
| 68 |
-
series_choices = sorted(list(set(model.get("Series", "Default") for model in cn_config if default_type in model.get("Type", []))))
|
| 69 |
-
default_series = series_choices[0] if series_choices else None
|
| 70 |
-
filepath = "None"
|
| 71 |
-
if default_series and default_type:
|
| 72 |
-
for model in cn_config:
|
| 73 |
-
if model.get("Series") == default_series and default_type in model.get("Type", []):
|
| 74 |
-
filepath = model.get("Filepath")
|
| 75 |
-
break
|
| 76 |
-
return all_types, default_type, series_choices, default_series, filepath
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
@lru_cache(maxsize=1)
|
| 80 |
-
def load_diffsynth_controlnet_config():
|
| 81 |
-
_PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
| 82 |
-
_CN_MODEL_LIST_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'diffsynth_controlnet_models.yaml')
|
| 83 |
-
try:
|
| 84 |
-
print("--- Loading diffsynth_controlnet_models.yaml ---")
|
| 85 |
-
with open(_CN_MODEL_LIST_PATH, 'r', encoding='utf-8') as f:
|
| 86 |
-
config = yaml.safe_load(f)
|
| 87 |
-
print("--- ✅ diffsynth_controlnet_models.yaml loaded successfully ---")
|
| 88 |
-
return config.get("DiffSynth_ControlNet", {})
|
| 89 |
-
except Exception as e:
|
| 90 |
-
print(f"Error loading diffsynth_controlnet_models.yaml: {e}")
|
| 91 |
-
return {}
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
def get_diffsynth_cn_defaults(arch_val):
|
| 95 |
-
cn_full_config = load_diffsynth_controlnet_config()
|
| 96 |
-
cn_config = cn_full_config.get(arch_val, [])
|
| 97 |
-
|
| 98 |
-
if not cn_config:
|
| 99 |
-
return [], None, [], None, "None"
|
| 100 |
-
|
| 101 |
-
all_types = sorted(list(set(t for model in cn_config for t in model.get("Type", []))))
|
| 102 |
-
default_type = all_types[0] if all_types else None
|
| 103 |
-
|
| 104 |
-
series_choices = []
|
| 105 |
-
if default_type:
|
| 106 |
-
series_choices = sorted(list(set(model.get("Series", "Default") for model in cn_config if default_type in model.get("Type", []))))
|
| 107 |
-
default_series = series_choices[0] if series_choices else None
|
| 108 |
-
|
| 109 |
-
filepath = "None"
|
| 110 |
-
if default_series and default_type:
|
| 111 |
-
for model in cn_config:
|
| 112 |
-
if model.get("Series") == default_series and default_type in model.get("Type", []):
|
| 113 |
-
filepath = model.get("Filepath")
|
| 114 |
-
break
|
| 115 |
-
|
| 116 |
-
return all_types, default_type, series_choices, default_series, filepath
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
@lru_cache(maxsize=1)
|
| 120 |
-
def load_krea2_controlnet_config():
|
| 121 |
-
_PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
| 122 |
-
_CN_MODEL_LIST_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'krea2_controlnet_models.yaml')
|
| 123 |
-
try:
|
| 124 |
-
print("--- Loading krea2_controlnet_models.yaml ---")
|
| 125 |
-
with open(_CN_MODEL_LIST_PATH, 'r', encoding='utf-8') as f:
|
| 126 |
-
config = yaml.safe_load(f)
|
| 127 |
-
print("--- ✅ krea2_controlnet_models.yaml loaded successfully ---")
|
| 128 |
-
return config.get("Krea2_ControlNet", [])
|
| 129 |
-
except Exception as e:
|
| 130 |
-
print(f"Error loading krea2_controlnet_models.yaml: {e}")
|
| 131 |
-
return []
|
| 132 |
-
|
| 133 |
-
def get_krea2_cn_defaults():
|
| 134 |
-
cn_config = load_krea2_controlnet_config()
|
| 135 |
-
if not cn_config:
|
| 136 |
-
return [], None, [], None, "None"
|
| 137 |
-
|
| 138 |
-
all_types = sorted(list(set(t for model in cn_config for t in model.get("Type", []))))
|
| 139 |
-
default_type = all_types[0] if all_types else None
|
| 140 |
-
|
| 141 |
-
series_choices = []
|
| 142 |
-
if default_type:
|
| 143 |
-
series_choices = sorted(list(set(model.get("Series", "Default") for model in cn_config if default_type in model.get("Type", []))))
|
| 144 |
-
default_series = series_choices[0] if series_choices else None
|
| 145 |
-
|
| 146 |
-
filepath = "None"
|
| 147 |
-
if default_series and default_type:
|
| 148 |
-
for model in cn_config:
|
| 149 |
-
if model.get("Series") == default_series and default_type in model.get("Type", []):
|
| 150 |
-
filepath = model.get("Filepath")
|
| 151 |
-
break
|
| 152 |
-
|
| 153 |
-
return all_types, default_type, series_choices, default_series, filepath
|
| 154 |
-
|
| 155 |
-
|
| 156 |
@lru_cache(maxsize=1)
|
| 157 |
def load_ipadapter_config():
|
| 158 |
_PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
| 42 |
return all_types, default_type, series_choices, default_series, filepath
|
| 43 |
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
@lru_cache(maxsize=1)
|
| 46 |
def load_ipadapter_config():
|
| 47 |
_PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
ui/events/main.py
CHANGED
|
@@ -2,9 +2,6 @@ import gradio as gr
|
|
| 2 |
from .chain_handlers import (
|
| 3 |
create_lora_event_handlers,
|
| 4 |
create_controlnet_event_handlers,
|
| 5 |
-
create_anima_controlnet_lllite_event_handlers,
|
| 6 |
-
create_diffsynth_controlnet_event_handlers,
|
| 7 |
-
create_krea2_controlnet_event_handlers,
|
| 8 |
create_ipadapter_event_handlers,
|
| 9 |
create_embedding_event_handlers,
|
| 10 |
create_conditioning_event_handlers,
|
|
@@ -47,23 +44,8 @@ def attach_event_handlers(ui_components, demo):
|
|
| 47 |
cn_series_list = ui_components.get(f'controlnet_series_{prefix}', [])
|
| 48 |
cn_filepaths_list = ui_components.get(f'controlnet_filepaths_{prefix}', [])
|
| 49 |
|
| 50 |
-
anima_cn_types_list = ui_components.get(f'anima_controlnet_lllite_types_{prefix}', [])
|
| 51 |
-
anima_cn_series_list = ui_components.get(f'anima_controlnet_lllite_series_{prefix}', [])
|
| 52 |
-
anima_cn_filepaths_list = ui_components.get(f'anima_controlnet_lllite_filepaths_{prefix}', [])
|
| 53 |
-
|
| 54 |
-
diffsynth_cn_types_list = ui_components.get(f'diffsynth_controlnet_types_{prefix}', [])
|
| 55 |
-
diffsynth_cn_series_list = ui_components.get(f'diffsynth_controlnet_series_{prefix}', [])
|
| 56 |
-
diffsynth_cn_filepaths_list = ui_components.get(f'diffsynth_controlnet_filepaths_{prefix}', [])
|
| 57 |
-
|
| 58 |
-
krea2_cn_types_list = ui_components.get(f'krea2_controlnet_types_{prefix}', [])
|
| 59 |
-
krea2_cn_series_list = ui_components.get(f'krea2_controlnet_series_{prefix}', [])
|
| 60 |
-
krea2_cn_filepaths_list = ui_components.get(f'krea2_controlnet_filepaths_{prefix}', [])
|
| 61 |
-
|
| 62 |
lora_accordion = ui_components.get(f'lora_accordion_{prefix}')
|
| 63 |
cn_accordion = ui_components.get(f'controlnet_accordion_{prefix}')
|
| 64 |
-
anima_cn_accordion = ui_components.get(f'anima_controlnet_lllite_accordion_{prefix}')
|
| 65 |
-
diffsynth_cn_accordion = ui_components.get(f'diffsynth_controlnet_accordion_{prefix}')
|
| 66 |
-
krea2_cn_accordion = ui_components.get(f'krea2_controlnet_accordion_{prefix}')
|
| 67 |
ipa_accordion = ui_components.get(f'ipadapter_accordion_{prefix}')
|
| 68 |
sd3_ipa_accordion = ui_components.get(f'sd3_ipadapter_accordion_{prefix}')
|
| 69 |
flux1_ipa_accordion = ui_components.get(f'flux1_ipadapter_accordion_{prefix}')
|
|
@@ -99,14 +81,8 @@ def attach_event_handlers(ui_components, demo):
|
|
| 99 |
outputs = [model_comp, cat_comp]
|
| 100 |
if aspect_ratio_comp: outputs.append(aspect_ratio_comp)
|
| 101 |
outputs.extend(cn_types_list + cn_series_list + cn_filepaths_list)
|
| 102 |
-
outputs.extend(anima_cn_types_list + anima_cn_series_list + anima_cn_filepaths_list)
|
| 103 |
-
outputs.extend(diffsynth_cn_types_list + diffsynth_cn_series_list + diffsynth_cn_filepaths_list)
|
| 104 |
-
outputs.extend(krea2_cn_types_list + krea2_cn_series_list + krea2_cn_filepaths_list)
|
| 105 |
if lora_accordion: outputs.append(lora_accordion)
|
| 106 |
if cn_accordion: outputs.append(cn_accordion)
|
| 107 |
-
if anima_cn_accordion: outputs.append(anima_cn_accordion)
|
| 108 |
-
if diffsynth_cn_accordion: outputs.append(diffsynth_cn_accordion)
|
| 109 |
-
if krea2_cn_accordion: outputs.append(krea2_cn_accordion)
|
| 110 |
if ipa_accordion: outputs.append(ipa_accordion)
|
| 111 |
if sd3_ipa_accordion: outputs.append(sd3_ipa_accordion)
|
| 112 |
if flux1_ipa_accordion: outputs.append(flux1_ipa_accordion)
|
|
@@ -132,10 +108,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 132 |
update_fn = make_update_fn(
|
| 133 |
model_comp, cat_comp, aspect_ratio_comp, width_comp, height_comp,
|
| 134 |
cn_types_list, cn_series_list, cn_filepaths_list,
|
| 135 |
-
|
| 136 |
-
diffsynth_cn_types_list, diffsynth_cn_series_list, diffsynth_cn_filepaths_list,
|
| 137 |
-
krea2_cn_types_list, krea2_cn_series_list, krea2_cn_filepaths_list,
|
| 138 |
-
ipa_preset_list, lora_accordion, cn_accordion, anima_cn_accordion, diffsynth_cn_accordion, krea2_cn_accordion, ipa_accordion, sd3_ipa_accordion, flux1_ipa_accordion, style_accordion, embedding_accordion, conditioning_accordion,
|
| 139 |
ref_latent_accordion, hidream_o1_ref_accordion, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 140 |
pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, krea2_identity_edit_acc=krea2_identity_edit_accordion, krea2_reference_edit_acc=krea2_reference_edit_accordion, qwen_image_edit_acc=qwen_image_edit_accordion, ref_img_acc=ref_img_accordion, sensenova_ref_acc=sensenova_ref_accordion,
|
| 141 |
task_type=task_type, type_comp=type_comp, qwen_pe_acc=qwen_pe_accordion, ming_pe_acc=ming_pe_accordion
|
|
@@ -154,14 +127,8 @@ def attach_event_handlers(ui_components, demo):
|
|
| 154 |
if cat_comp: outputs2.append(cat_comp)
|
| 155 |
if aspect_ratio_comp: outputs2.append(aspect_ratio_comp)
|
| 156 |
outputs2.extend(cn_types_list + cn_series_list + cn_filepaths_list)
|
| 157 |
-
outputs2.extend(anima_cn_types_list + anima_cn_series_list + anima_cn_filepaths_list)
|
| 158 |
-
outputs2.extend(diffsynth_cn_types_list + diffsynth_cn_series_list + diffsynth_cn_filepaths_list)
|
| 159 |
-
outputs2.extend(krea2_cn_types_list + krea2_cn_series_list + krea2_cn_filepaths_list)
|
| 160 |
if lora_accordion: outputs2.append(lora_accordion)
|
| 161 |
if cn_accordion: outputs2.append(cn_accordion)
|
| 162 |
-
if anima_cn_accordion: outputs2.append(anima_cn_accordion)
|
| 163 |
-
if diffsynth_cn_accordion: outputs2.append(diffsynth_cn_accordion)
|
| 164 |
-
if krea2_cn_accordion: outputs2.append(krea2_cn_accordion)
|
| 165 |
if ipa_accordion: outputs2.append(ipa_accordion)
|
| 166 |
if sd3_ipa_accordion: outputs2.append(sd3_ipa_accordion)
|
| 167 |
if flux1_ipa_accordion: outputs2.append(flux1_ipa_accordion)
|
|
@@ -192,10 +159,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 192 |
change_fn = make_model_change_fn(
|
| 193 |
cat_comp, aspect_ratio_comp, width_comp, height_comp,
|
| 194 |
cn_types_list, cn_series_list, cn_filepaths_list,
|
| 195 |
-
|
| 196 |
-
diffsynth_cn_types_list, diffsynth_cn_series_list, diffsynth_cn_filepaths_list,
|
| 197 |
-
krea2_cn_types_list, krea2_cn_series_list, krea2_cn_filepaths_list,
|
| 198 |
-
arch_comp, ipa_preset_list, lora_accordion, cn_accordion, anima_cn_accordion, diffsynth_cn_accordion, krea2_cn_accordion, ipa_accordion, sd3_ipa_accordion, flux1_ipa_accordion, style_accordion, embedding_accordion, conditioning_accordion,
|
| 199 |
ref_latent_accordion, hidream_o1_ref_accordion, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 200 |
pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, krea2_identity_edit_acc=krea2_identity_edit_accordion, krea2_reference_edit_acc=krea2_reference_edit_accordion, qwen_image_edit_acc=qwen_image_edit_accordion, ref_img_acc=ref_img_accordion, sensenova_ref_acc=sensenova_ref_accordion,
|
| 201 |
task_type=task_type, type_comp=type_comp, qwen_pe_acc=qwen_pe_accordion, ming_pe_acc=ming_pe_accordion
|
|
@@ -206,9 +170,6 @@ def attach_event_handlers(ui_components, demo):
|
|
| 206 |
|
| 207 |
create_lora_event_handlers(prefix, ui_components)
|
| 208 |
create_controlnet_event_handlers(prefix, ui_components)
|
| 209 |
-
create_anima_controlnet_lllite_event_handlers(prefix, ui_components)
|
| 210 |
-
create_diffsynth_controlnet_event_handlers(prefix, ui_components)
|
| 211 |
-
create_krea2_controlnet_event_handlers(prefix, ui_components)
|
| 212 |
create_ipadapter_event_handlers(prefix, ui_components)
|
| 213 |
create_embedding_event_handlers(prefix, ui_components)
|
| 214 |
create_conditioning_event_handlers(prefix, ui_components)
|
|
@@ -275,9 +236,6 @@ def attach_event_handlers(ui_components, demo):
|
|
| 275 |
accordion_chain_map = {
|
| 276 |
f'lora_accordion_{prefix}': 'lora',
|
| 277 |
f'controlnet_accordion_{prefix}': 'controlnet',
|
| 278 |
-
f'anima_controlnet_lllite_accordion_{prefix}': 'anima_controlnet_lllite',
|
| 279 |
-
f'diffsynth_controlnet_accordion_{prefix}': 'diffsynth_controlnet',
|
| 280 |
-
f'krea2_controlnet_accordion_{prefix}': 'krea2_controlnet',
|
| 281 |
f'ipadapter_accordion_{prefix}': 'ipadapter',
|
| 282 |
f'sd3_ipadapter_accordion_{prefix}': 'sd3_ipadapter',
|
| 283 |
f'flux1_ipadapter_accordion_{prefix}': 'flux1_ipadapter',
|
|
@@ -323,8 +281,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 323 |
# Add feature accordion outputs for task-based visibility
|
| 324 |
accordion_keys = [
|
| 325 |
'lora_accordion_imagegen', 'controlnet_accordion_imagegen',
|
| 326 |
-
'
|
| 327 |
-
'krea2_controlnet_accordion_imagegen', 'ipadapter_accordion_imagegen',
|
| 328 |
'sd3_ipadapter_accordion_imagegen', 'flux1_ipadapter_accordion_imagegen',
|
| 329 |
'style_accordion_imagegen', 'embedding_accordion_imagegen',
|
| 330 |
'conditioning_accordion_imagegen', 'reference_latent_accordion_imagegen',
|
|
@@ -434,18 +391,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 434 |
all_load_outputs.extend(ui_components[f'controlnet_types_{prefix}'])
|
| 435 |
all_load_outputs.extend(ui_components[f'controlnet_series_{prefix}'])
|
| 436 |
all_load_outputs.extend(ui_components[f'controlnet_filepaths_{prefix}'])
|
| 437 |
-
|
| 438 |
-
all_load_outputs.extend(ui_components[f'anima_controlnet_lllite_types_{prefix}'])
|
| 439 |
-
all_load_outputs.extend(ui_components[f'anima_controlnet_lllite_series_{prefix}'])
|
| 440 |
-
all_load_outputs.extend(ui_components[f'anima_controlnet_lllite_filepaths_{prefix}'])
|
| 441 |
-
if f'diffsynth_controlnet_types_{prefix}' in ui_components:
|
| 442 |
-
all_load_outputs.extend(ui_components[f'diffsynth_controlnet_types_{prefix}'])
|
| 443 |
-
all_load_outputs.extend(ui_components[f'diffsynth_controlnet_series_{prefix}'])
|
| 444 |
-
all_load_outputs.extend(ui_components[f'diffsynth_controlnet_filepaths_{prefix}'])
|
| 445 |
-
if f'krea2_controlnet_types_{prefix}' in ui_components:
|
| 446 |
-
all_load_outputs.extend(ui_components[f'krea2_controlnet_types_{prefix}'])
|
| 447 |
-
all_load_outputs.extend(ui_components[f'krea2_controlnet_series_{prefix}'])
|
| 448 |
-
all_load_outputs.extend(ui_components[f'krea2_controlnet_filepaths_{prefix}'])
|
| 449 |
if f'ipadapter_final_preset_{prefix}' in ui_components:
|
| 450 |
all_load_outputs.extend(ui_components[f'ipadapter_lora_strengths_{prefix}'])
|
| 451 |
all_load_outputs.append(ui_components[f'ipadapter_final_preset_{prefix}'])
|
|
|
|
| 2 |
from .chain_handlers import (
|
| 3 |
create_lora_event_handlers,
|
| 4 |
create_controlnet_event_handlers,
|
|
|
|
|
|
|
|
|
|
| 5 |
create_ipadapter_event_handlers,
|
| 6 |
create_embedding_event_handlers,
|
| 7 |
create_conditioning_event_handlers,
|
|
|
|
| 44 |
cn_series_list = ui_components.get(f'controlnet_series_{prefix}', [])
|
| 45 |
cn_filepaths_list = ui_components.get(f'controlnet_filepaths_{prefix}', [])
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
lora_accordion = ui_components.get(f'lora_accordion_{prefix}')
|
| 48 |
cn_accordion = ui_components.get(f'controlnet_accordion_{prefix}')
|
|
|
|
|
|
|
|
|
|
| 49 |
ipa_accordion = ui_components.get(f'ipadapter_accordion_{prefix}')
|
| 50 |
sd3_ipa_accordion = ui_components.get(f'sd3_ipadapter_accordion_{prefix}')
|
| 51 |
flux1_ipa_accordion = ui_components.get(f'flux1_ipadapter_accordion_{prefix}')
|
|
|
|
| 81 |
outputs = [model_comp, cat_comp]
|
| 82 |
if aspect_ratio_comp: outputs.append(aspect_ratio_comp)
|
| 83 |
outputs.extend(cn_types_list + cn_series_list + cn_filepaths_list)
|
|
|
|
|
|
|
|
|
|
| 84 |
if lora_accordion: outputs.append(lora_accordion)
|
| 85 |
if cn_accordion: outputs.append(cn_accordion)
|
|
|
|
|
|
|
|
|
|
| 86 |
if ipa_accordion: outputs.append(ipa_accordion)
|
| 87 |
if sd3_ipa_accordion: outputs.append(sd3_ipa_accordion)
|
| 88 |
if flux1_ipa_accordion: outputs.append(flux1_ipa_accordion)
|
|
|
|
| 108 |
update_fn = make_update_fn(
|
| 109 |
model_comp, cat_comp, aspect_ratio_comp, width_comp, height_comp,
|
| 110 |
cn_types_list, cn_series_list, cn_filepaths_list,
|
| 111 |
+
ipa_preset_list, lora_accordion, cn_accordion, ipa_accordion, sd3_ipa_accordion, flux1_ipa_accordion, style_accordion, embedding_accordion, conditioning_accordion,
|
|
|
|
|
|
|
|
|
|
| 112 |
ref_latent_accordion, hidream_o1_ref_accordion, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 113 |
pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, krea2_identity_edit_acc=krea2_identity_edit_accordion, krea2_reference_edit_acc=krea2_reference_edit_accordion, qwen_image_edit_acc=qwen_image_edit_accordion, ref_img_acc=ref_img_accordion, sensenova_ref_acc=sensenova_ref_accordion,
|
| 114 |
task_type=task_type, type_comp=type_comp, qwen_pe_acc=qwen_pe_accordion, ming_pe_acc=ming_pe_accordion
|
|
|
|
| 127 |
if cat_comp: outputs2.append(cat_comp)
|
| 128 |
if aspect_ratio_comp: outputs2.append(aspect_ratio_comp)
|
| 129 |
outputs2.extend(cn_types_list + cn_series_list + cn_filepaths_list)
|
|
|
|
|
|
|
|
|
|
| 130 |
if lora_accordion: outputs2.append(lora_accordion)
|
| 131 |
if cn_accordion: outputs2.append(cn_accordion)
|
|
|
|
|
|
|
|
|
|
| 132 |
if ipa_accordion: outputs2.append(ipa_accordion)
|
| 133 |
if sd3_ipa_accordion: outputs2.append(sd3_ipa_accordion)
|
| 134 |
if flux1_ipa_accordion: outputs2.append(flux1_ipa_accordion)
|
|
|
|
| 159 |
change_fn = make_model_change_fn(
|
| 160 |
cat_comp, aspect_ratio_comp, width_comp, height_comp,
|
| 161 |
cn_types_list, cn_series_list, cn_filepaths_list,
|
| 162 |
+
arch_comp, ipa_preset_list, lora_accordion, cn_accordion, ipa_accordion, sd3_ipa_accordion, flux1_ipa_accordion, style_accordion, embedding_accordion, conditioning_accordion,
|
|
|
|
|
|
|
|
|
|
| 163 |
ref_latent_accordion, hidream_o1_ref_accordion, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 164 |
pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, krea2_identity_edit_acc=krea2_identity_edit_accordion, krea2_reference_edit_acc=krea2_reference_edit_accordion, qwen_image_edit_acc=qwen_image_edit_accordion, ref_img_acc=ref_img_accordion, sensenova_ref_acc=sensenova_ref_accordion,
|
| 165 |
task_type=task_type, type_comp=type_comp, qwen_pe_acc=qwen_pe_accordion, ming_pe_acc=ming_pe_accordion
|
|
|
|
| 170 |
|
| 171 |
create_lora_event_handlers(prefix, ui_components)
|
| 172 |
create_controlnet_event_handlers(prefix, ui_components)
|
|
|
|
|
|
|
|
|
|
| 173 |
create_ipadapter_event_handlers(prefix, ui_components)
|
| 174 |
create_embedding_event_handlers(prefix, ui_components)
|
| 175 |
create_conditioning_event_handlers(prefix, ui_components)
|
|
|
|
| 236 |
accordion_chain_map = {
|
| 237 |
f'lora_accordion_{prefix}': 'lora',
|
| 238 |
f'controlnet_accordion_{prefix}': 'controlnet',
|
|
|
|
|
|
|
|
|
|
| 239 |
f'ipadapter_accordion_{prefix}': 'ipadapter',
|
| 240 |
f'sd3_ipadapter_accordion_{prefix}': 'sd3_ipadapter',
|
| 241 |
f'flux1_ipadapter_accordion_{prefix}': 'flux1_ipadapter',
|
|
|
|
| 281 |
# Add feature accordion outputs for task-based visibility
|
| 282 |
accordion_keys = [
|
| 283 |
'lora_accordion_imagegen', 'controlnet_accordion_imagegen',
|
| 284 |
+
'ipadapter_accordion_imagegen',
|
|
|
|
| 285 |
'sd3_ipadapter_accordion_imagegen', 'flux1_ipadapter_accordion_imagegen',
|
| 286 |
'style_accordion_imagegen', 'embedding_accordion_imagegen',
|
| 287 |
'conditioning_accordion_imagegen', 'reference_latent_accordion_imagegen',
|
|
|
|
| 391 |
all_load_outputs.extend(ui_components[f'controlnet_types_{prefix}'])
|
| 392 |
all_load_outputs.extend(ui_components[f'controlnet_series_{prefix}'])
|
| 393 |
all_load_outputs.extend(ui_components[f'controlnet_filepaths_{prefix}'])
|
| 394 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 395 |
if f'ipadapter_final_preset_{prefix}' in ui_components:
|
| 396 |
all_load_outputs.extend(ui_components[f'ipadapter_lora_strengths_{prefix}'])
|
| 397 |
all_load_outputs.append(ui_components[f'ipadapter_final_preset_{prefix}'])
|
ui/events/run_handlers.py
CHANGED
|
@@ -87,9 +87,6 @@ def create_run_event(prefix: str, task_type: str = None, ui_components: dict = N
|
|
| 87 |
|
| 88 |
lora_data_components = ui_components.get(f'all_lora_components_flat_{prefix}', [])
|
| 89 |
controlnet_data_components = ui_components.get(f'all_controlnet_components_flat_{prefix}', [])
|
| 90 |
-
anima_controlnet_lllite_data_components = ui_components.get(f'all_anima_controlnet_lllite_components_flat_{prefix}', [])
|
| 91 |
-
diffsynth_controlnet_data_components = ui_components.get(f'all_diffsynth_controlnet_components_flat_{prefix}', [])
|
| 92 |
-
krea2_controlnet_data_components = ui_components.get(f'all_krea2_controlnet_components_flat_{prefix}', [])
|
| 93 |
ipadapter_data_components = ui_components.get(f'all_ipadapter_components_flat_{prefix}', [])
|
| 94 |
sd3_ipadapter_data_components = ui_components.get(f'all_sd3_ipadapter_components_flat_{prefix}', [])
|
| 95 |
flux1_ipadapter_data_components = ui_components.get(f'all_flux1_ipadapter_components_flat_{prefix}', [])
|
|
@@ -112,7 +109,7 @@ def create_run_event(prefix: str, task_type: str = None, ui_components: dict = N
|
|
| 112 |
input_keys = list(run_inputs_map.keys())
|
| 113 |
input_list_flat = [v for v in run_inputs_map.values() if v is not None]
|
| 114 |
all_chains = [
|
| 115 |
-
lora_data_components, controlnet_data_components,
|
| 116 |
sd3_ipadapter_data_components, flux1_ipadapter_data_components, style_data_components,
|
| 117 |
embedding_data_components, conditioning_data_components, reference_latent_data_components, hidream_o1_reference_data_components, sensenova_reference_data_components, joyai_reference_data_components, krea2_identity_edit_data_components, krea2_reference_edit_data_components, qwen_image_edit_data_components, reference_image_data_components
|
| 118 |
]
|
|
@@ -133,9 +130,6 @@ def create_run_event(prefix: str, task_type: str = None, ui_components: dict = N
|
|
| 133 |
|
| 134 |
assign_chain_data('lora_data', lora_data_components)
|
| 135 |
assign_chain_data('controlnet_data', controlnet_data_components)
|
| 136 |
-
assign_chain_data('anima_controlnet_lllite_data', anima_controlnet_lllite_data_components)
|
| 137 |
-
assign_chain_data('diffsynth_controlnet_data', diffsynth_controlnet_data_components)
|
| 138 |
-
assign_chain_data('krea2_controlnet_data', krea2_controlnet_data_components)
|
| 139 |
assign_chain_data('ipadapter_data', ipadapter_data_components)
|
| 140 |
assign_chain_data('sd3_ipadapter_chain', sd3_ipadapter_data_components)
|
| 141 |
assign_chain_data('flux1_ipadapter_data', flux1_ipadapter_data_components)
|
|
|
|
| 87 |
|
| 88 |
lora_data_components = ui_components.get(f'all_lora_components_flat_{prefix}', [])
|
| 89 |
controlnet_data_components = ui_components.get(f'all_controlnet_components_flat_{prefix}', [])
|
|
|
|
|
|
|
|
|
|
| 90 |
ipadapter_data_components = ui_components.get(f'all_ipadapter_components_flat_{prefix}', [])
|
| 91 |
sd3_ipadapter_data_components = ui_components.get(f'all_sd3_ipadapter_components_flat_{prefix}', [])
|
| 92 |
flux1_ipadapter_data_components = ui_components.get(f'all_flux1_ipadapter_components_flat_{prefix}', [])
|
|
|
|
| 109 |
input_keys = list(run_inputs_map.keys())
|
| 110 |
input_list_flat = [v for v in run_inputs_map.values() if v is not None]
|
| 111 |
all_chains = [
|
| 112 |
+
lora_data_components, controlnet_data_components, ipadapter_data_components,
|
| 113 |
sd3_ipadapter_data_components, flux1_ipadapter_data_components, style_data_components,
|
| 114 |
embedding_data_components, conditioning_data_components, reference_latent_data_components, hidream_o1_reference_data_components, sensenova_reference_data_components, joyai_reference_data_components, krea2_identity_edit_data_components, krea2_reference_edit_data_components, qwen_image_edit_data_components, reference_image_data_components
|
| 115 |
]
|
|
|
|
| 130 |
|
| 131 |
assign_chain_data('lora_data', lora_data_components)
|
| 132 |
assign_chain_data('controlnet_data', controlnet_data_components)
|
|
|
|
|
|
|
|
|
|
| 133 |
assign_chain_data('ipadapter_data', ipadapter_data_components)
|
| 134 |
assign_chain_data('sd3_ipadapter_chain', sd3_ipadapter_data_components)
|
| 135 |
assign_chain_data('flux1_ipadapter_data', flux1_ipadapter_data_components)
|
ui/imagegen_ui.py
CHANGED
|
@@ -4,7 +4,7 @@ from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICES
|
|
| 4 |
from .shared.ui_components import (
|
| 5 |
RESOLUTION_MAP,
|
| 6 |
create_lora_settings_ui,
|
| 7 |
-
create_controlnet_ui,
|
| 8 |
create_conditioning_ui, create_vae_override_ui,
|
| 9 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 10 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
|
@@ -173,9 +173,6 @@ def create_ui():
|
|
| 173 |
with gr.Column() as accordion_wrapper:
|
| 174 |
components.update(create_lora_settings_ui(prefix))
|
| 175 |
components.update(create_controlnet_ui(prefix))
|
| 176 |
-
components.update(create_anima_controlnet_lllite_ui(prefix))
|
| 177 |
-
components.update(create_diffsynth_controlnet_ui(prefix))
|
| 178 |
-
components.update(create_krea2_controlnet_ui(prefix))
|
| 179 |
components.update(create_ipadapter_ui(prefix))
|
| 180 |
components.update(create_flux1_ipadapter_ui(prefix))
|
| 181 |
components.update(create_sd3_ipadapter_ui(prefix))
|
|
|
|
| 4 |
from .shared.ui_components import (
|
| 5 |
RESOLUTION_MAP,
|
| 6 |
create_lora_settings_ui,
|
| 7 |
+
create_controlnet_ui, create_ipadapter_ui, create_embedding_ui,
|
| 8 |
create_conditioning_ui, create_vae_override_ui,
|
| 9 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 10 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
|
|
|
| 173 |
with gr.Column() as accordion_wrapper:
|
| 174 |
components.update(create_lora_settings_ui(prefix))
|
| 175 |
components.update(create_controlnet_ui(prefix))
|
|
|
|
|
|
|
|
|
|
| 176 |
components.update(create_ipadapter_ui(prefix))
|
| 177 |
components.update(create_flux1_ipadapter_ui(prefix))
|
| 178 |
components.update(create_sd3_ipadapter_ui(prefix))
|
ui/shared/ui_components.py
CHANGED
|
@@ -201,138 +201,6 @@ def create_controlnet_ui(prefix: str, max_units=MAX_CONTROLNETS):
|
|
| 201 |
|
| 202 |
return components
|
| 203 |
|
| 204 |
-
def create_krea2_controlnet_ui(prefix: str, max_units=MAX_CONTROLNETS):
|
| 205 |
-
components = {}
|
| 206 |
-
key = lambda name: f"{name}_{prefix}"
|
| 207 |
-
|
| 208 |
-
with gr.Accordion("Krea2 ControlNet Settings", open=False, visible=('krea2_controlnet' in default_enabled_chains)) as accordion:
|
| 209 |
-
components[key('krea2_controlnet_accordion')] = accordion
|
| 210 |
-
gr.Markdown("💡 **Tip:** Processed using the [facok/comfyui-krea2-controlnet](https://github.com/facok/comfyui-krea2-controlnet) node.")
|
| 211 |
-
|
| 212 |
-
cn_rows, images, series, types, strengths, filepaths = [], [], [], [], [], []
|
| 213 |
-
components.update({
|
| 214 |
-
key('krea2_controlnet_rows'): cn_rows,
|
| 215 |
-
key('krea2_controlnet_images'): images,
|
| 216 |
-
key('krea2_controlnet_series'): series,
|
| 217 |
-
key('krea2_controlnet_types'): types,
|
| 218 |
-
key('krea2_controlnet_strengths'): strengths,
|
| 219 |
-
key('krea2_controlnet_filepaths'): filepaths
|
| 220 |
-
})
|
| 221 |
-
|
| 222 |
-
for i in range(max_units):
|
| 223 |
-
with gr.Row(visible=(i < 1)) as row:
|
| 224 |
-
with gr.Column(scale=1):
|
| 225 |
-
images.append(gr.Image(label=f"Control Image {i+1}", type="pil", sources=["upload"], height=256))
|
| 226 |
-
with gr.Column(scale=2):
|
| 227 |
-
types.append(gr.Dropdown(label="Type", choices=[], interactive=True, allow_custom_value=True))
|
| 228 |
-
series.append(gr.Dropdown(label="Series", choices=[], interactive=True, allow_custom_value=True))
|
| 229 |
-
strengths.append(gr.Slider(label="Strength", minimum=0.0, maximum=2.0, step=0.05, value=1.0, interactive=True))
|
| 230 |
-
filepaths.append(gr.State(None))
|
| 231 |
-
cn_rows.append(row)
|
| 232 |
-
|
| 233 |
-
with gr.Row():
|
| 234 |
-
components[key('add_krea2_controlnet_button')] = gr.Button("✚ Add Krea2 ControlNet")
|
| 235 |
-
components[key('delete_krea2_controlnet_button')] = gr.Button("➖ Delete Krea2 ControlNet", visible=False)
|
| 236 |
-
components[key('krea2_controlnet_count_state')] = gr.State(1)
|
| 237 |
-
|
| 238 |
-
all_cn_components_flat = []
|
| 239 |
-
for i in range(max_units):
|
| 240 |
-
all_cn_components_flat.extend([
|
| 241 |
-
images[i], types[i], series[i], strengths[i], filepaths[i]
|
| 242 |
-
])
|
| 243 |
-
components[key('all_krea2_controlnet_components_flat')] = all_cn_components_flat
|
| 244 |
-
|
| 245 |
-
return components
|
| 246 |
-
|
| 247 |
-
def create_anima_controlnet_lllite_ui(prefix: str, max_units=MAX_CONTROLNETS):
|
| 248 |
-
components = {}
|
| 249 |
-
key = lambda name: f"{name}_{prefix}"
|
| 250 |
-
|
| 251 |
-
with gr.Accordion("Anima ControlNet LLLite Settings", open=False, visible=('anima_controlnet_lllite' in default_enabled_chains)) as accordion:
|
| 252 |
-
components[key('anima_controlnet_lllite_accordion')] = accordion
|
| 253 |
-
|
| 254 |
-
cn_rows, images, series, types, strengths, filepaths, start_percents, end_percents = [], [], [], [], [], [], [], []
|
| 255 |
-
components.update({
|
| 256 |
-
key('anima_controlnet_lllite_rows'): cn_rows,
|
| 257 |
-
key('anima_controlnet_lllite_images'): images,
|
| 258 |
-
key('anima_controlnet_lllite_series'): series,
|
| 259 |
-
key('anima_controlnet_lllite_types'): types,
|
| 260 |
-
key('anima_controlnet_lllite_strengths'): strengths,
|
| 261 |
-
key('anima_controlnet_lllite_filepaths'): filepaths,
|
| 262 |
-
key('anima_controlnet_lllite_start_percents'): start_percents,
|
| 263 |
-
key('anima_controlnet_lllite_end_percents'): end_percents
|
| 264 |
-
})
|
| 265 |
-
|
| 266 |
-
for i in range(max_units):
|
| 267 |
-
with gr.Row(visible=(i < 1)) as row:
|
| 268 |
-
with gr.Column(scale=1):
|
| 269 |
-
images.append(gr.Image(label=f"Control Image {i+1}", type="pil", sources=["upload"], height=256))
|
| 270 |
-
with gr.Column(scale=2):
|
| 271 |
-
types.append(gr.Dropdown(label="Type", choices=[], interactive=True, allow_custom_value=True))
|
| 272 |
-
series.append(gr.Dropdown(label="Series", choices=[], interactive=True, allow_custom_value=True))
|
| 273 |
-
strengths.append(gr.Slider(label="Strength", minimum=0.0, maximum=2.0, step=0.05, value=1.0, interactive=True))
|
| 274 |
-
with gr.Row(visible=False):
|
| 275 |
-
start_percents.append(gr.State(0.0))
|
| 276 |
-
end_percents.append(gr.State(1.0))
|
| 277 |
-
filepaths.append(gr.State(None))
|
| 278 |
-
cn_rows.append(row)
|
| 279 |
-
|
| 280 |
-
with gr.Row():
|
| 281 |
-
components[key('add_anima_controlnet_lllite_button')] = gr.Button("✚ Add Lllite")
|
| 282 |
-
components[key('delete_anima_controlnet_lllite_button')] = gr.Button("➖ Delete Lllite", visible=False)
|
| 283 |
-
components[key('anima_controlnet_lllite_count_state')] = gr.State(1)
|
| 284 |
-
|
| 285 |
-
all_cn_components_flat = []
|
| 286 |
-
for i in range(max_units):
|
| 287 |
-
all_cn_components_flat.extend([
|
| 288 |
-
images[i], types[i], series[i], strengths[i], filepaths[i], start_percents[i], end_percents[i]
|
| 289 |
-
])
|
| 290 |
-
components[key('all_anima_controlnet_lllite_components_flat')] = all_cn_components_flat
|
| 291 |
-
|
| 292 |
-
return components
|
| 293 |
-
|
| 294 |
-
def create_diffsynth_controlnet_ui(prefix: str, max_units=MAX_CONTROLNETS):
|
| 295 |
-
components = {}
|
| 296 |
-
key = lambda name: f"{name}_{prefix}"
|
| 297 |
-
|
| 298 |
-
with gr.Accordion("DiffSynth ControlNet Settings", open=False, visible=('diffsynth_controlnet' in default_enabled_chains)) as accordion:
|
| 299 |
-
components[key('diffsynth_controlnet_accordion')] = accordion
|
| 300 |
-
|
| 301 |
-
cn_rows, images, series, types, strengths, filepaths = [], [], [], [], [], []
|
| 302 |
-
components.update({
|
| 303 |
-
key('diffsynth_controlnet_rows'): cn_rows,
|
| 304 |
-
key('diffsynth_controlnet_images'): images,
|
| 305 |
-
key('diffsynth_controlnet_series'): series,
|
| 306 |
-
key('diffsynth_controlnet_types'): types,
|
| 307 |
-
key('diffsynth_controlnet_strengths'): strengths,
|
| 308 |
-
key('diffsynth_controlnet_filepaths'): filepaths
|
| 309 |
-
})
|
| 310 |
-
|
| 311 |
-
for i in range(max_units):
|
| 312 |
-
with gr.Row(visible=(i < 1)) as row:
|
| 313 |
-
with gr.Column(scale=1):
|
| 314 |
-
images.append(gr.Image(label=f"Control Image {i+1}", type="pil", sources=["upload"], height=256))
|
| 315 |
-
with gr.Column(scale=2):
|
| 316 |
-
types.append(gr.Dropdown(label="Type", choices=[], interactive=True, allow_custom_value=True))
|
| 317 |
-
series.append(gr.Dropdown(label="Series", choices=[], interactive=True, allow_custom_value=True))
|
| 318 |
-
strengths.append(gr.Slider(label="Strength", minimum=0.0, maximum=2.0, step=0.05, value=1.0, interactive=True))
|
| 319 |
-
filepaths.append(gr.State(None))
|
| 320 |
-
cn_rows.append(row)
|
| 321 |
-
|
| 322 |
-
with gr.Row():
|
| 323 |
-
components[key('add_diffsynth_controlnet_button')] = gr.Button("✚ Add DiffSynth ControlNet")
|
| 324 |
-
components[key('delete_diffsynth_controlnet_button')] = gr.Button("➖ Delete DiffSynth ControlNet", visible=False)
|
| 325 |
-
components[key('diffsynth_controlnet_count_state')] = gr.State(1)
|
| 326 |
-
|
| 327 |
-
all_cn_components_flat = []
|
| 328 |
-
for i in range(max_units):
|
| 329 |
-
all_cn_components_flat.extend([
|
| 330 |
-
images[i], types[i], series[i], strengths[i], filepaths[i]
|
| 331 |
-
])
|
| 332 |
-
components[key('all_diffsynth_controlnet_components_flat')] = all_cn_components_flat
|
| 333 |
-
|
| 334 |
-
return components
|
| 335 |
-
|
| 336 |
def create_ipadapter_ui(prefix: str, max_units=MAX_IPADAPTERS):
|
| 337 |
components = {}
|
| 338 |
key = lambda name: f"{name}_{prefix}"
|
|
|
|
| 201 |
|
| 202 |
return components
|
| 203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
def create_ipadapter_ui(prefix: str, max_units=MAX_IPADAPTERS):
|
| 205 |
components = {}
|
| 206 |
key = lambda name: f"{name}_{prefix}"
|
yaml/anima_controlnet_lllite_models.yaml
DELETED
|
@@ -1,16 +0,0 @@
|
|
| 1 |
-
Anima_ControlNet_Lllite:
|
| 2 |
-
- Filepath: "anima-lllite-any-test-like-v2.safetensors"
|
| 3 |
-
Series: "kohya-ss"
|
| 4 |
-
Type: ["Any-Test"]
|
| 5 |
-
- Filepath: "anima-lllite-depth-1.safetensors"
|
| 6 |
-
Series: "kohya-ss"
|
| 7 |
-
Type: ["Depth"]
|
| 8 |
-
- Filepath: "anima-lllite-lineart-1.safetensors"
|
| 9 |
-
Series: "kohya-ss"
|
| 10 |
-
Type: ["Lineart"]
|
| 11 |
-
- Filepath: "anima-lllite-pose-1.safetensors"
|
| 12 |
-
Series: "kohya-ss"
|
| 13 |
-
Type: ["Pose"]
|
| 14 |
-
- Filepath: "anima-lllite-scribble-1.safetensors"
|
| 15 |
-
Series: "kohya-ss"
|
| 16 |
-
Type: ["Scribble"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
yaml/chain_features.yaml
CHANGED
|
@@ -265,35 +265,6 @@ krea2_style_reference:
|
|
| 265 |
description: "Style reference image encoded as Base64 Data URI or HTTP/HTTPS URL."
|
| 266 |
required:
|
| 267 |
- image
|
| 268 |
-
|
| 269 |
-
diffsynth_controlnet:
|
| 270 |
-
chains: diffsynth_controlnet
|
| 271 |
-
display_name: "DiffSynth ControlNet"
|
| 272 |
-
description: "DiffSynth optimized ControlNet injector for Z-Image models."
|
| 273 |
-
max_count: 5
|
| 274 |
-
usage_guideline: "Supply ControlNet type (e.g., 'Canny'), series (e.g., 'alibaba-pai Controlnet Union 2.1 8steps'), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and optional strength."
|
| 275 |
-
parameters_schema:
|
| 276 |
-
type: object
|
| 277 |
-
properties:
|
| 278 |
-
type:
|
| 279 |
-
type: string
|
| 280 |
-
description: "ControlNet conditioning type."
|
| 281 |
-
series:
|
| 282 |
-
type: string
|
| 283 |
-
description: "ControlNet model series name."
|
| 284 |
-
image:
|
| 285 |
-
type: string
|
| 286 |
-
description: "Pre-processed control image (e.g., Depth map) encoded as Base64 Data URI or HTTP/HTTPS URL. Note: System does NOT automatically pre-process raw RGB images."
|
| 287 |
-
strength:
|
| 288 |
-
type: number
|
| 289 |
-
default: 1.0
|
| 290 |
-
description: "Control influence strength."
|
| 291 |
-
required:
|
| 292 |
-
- type
|
| 293 |
-
- series
|
| 294 |
-
- image
|
| 295 |
-
|
| 296 |
-
|
| 297 |
joyai_reference_edit:
|
| 298 |
chains: joyai_image
|
| 299 |
display_name: "JoyAI Reference Edit"
|
|
@@ -339,70 +310,6 @@ hidream_o1_smoothing:
|
|
| 339 |
default: 0.5
|
| 340 |
description: "Smoothing intensity (0.0 to 1.0)."
|
| 341 |
required: []
|
| 342 |
-
|
| 343 |
-
krea2_controlnet:
|
| 344 |
-
chains: krea2_controlnet
|
| 345 |
-
display_name: "KREA2 ControlNet"
|
| 346 |
-
description: "Processed using the facok/comfyui-krea2-controlnet node."
|
| 347 |
-
max_count: 5
|
| 348 |
-
usage_guideline: "Supply ControlNet type (e.g., 'Depth'), series (e.g., 'Patil'), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and optional strength."
|
| 349 |
-
parameters_schema:
|
| 350 |
-
type: object
|
| 351 |
-
properties:
|
| 352 |
-
type:
|
| 353 |
-
type: string
|
| 354 |
-
enum:
|
| 355 |
-
- "Depth"
|
| 356 |
-
description: "ControlNet conditioning type."
|
| 357 |
-
series:
|
| 358 |
-
type: string
|
| 359 |
-
enum:
|
| 360 |
-
- "Patil"
|
| 361 |
-
default: "Patil"
|
| 362 |
-
description: "ControlNet model series."
|
| 363 |
-
image:
|
| 364 |
-
type: string
|
| 365 |
-
description: "Pre-processed control image (e.g., Depth map) encoded as Base64 Data URI or HTTP/HTTPS URL. Note: System does NOT automatically pre-process raw RGB images."
|
| 366 |
-
strength:
|
| 367 |
-
type: number
|
| 368 |
-
default: 1.0
|
| 369 |
-
minimum: 0.0
|
| 370 |
-
maximum: 2.0
|
| 371 |
-
description: "Control influence strength (0.0 to 2.0)."
|
| 372 |
-
required:
|
| 373 |
-
- type
|
| 374 |
-
- series
|
| 375 |
-
- image
|
| 376 |
-
|
| 377 |
-
anima_controlnet_lllite:
|
| 378 |
-
chains: anima_controlnet_lllite
|
| 379 |
-
display_name: "Anima ControlNet LLLite"
|
| 380 |
-
description: "Anima model-specific lightweight ControlNet."
|
| 381 |
-
max_count: 5
|
| 382 |
-
usage_guideline: "Supply Anima ControlNet LLLite type (e.g., 'Depth'), series (e.g., 'kohya-ss'), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and optional strength."
|
| 383 |
-
parameters_schema:
|
| 384 |
-
type: object
|
| 385 |
-
properties:
|
| 386 |
-
type:
|
| 387 |
-
type: string
|
| 388 |
-
description: "Anima ControlNet LLLite conditioning type."
|
| 389 |
-
series:
|
| 390 |
-
type: string
|
| 391 |
-
description: "Anima ControlNet LLLite model series."
|
| 392 |
-
image:
|
| 393 |
-
type: string
|
| 394 |
-
description: "Pre-processed control image (e.g., Depth, Lineart map) encoded as Base64 Data URI or HTTP/HTTPS URL. Note: System does NOT automatically pre-process raw RGB images."
|
| 395 |
-
strength:
|
| 396 |
-
type: number
|
| 397 |
-
default: 1.0
|
| 398 |
-
minimum: 0.0
|
| 399 |
-
maximum: 2.0
|
| 400 |
-
description: "Control influence strength (0.0 to 2.0)."
|
| 401 |
-
required:
|
| 402 |
-
- type
|
| 403 |
-
- series
|
| 404 |
-
- image
|
| 405 |
-
|
| 406 |
hidream_o1_reference:
|
| 407 |
chains: hidream_o1_reference
|
| 408 |
display_name: "HiDream-O1 Reference Edit"
|
|
|
|
| 265 |
description: "Style reference image encoded as Base64 Data URI or HTTP/HTTPS URL."
|
| 266 |
required:
|
| 267 |
- image
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 268 |
joyai_reference_edit:
|
| 269 |
chains: joyai_image
|
| 270 |
display_name: "JoyAI Reference Edit"
|
|
|
|
| 310 |
default: 0.5
|
| 311 |
description: "Smoothing intensity (0.0 to 1.0)."
|
| 312 |
required: []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
hidream_o1_reference:
|
| 314 |
chains: hidream_o1_reference
|
| 315 |
display_name: "HiDream-O1 Reference Edit"
|
yaml/controlnet_models.yaml
CHANGED
|
@@ -1,8 +1,42 @@
|
|
| 1 |
ControlNet:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
Qwen-Image:
|
| 3 |
- Filepath: "Qwen-Image-InstantX-ControlNet-Union.safetensors"
|
| 4 |
Series: "InstantX Union"
|
| 5 |
Type: ["Canny", "Soft Edge", "Depth", "Pose"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
FLUX.1:
|
| 7 |
- Filepath: "FLUX.1-dev-ControlNet-Union-Pro-2.0.safetensors"
|
| 8 |
Series: "Shakker Labs Union Pro"
|
|
|
|
| 1 |
ControlNet:
|
| 2 |
+
Qwen-Image-2.1:
|
| 3 |
+
- Filepath: "qwen_image_2.1_fun_controlnet_union_int8_convrot.safetensors"
|
| 4 |
+
Series: "Alibaba-PAI Fun-ControlNet Union"
|
| 5 |
+
Type: ["Canny", "Depth", "Pose", "Lineart", "HED", "MLSD", "Scribble", "Grayscale"]
|
| 6 |
Qwen-Image:
|
| 7 |
- Filepath: "Qwen-Image-InstantX-ControlNet-Union.safetensors"
|
| 8 |
Series: "InstantX Union"
|
| 9 |
Type: ["Canny", "Soft Edge", "Depth", "Pose"]
|
| 10 |
+
Krea-2:
|
| 11 |
+
- Filepath: "krea2-anythng_step_007000.safetensors"
|
| 12 |
+
Series: "tori29umai"
|
| 13 |
+
Type: ["Anythng"]
|
| 14 |
+
- Filepath: "depth-control-lora.safetensors"
|
| 15 |
+
Series: "Patil"
|
| 16 |
+
Type: ["Depth"]
|
| 17 |
+
Z-Image:
|
| 18 |
+
- Filepath: "Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.safetensors"
|
| 19 |
+
Series: "alibaba-pai Controlnet Union 2.1 8steps"
|
| 20 |
+
Type: ["Pose", "Canny", "HED", "Depth", "MLSD"]
|
| 21 |
+
- Filepath: "Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.safetensors"
|
| 22 |
+
Series: "alibaba-pai Controlnet Union 2.1 8steps"
|
| 23 |
+
Type: ["Tile"]
|
| 24 |
+
Anima:
|
| 25 |
+
- Filepath: "anima-lllite-any-test-like-v2.safetensors"
|
| 26 |
+
Series: "kohya-ss"
|
| 27 |
+
Type: ["Any-Test"]
|
| 28 |
+
- Filepath: "anima-lllite-depth-1.safetensors"
|
| 29 |
+
Series: "kohya-ss"
|
| 30 |
+
Type: ["Depth"]
|
| 31 |
+
- Filepath: "anima-lllite-lineart-1.safetensors"
|
| 32 |
+
Series: "kohya-ss"
|
| 33 |
+
Type: ["Lineart"]
|
| 34 |
+
- Filepath: "anima-lllite-pose-1.safetensors"
|
| 35 |
+
Series: "kohya-ss"
|
| 36 |
+
Type: ["Pose"]
|
| 37 |
+
- Filepath: "anima-lllite-scribble-1.safetensors"
|
| 38 |
+
Series: "kohya-ss"
|
| 39 |
+
Type: ["Scribble"]
|
| 40 |
FLUX.1:
|
| 41 |
- Filepath: "FLUX.1-dev-ControlNet-Union-Pro-2.0.safetensors"
|
| 42 |
Series: "Shakker Labs Union Pro"
|
yaml/diffsynth_controlnet_models.yaml
DELETED
|
@@ -1,8 +0,0 @@
|
|
| 1 |
-
DiffSynth_ControlNet:
|
| 2 |
-
Z-Image:
|
| 3 |
-
- Filepath: "Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.safetensors"
|
| 4 |
-
Series: "alibaba-pai Controlnet Union 2.1 8steps"
|
| 5 |
-
Type: ["Pose", "Canny", "HED", "Depth", "MLSD"]
|
| 6 |
-
- Filepath: "Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.safetensors"
|
| 7 |
-
Series: "alibaba-pai Controlnet Union 2.1 8steps"
|
| 8 |
-
Type: ["Tile"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
yaml/file_list.yaml
CHANGED
|
@@ -903,6 +903,11 @@ file:
|
|
| 903 |
source: "hf"
|
| 904 |
repo_id: "alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union-2.1"
|
| 905 |
repository_file_path: "Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.safetensors"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 906 |
text_encoders:
|
| 907 |
# Krea-2
|
| 908 |
- filename: "qwen3vl_4b_fp8_scaled.safetensors"
|
|
|
|
| 903 |
source: "hf"
|
| 904 |
repo_id: "alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union-2.1"
|
| 905 |
repository_file_path: "Z-Image-Turbo-Fun-Controlnet-Tile-2.1-8steps.safetensors"
|
| 906 |
+
# Qwen-Image-2.1
|
| 907 |
+
- filename: "qwen_image_2.1_fun_controlnet_union_int8_convrot.safetensors"
|
| 908 |
+
source: "hf"
|
| 909 |
+
repo_id: "Kijai/QwenImage_experimental"
|
| 910 |
+
repository_file_path: "model_patches/qwen_image_2.1_fun_controlnet_union_int8_convrot.safetensors"
|
| 911 |
text_encoders:
|
| 912 |
# Krea-2
|
| 913 |
- filename: "qwen3vl_4b_fp8_scaled.safetensors"
|
yaml/krea2_controlnet_models.yaml
DELETED
|
@@ -1,7 +0,0 @@
|
|
| 1 |
-
Krea2_ControlNet:
|
| 2 |
-
- Filepath: "krea2-anythng_step_007000.safetensors"
|
| 3 |
-
Series: "tori29umai"
|
| 4 |
-
Type: ["Anythng"]
|
| 5 |
-
- Filepath: "depth-control-lora.safetensors"
|
| 6 |
-
Series: "Patil"
|
| 7 |
-
Type: ["Depth"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
yaml/model_architecture_features.yaml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
krea-2:
|
| 3 |
enabled_chains:
|
| 4 |
- lora
|
| 5 |
-
-
|
| 6 |
- krea2_identity_edit
|
| 7 |
- krea2_style_reference
|
| 8 |
- pid
|
|
@@ -65,7 +65,7 @@ ernie-image:
|
|
| 65 |
z-image:
|
| 66 |
enabled_chains:
|
| 67 |
- lora
|
| 68 |
-
-
|
| 69 |
- conditioning
|
| 70 |
- vae
|
| 71 |
- pid
|
|
@@ -79,6 +79,7 @@ ming-image:
|
|
| 79 |
qwen-image-2.1:
|
| 80 |
enabled_chains:
|
| 81 |
- lora
|
|
|
|
| 82 |
- reference_image
|
| 83 |
- qwen_image_2_1_prompt_enhancer
|
| 84 |
|
|
@@ -106,7 +107,7 @@ anima-3.8b-v1.1:
|
|
| 106 |
enabled_chains:
|
| 107 |
- lora
|
| 108 |
- conditioning
|
| 109 |
-
-
|
| 110 |
- vae
|
| 111 |
- pid
|
| 112 |
|
|
@@ -115,7 +116,7 @@ anima-3.8b:
|
|
| 115 |
enabled_chains:
|
| 116 |
- lora
|
| 117 |
- conditioning
|
| 118 |
-
-
|
| 119 |
- vae
|
| 120 |
- pid
|
| 121 |
|
|
@@ -123,7 +124,7 @@ anima:
|
|
| 123 |
enabled_chains:
|
| 124 |
- lora
|
| 125 |
- conditioning
|
| 126 |
-
-
|
| 127 |
- vae
|
| 128 |
- pid
|
| 129 |
|
|
|
|
| 2 |
krea-2:
|
| 3 |
enabled_chains:
|
| 4 |
- lora
|
| 5 |
+
- controlnet
|
| 6 |
- krea2_identity_edit
|
| 7 |
- krea2_style_reference
|
| 8 |
- pid
|
|
|
|
| 65 |
z-image:
|
| 66 |
enabled_chains:
|
| 67 |
- lora
|
| 68 |
+
- controlnet
|
| 69 |
- conditioning
|
| 70 |
- vae
|
| 71 |
- pid
|
|
|
|
| 79 |
qwen-image-2.1:
|
| 80 |
enabled_chains:
|
| 81 |
- lora
|
| 82 |
+
- controlnet
|
| 83 |
- reference_image
|
| 84 |
- qwen_image_2_1_prompt_enhancer
|
| 85 |
|
|
|
|
| 107 |
enabled_chains:
|
| 108 |
- lora
|
| 109 |
- conditioning
|
| 110 |
+
- controlnet
|
| 111 |
- vae
|
| 112 |
- pid
|
| 113 |
|
|
|
|
| 116 |
enabled_chains:
|
| 117 |
- lora
|
| 118 |
- conditioning
|
| 119 |
+
- controlnet
|
| 120 |
- vae
|
| 121 |
- pid
|
| 122 |
|
|
|
|
| 124 |
enabled_chains:
|
| 125 |
- lora
|
| 126 |
- conditioning
|
| 127 |
+
- controlnet
|
| 128 |
- vae
|
| 129 |
- pid
|
| 130 |
|
yaml/model_architectures.yaml
CHANGED
|
@@ -67,7 +67,7 @@ architectures:
|
|
| 67 |
model_type: "ming-image"
|
| 68 |
"Qwen-Image-2.1":
|
| 69 |
model_type: "qwen-image-2.1"
|
| 70 |
-
controlnet_key: "Qwen-Image"
|
| 71 |
"Qwen-Image":
|
| 72 |
model_type: "qwen-image"
|
| 73 |
controlnet_key: "Qwen-Image"
|
|
|
|
| 67 |
model_type: "ming-image"
|
| 68 |
"Qwen-Image-2.1":
|
| 69 |
model_type: "qwen-image-2.1"
|
| 70 |
+
controlnet_key: "Qwen-Image-2.1"
|
| 71 |
"Qwen-Image":
|
| 72 |
model_type: "qwen-image"
|
| 73 |
controlnet_key: "Qwen-Image"
|
yaml/task_features.yaml
CHANGED
|
@@ -7,9 +7,6 @@ txt2img:
|
|
| 7 |
enabled_chains:
|
| 8 |
- lora
|
| 9 |
- controlnet
|
| 10 |
-
- anima_controlnet_lllite
|
| 11 |
-
- diffsynth_controlnet
|
| 12 |
-
- krea2_controlnet
|
| 13 |
- ipadapter
|
| 14 |
- flux1_ipadapter
|
| 15 |
- sd3_ipadapter
|
|
@@ -34,9 +31,6 @@ img2img:
|
|
| 34 |
enabled_chains:
|
| 35 |
- lora
|
| 36 |
- controlnet
|
| 37 |
-
- anima_controlnet_lllite
|
| 38 |
-
- diffsynth_controlnet
|
| 39 |
-
- krea2_controlnet
|
| 40 |
- ipadapter
|
| 41 |
- flux1_ipadapter
|
| 42 |
- sd3_ipadapter
|
|
@@ -60,9 +54,6 @@ inpaint:
|
|
| 60 |
enabled_chains:
|
| 61 |
- lora
|
| 62 |
- controlnet
|
| 63 |
-
- anima_controlnet_lllite
|
| 64 |
-
- diffsynth_controlnet
|
| 65 |
-
- krea2_controlnet
|
| 66 |
- ipadapter
|
| 67 |
- flux1_ipadapter
|
| 68 |
- sd3_ipadapter
|
|
@@ -86,9 +77,6 @@ outpaint:
|
|
| 86 |
enabled_chains:
|
| 87 |
- lora
|
| 88 |
- controlnet
|
| 89 |
-
- anima_controlnet_lllite
|
| 90 |
-
- diffsynth_controlnet
|
| 91 |
-
- krea2_controlnet
|
| 92 |
- ipadapter
|
| 93 |
- flux1_ipadapter
|
| 94 |
- sd3_ipadapter
|
|
@@ -112,9 +100,6 @@ hires_fix:
|
|
| 112 |
enabled_chains:
|
| 113 |
- lora
|
| 114 |
- controlnet
|
| 115 |
-
- anima_controlnet_lllite
|
| 116 |
-
- diffsynth_controlnet
|
| 117 |
-
- krea2_controlnet
|
| 118 |
- ipadapter
|
| 119 |
- flux1_ipadapter
|
| 120 |
- sd3_ipadapter
|
|
|
|
| 7 |
enabled_chains:
|
| 8 |
- lora
|
| 9 |
- controlnet
|
|
|
|
|
|
|
|
|
|
| 10 |
- ipadapter
|
| 11 |
- flux1_ipadapter
|
| 12 |
- sd3_ipadapter
|
|
|
|
| 31 |
enabled_chains:
|
| 32 |
- lora
|
| 33 |
- controlnet
|
|
|
|
|
|
|
|
|
|
| 34 |
- ipadapter
|
| 35 |
- flux1_ipadapter
|
| 36 |
- sd3_ipadapter
|
|
|
|
| 54 |
enabled_chains:
|
| 55 |
- lora
|
| 56 |
- controlnet
|
|
|
|
|
|
|
|
|
|
| 57 |
- ipadapter
|
| 58 |
- flux1_ipadapter
|
| 59 |
- sd3_ipadapter
|
|
|
|
| 77 |
enabled_chains:
|
| 78 |
- lora
|
| 79 |
- controlnet
|
|
|
|
|
|
|
|
|
|
| 80 |
- ipadapter
|
| 81 |
- flux1_ipadapter
|
| 82 |
- sd3_ipadapter
|
|
|
|
| 100 |
enabled_chains:
|
| 101 |
- lora
|
| 102 |
- controlnet
|
|
|
|
|
|
|
|
|
|
| 103 |
- ipadapter
|
| 104 |
- flux1_ipadapter
|
| 105 |
- sd3_ipadapter
|