Spaces:
Running on Zero
Running on Zero
Add Krea-2 Identity Edit injector.
Browse files- README.md +2 -0
- chain_injectors/krea2_identity_edit_injector.py +159 -0
- comfy_integration/setup.py +8 -0
- core/pipelines/pipeline_input_processor.py +12 -0
- core/pipelines/sd_image_pipeline.py +2 -0
- core/pipelines/workflow_recipes/_partials/conditioning/krea-2.yaml +8 -0
- ui/events/chain_handlers.py +34 -1
- ui/events/change_handlers.py +4 -2
- ui/events/main.py +7 -2
- ui/events/run_handlers.py +3 -1
- ui/shared/hires_fix_ui.py +2 -1
- ui/shared/img2img_ui.py +2 -1
- ui/shared/inpaint_ui.py +2 -1
- ui/shared/outpaint_ui.py +2 -1
- ui/shared/txt2img_ui.py +2 -1
- ui/shared/ui_components.py +29 -0
- utils/app_utils.py +66 -0
- yaml/file_list.yaml +8 -3
- yaml/image_gen_features.yaml +1 -1
- yaml/injectors.yaml +3 -0
- yaml/model_list.yaml +1 -1
README.md
CHANGED
|
@@ -65,6 +65,7 @@ models:
|
|
| 65 |
- Comfy-Org/Wan_2.1_ComfyUI_repackaged
|
| 66 |
- Comfy-Org/z_image
|
| 67 |
- Comfy-Org/z_image_turbo
|
|
|
|
| 68 |
- cyberdelia/CyberRealisticPony
|
| 69 |
- diffusionmodels1254ani/hassakuAnima
|
| 70 |
- diffusionmodels1254ani/kirazuriAnima_v30AnimaBase1
|
|
@@ -111,6 +112,7 @@ models:
|
|
| 111 |
- stabilityai/stable-diffusion-3.5-controlnets
|
| 112 |
- stabilityai/stable-diffusion-xl-base-1.0
|
| 113 |
- stable-diffusion-v1-5/stable-diffusion-v1-5
|
|
|
|
| 114 |
- Wenaka/NoobAI_XL_Inpainting_ControlNet_Full
|
| 115 |
- xinsir/anime-painter
|
| 116 |
- xinsir/controlnet-canny-sdxl-1.0
|
|
|
|
| 65 |
- Comfy-Org/Wan_2.1_ComfyUI_repackaged
|
| 66 |
- Comfy-Org/z_image
|
| 67 |
- Comfy-Org/z_image_turbo
|
| 68 |
+
- conradlocke/krea2-identity-edit
|
| 69 |
- cyberdelia/CyberRealisticPony
|
| 70 |
- diffusionmodels1254ani/hassakuAnima
|
| 71 |
- diffusionmodels1254ani/kirazuriAnima_v30AnimaBase1
|
|
|
|
| 112 |
- stabilityai/stable-diffusion-3.5-controlnets
|
| 113 |
- stabilityai/stable-diffusion-xl-base-1.0
|
| 114 |
- stable-diffusion-v1-5/stable-diffusion-v1-5
|
| 115 |
+
- tsukiyomi/krea2_raw-nvfp4
|
| 116 |
- Wenaka/NoobAI_XL_Inpainting_ControlNet_Full
|
| 117 |
- xinsir/anime-painter
|
| 118 |
- xinsir/controlnet-canny-sdxl-1.0
|
chain_injectors/krea2_identity_edit_injector.py
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from utils.app_utils import ensure_file_downloaded
|
| 3 |
+
|
| 4 |
+
def inject(assembler, chain_definition, chain_items):
|
| 5 |
+
if not chain_items:
|
| 6 |
+
return
|
| 7 |
+
|
| 8 |
+
valid_images = []
|
| 9 |
+
for item in chain_items:
|
| 10 |
+
if not item:
|
| 11 |
+
continue
|
| 12 |
+
img_path = item
|
| 13 |
+
if isinstance(item, dict):
|
| 14 |
+
img_path = item.get('image') or item.get('filename') or item.get('path')
|
| 15 |
+
if img_path:
|
| 16 |
+
valid_images.append(img_path)
|
| 17 |
+
|
| 18 |
+
if not valid_images:
|
| 19 |
+
return
|
| 20 |
+
|
| 21 |
+
valid_images = valid_images[:2]
|
| 22 |
+
|
| 23 |
+
lora_filename = "krea2_identity_edit_v1_2.safetensors"
|
| 24 |
+
try:
|
| 25 |
+
ensure_file_downloaded(lora_filename)
|
| 26 |
+
except Exception as e:
|
| 27 |
+
print(f"Warning: Failed to ensure '{lora_filename}' downloaded: {e}")
|
| 28 |
+
|
| 29 |
+
ksampler_name = chain_definition.get('ksampler_node', 'ksampler')
|
| 30 |
+
pos_prompt_name = chain_definition.get('pos_prompt_node', 'pos_prompt')
|
| 31 |
+
neg_prompt_name = chain_definition.get('neg_prompt_node', 'neg_prompt')
|
| 32 |
+
clip_loader_name = chain_definition.get('clip_loader_node', 'clip_loader')
|
| 33 |
+
vae_loader_name = chain_definition.get('vae_loader_node', 'vae_loader')
|
| 34 |
+
|
| 35 |
+
if ksampler_name not in assembler.node_map:
|
| 36 |
+
print(f"Warning: Target node '{ksampler_name}' for Krea2 Identity Edit chain not found. Skipping.")
|
| 37 |
+
return
|
| 38 |
+
|
| 39 |
+
ksampler_id = assembler.node_map[ksampler_name]
|
| 40 |
+
|
| 41 |
+
if 'model' not in assembler.workflow[ksampler_id]['inputs']:
|
| 42 |
+
print(f"Warning: KSampler node '{ksampler_name}' is missing 'model' input. Skipping.")
|
| 43 |
+
return
|
| 44 |
+
|
| 45 |
+
latent_connection = assembler.workflow[ksampler_id]['inputs'].get('latent_image')
|
| 46 |
+
if not latent_connection:
|
| 47 |
+
print(f"Warning: KSampler node '{ksampler_name}' is missing 'latent_image' input. Skipping.")
|
| 48 |
+
return
|
| 49 |
+
|
| 50 |
+
current_model_connection = assembler.workflow[ksampler_id]['inputs']['model']
|
| 51 |
+
|
| 52 |
+
vae_connection = None
|
| 53 |
+
if vae_loader_name in assembler.node_map:
|
| 54 |
+
vae_connection = [assembler.node_map[vae_loader_name], 0]
|
| 55 |
+
|
| 56 |
+
clip_connection = None
|
| 57 |
+
if clip_loader_name in assembler.node_map:
|
| 58 |
+
clip_connection = [assembler.node_map[clip_loader_name], 0]
|
| 59 |
+
elif pos_prompt_name in assembler.node_map:
|
| 60 |
+
pos_id = assembler.node_map[pos_prompt_name]
|
| 61 |
+
clip_connection = assembler.workflow[pos_id]['inputs'].get('clip')
|
| 62 |
+
|
| 63 |
+
lora_loader_id = assembler._get_unique_id()
|
| 64 |
+
lora_loader_node = assembler._get_node_template("LoraLoaderModelOnly")
|
| 65 |
+
lora_loader_node['inputs']['lora_name'] = lora_filename
|
| 66 |
+
lora_loader_node['inputs']['strength_model'] = 1.0
|
| 67 |
+
lora_loader_node['inputs']['model'] = current_model_connection
|
| 68 |
+
lora_loader_node['_meta']['title'] = "Load LoRA (Krea2 Identity Edit)"
|
| 69 |
+
assembler.workflow[lora_loader_id] = lora_loader_node
|
| 70 |
+
|
| 71 |
+
image_ids = []
|
| 72 |
+
vae_encode_ids = []
|
| 73 |
+
|
| 74 |
+
for i, img_filename in enumerate(valid_images):
|
| 75 |
+
load_id = assembler._get_unique_id()
|
| 76 |
+
load_node = assembler._get_node_template("LoadImage")
|
| 77 |
+
load_node['inputs']['image'] = img_filename
|
| 78 |
+
load_node['_meta']['title'] = f"Load Image (Ref {i+1})"
|
| 79 |
+
assembler.workflow[load_id] = load_node
|
| 80 |
+
image_ids.append(load_id)
|
| 81 |
+
|
| 82 |
+
vae_enc_id = assembler._get_unique_id()
|
| 83 |
+
vae_enc_node = assembler._get_node_template("VAEEncode")
|
| 84 |
+
vae_enc_node['inputs']['pixels'] = [load_id, 0]
|
| 85 |
+
if vae_connection:
|
| 86 |
+
vae_enc_node['inputs']['vae'] = vae_connection
|
| 87 |
+
vae_enc_node['_meta']['title'] = f"VAE Encode (Ref {i+1})"
|
| 88 |
+
assembler.workflow[vae_enc_id] = vae_enc_node
|
| 89 |
+
vae_encode_ids.append(vae_enc_id)
|
| 90 |
+
|
| 91 |
+
patch_id = assembler._get_unique_id()
|
| 92 |
+
patch_node = assembler._get_node_template("Krea2EditModelPatch")
|
| 93 |
+
patch_node['inputs']['ref_boost'] = 4
|
| 94 |
+
patch_node['inputs']['ref_boost_a'] = 1
|
| 95 |
+
patch_node['inputs']['fit_mode'] = "fit"
|
| 96 |
+
patch_node['inputs']['model'] = [lora_loader_id, 0]
|
| 97 |
+
patch_node['inputs']['source_latent'] = [vae_encode_ids[0], 0]
|
| 98 |
+
if vae_connection:
|
| 99 |
+
patch_node['inputs']['vae'] = vae_connection
|
| 100 |
+
patch_node['inputs']['source_image'] = [image_ids[0], 0]
|
| 101 |
+
patch_node['inputs']['target_latent'] = latent_connection
|
| 102 |
+
|
| 103 |
+
if len(valid_images) > 1:
|
| 104 |
+
patch_node['inputs']['source_latent_b'] = [vae_encode_ids[1], 0]
|
| 105 |
+
patch_node['inputs']['source_image_b'] = [image_ids[1], 0]
|
| 106 |
+
|
| 107 |
+
patch_node['_meta']['title'] = "Krea2 Edit (source patch)"
|
| 108 |
+
assembler.workflow[patch_id] = patch_node
|
| 109 |
+
|
| 110 |
+
assembler.workflow[ksampler_id]['inputs']['model'] = [patch_id, 0]
|
| 111 |
+
|
| 112 |
+
pos_prompt_id = assembler.node_map.get(pos_prompt_name)
|
| 113 |
+
neg_prompt_id = assembler.node_map.get(neg_prompt_name)
|
| 114 |
+
|
| 115 |
+
pos_text = ""
|
| 116 |
+
if pos_prompt_id and pos_prompt_id in assembler.workflow:
|
| 117 |
+
pos_text = assembler.workflow[pos_prompt_id]['inputs'].get('text', '')
|
| 118 |
+
|
| 119 |
+
neg_text = ""
|
| 120 |
+
if neg_prompt_id and neg_prompt_id in assembler.workflow:
|
| 121 |
+
neg_text = assembler.workflow[neg_prompt_id]['inputs'].get('text', '')
|
| 122 |
+
|
| 123 |
+
pos_grounded_id = assembler._get_unique_id()
|
| 124 |
+
pos_grounded_node = assembler._get_node_template("Krea2EditGroundedEncode")
|
| 125 |
+
pos_grounded_node['inputs']['prompt'] = pos_text
|
| 126 |
+
pos_grounded_node['inputs']['grounding_px'] = 768
|
| 127 |
+
pos_grounded_node['inputs']['system_prompt'] = ""
|
| 128 |
+
if clip_connection:
|
| 129 |
+
pos_grounded_node['inputs']['clip'] = clip_connection
|
| 130 |
+
pos_grounded_node['inputs']['image'] = [image_ids[0], 0]
|
| 131 |
+
if len(valid_images) > 1:
|
| 132 |
+
pos_grounded_node['inputs']['image_b'] = [image_ids[1], 0]
|
| 133 |
+
pos_grounded_node['_meta']['title'] = "Krea2 Edit (grounded encode positive)"
|
| 134 |
+
assembler.workflow[pos_grounded_id] = pos_grounded_node
|
| 135 |
+
|
| 136 |
+
assembler.workflow[ksampler_id]['inputs']['positive'] = [pos_grounded_id, 0]
|
| 137 |
+
|
| 138 |
+
neg_grounded_id = assembler._get_unique_id()
|
| 139 |
+
neg_grounded_node = assembler._get_node_template("Krea2EditGroundedEncode")
|
| 140 |
+
neg_grounded_node['inputs']['prompt'] = neg_text
|
| 141 |
+
neg_grounded_node['inputs']['grounding_px'] = 768
|
| 142 |
+
neg_grounded_node['inputs']['system_prompt'] = ""
|
| 143 |
+
if clip_connection:
|
| 144 |
+
neg_grounded_node['inputs']['clip'] = clip_connection
|
| 145 |
+
neg_grounded_node['inputs']['image'] = [image_ids[0], 0]
|
| 146 |
+
if len(valid_images) > 1:
|
| 147 |
+
neg_grounded_node['inputs']['image_b'] = [image_ids[1], 0]
|
| 148 |
+
neg_grounded_node['_meta']['title'] = "Krea2 Edit (grounded encode negative)"
|
| 149 |
+
assembler.workflow[neg_grounded_id] = neg_grounded_node
|
| 150 |
+
|
| 151 |
+
assembler.workflow[ksampler_id]['inputs']['negative'] = [neg_grounded_id, 0]
|
| 152 |
+
|
| 153 |
+
if pos_prompt_id and pos_prompt_id in assembler.workflow:
|
| 154 |
+
del assembler.workflow[pos_prompt_id]
|
| 155 |
+
|
| 156 |
+
if neg_prompt_id and neg_prompt_id in assembler.workflow:
|
| 157 |
+
del assembler.workflow[neg_prompt_id]
|
| 158 |
+
|
| 159 |
+
print(f"Krea2 Identity Edit injector applied with {len(valid_images)} reference image(s). Original CLIPTextEncode nodes removed.")
|
comfy_integration/setup.py
CHANGED
|
@@ -88,6 +88,14 @@ def initialize_comfyui():
|
|
| 88 |
else:
|
| 89 |
print("✅ comfyui-krea2-controlnet extension already exists.")
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
print(f"✅ Current working directory is: {os.getcwd()}")
|
| 92 |
|
| 93 |
import comfy.model_management
|
|
|
|
| 88 |
else:
|
| 89 |
print("✅ comfyui-krea2-controlnet extension already exists.")
|
| 90 |
|
| 91 |
+
# 6. comfyui-krea2edit
|
| 92 |
+
krea2edit_nodes_path = os.path.join(APP_DIR, "custom_nodes", "comfyui-krea2edit")
|
| 93 |
+
if not os.path.exists(krea2edit_nodes_path):
|
| 94 |
+
os.system(f"git clone https://github.com/lbouaraba/comfyui-krea2edit.git {krea2edit_nodes_path}")
|
| 95 |
+
print("✅ comfyui-krea2edit extension cloned.")
|
| 96 |
+
else:
|
| 97 |
+
print("✅ comfyui-krea2edit extension already exists.")
|
| 98 |
+
|
| 99 |
print(f"✅ Current working directory is: {os.getcwd()}")
|
| 100 |
|
| 101 |
import comfy.model_management
|
core/pipelines/pipeline_input_processor.py
CHANGED
|
@@ -357,6 +357,17 @@ def process_pipeline_inputs(ui_inputs: Dict[str, Any], progress: gr.Progress, wo
|
|
| 357 |
temp_files_to_clean.append(temp_path)
|
| 358 |
active_joyai_reference.append(os.path.basename(temp_path))
|
| 359 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 360 |
reference_image_data = ui_inputs.get('reference_image_data', [])
|
| 361 |
active_reference_images = []
|
| 362 |
if reference_image_data:
|
|
@@ -410,6 +421,7 @@ def process_pipeline_inputs(ui_inputs: Dict[str, Any], progress: gr.Progress, wo
|
|
| 410 |
"active_reference_latents": active_reference_latents,
|
| 411 |
"active_hidream_o1_reference": active_hidream_o1_reference,
|
| 412 |
"active_joyai_reference": active_joyai_reference,
|
|
|
|
| 413 |
"active_reference_images": active_reference_images,
|
| 414 |
"active_conditioning": active_conditioning,
|
| 415 |
"temp_files_to_clean": temp_files_to_clean
|
|
|
|
| 357 |
temp_files_to_clean.append(temp_path)
|
| 358 |
active_joyai_reference.append(os.path.basename(temp_path))
|
| 359 |
|
| 360 |
+
krea2_identity_edit_data = ui_inputs.get('krea2_identity_edit_data', [])
|
| 361 |
+
active_krea2_identity_edit = []
|
| 362 |
+
if krea2_identity_edit_data:
|
| 363 |
+
for img in krea2_identity_edit_data:
|
| 364 |
+
if img:
|
| 365 |
+
if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)
|
| 366 |
+
temp_path = os.path.join(INPUT_DIR, f"temp_krea2_id_ref_{random.randint(1000, 9999)}.png")
|
| 367 |
+
img.save(temp_path, "PNG")
|
| 368 |
+
temp_files_to_clean.append(temp_path)
|
| 369 |
+
active_krea2_identity_edit.append(os.path.basename(temp_path))
|
| 370 |
+
|
| 371 |
reference_image_data = ui_inputs.get('reference_image_data', [])
|
| 372 |
active_reference_images = []
|
| 373 |
if reference_image_data:
|
|
|
|
| 421 |
"active_reference_latents": active_reference_latents,
|
| 422 |
"active_hidream_o1_reference": active_hidream_o1_reference,
|
| 423 |
"active_joyai_reference": active_joyai_reference,
|
| 424 |
+
"active_krea2_identity_edit": active_krea2_identity_edit,
|
| 425 |
"active_reference_images": active_reference_images,
|
| 426 |
"active_conditioning": active_conditioning,
|
| 427 |
"temp_files_to_clean": temp_files_to_clean
|
core/pipelines/sd_image_pipeline.py
CHANGED
|
@@ -117,6 +117,7 @@ class SdImagePipeline(BasePipeline):
|
|
| 117 |
active_reference_latents = processed["active_reference_latents"]
|
| 118 |
active_hidream_o1_reference = processed["active_hidream_o1_reference"]
|
| 119 |
active_joyai_reference = processed.get("active_joyai_reference", [])
|
|
|
|
| 120 |
active_reference_images = processed.get("active_reference_images", [])
|
| 121 |
active_conditioning = processed["active_conditioning"]
|
| 122 |
|
|
@@ -175,6 +176,7 @@ class SdImagePipeline(BasePipeline):
|
|
| 175 |
"reference_latent_chain": active_reference_latents,
|
| 176 |
"hidream_o1_reference_chain": active_hidream_o1_reference,
|
| 177 |
"joyai_reference_chain": active_joyai_reference,
|
|
|
|
| 178 |
"reference_image_chain": active_reference_images,
|
| 179 |
"vae_chain": [ui_inputs.get('vae_name')] if ui_inputs.get('vae_name') else [],
|
| 180 |
"hidream_o1_smoothing_chain": hidream_o1_smoothing_data,
|
|
|
|
| 117 |
active_reference_latents = processed["active_reference_latents"]
|
| 118 |
active_hidream_o1_reference = processed["active_hidream_o1_reference"]
|
| 119 |
active_joyai_reference = processed.get("active_joyai_reference", [])
|
| 120 |
+
active_krea2_identity_edit = processed.get("active_krea2_identity_edit", [])
|
| 121 |
active_reference_images = processed.get("active_reference_images", [])
|
| 122 |
active_conditioning = processed["active_conditioning"]
|
| 123 |
|
|
|
|
| 176 |
"reference_latent_chain": active_reference_latents,
|
| 177 |
"hidream_o1_reference_chain": active_hidream_o1_reference,
|
| 178 |
"joyai_reference_chain": active_joyai_reference,
|
| 179 |
+
"krea2_identity_edit_chain": active_krea2_identity_edit,
|
| 180 |
"reference_image_chain": active_reference_images,
|
| 181 |
"vae_chain": [ui_inputs.get('vae_name')] if ui_inputs.get('vae_name') else [],
|
| 182 |
"hidream_o1_smoothing_chain": hidream_o1_smoothing_data,
|
core/pipelines/workflow_recipes/_partials/conditioning/krea-2.yaml
CHANGED
|
@@ -54,6 +54,14 @@ dynamic_krea2_controlnet_chains:
|
|
| 54 |
ksampler_node: "ksampler"
|
| 55 |
vae_source: "vae_loader:0"
|
| 56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
dynamic_conditioning_chains:
|
| 58 |
conditioning_chain:
|
| 59 |
ksampler_node: "ksampler"
|
|
|
|
| 54 |
ksampler_node: "ksampler"
|
| 55 |
vae_source: "vae_loader:0"
|
| 56 |
|
| 57 |
+
dynamic_krea2_identity_edit_chains:
|
| 58 |
+
krea2_identity_edit_chain:
|
| 59 |
+
ksampler_node: "ksampler"
|
| 60 |
+
pos_prompt_node: "pos_prompt"
|
| 61 |
+
neg_prompt_node: "neg_prompt"
|
| 62 |
+
clip_loader_node: "clip_loader"
|
| 63 |
+
vae_loader_node: "vae_loader"
|
| 64 |
+
|
| 65 |
dynamic_conditioning_chains:
|
| 66 |
conditioning_chain:
|
| 67 |
ksampler_node: "ksampler"
|
ui/events/chain_handlers.py
CHANGED
|
@@ -856,4 +856,37 @@ def create_conditioning_event_handlers(prefix, ui_components):
|
|
| 856 |
add_outputs = [count_state, add_button, del_button] + rows
|
| 857 |
del_outputs = [count_state, add_button, del_button] + rows + prompts
|
| 858 |
add_button.click(fn=add_row, inputs=[count_state], outputs=add_outputs, show_progress=False)
|
| 859 |
-
del_button.click(fn=del_row, inputs=[count_state], outputs=del_outputs, show_progress=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 856 |
add_outputs = [count_state, add_button, del_button] + rows
|
| 857 |
del_outputs = [count_state, add_button, del_button] + rows + prompts
|
| 858 |
add_button.click(fn=add_row, inputs=[count_state], outputs=add_outputs, show_progress=False)
|
| 859 |
+
del_button.click(fn=del_row, inputs=[count_state], outputs=del_outputs, show_progress=False)
|
| 860 |
+
|
| 861 |
+
|
| 862 |
+
def create_krea2_identity_edit_event_handlers(prefix, ui_components):
|
| 863 |
+
ref_rows = ui_components.get(f'krea2_identity_edit_rows_{prefix}')
|
| 864 |
+
if not ref_rows: return
|
| 865 |
+
count_state = ui_components[f'krea2_identity_edit_count_state_{prefix}']
|
| 866 |
+
add_button = ui_components[f'add_krea2_identity_edit_button_{prefix}']
|
| 867 |
+
del_button = ui_components[f'delete_krea2_identity_edit_button_{prefix}']
|
| 868 |
+
images = ui_components[f'krea2_identity_edit_images_{prefix}']
|
| 869 |
+
|
| 870 |
+
def add_ref_row(c):
|
| 871 |
+
c += 1
|
| 872 |
+
return {
|
| 873 |
+
count_state: c,
|
| 874 |
+
ref_rows[c - 1]: gr.update(visible=True),
|
| 875 |
+
add_button: gr.update(visible=c < 2),
|
| 876 |
+
del_button: gr.update(visible=True),
|
| 877 |
+
}
|
| 878 |
+
|
| 879 |
+
def del_ref_row(c):
|
| 880 |
+
c -= 1
|
| 881 |
+
return {
|
| 882 |
+
count_state: c,
|
| 883 |
+
ref_rows[c]: gr.update(visible=False),
|
| 884 |
+
images[c]: None,
|
| 885 |
+
add_button: gr.update(visible=True),
|
| 886 |
+
del_button: gr.update(visible=c > 0),
|
| 887 |
+
}
|
| 888 |
+
|
| 889 |
+
add_outputs = [count_state, add_button, del_button] + ref_rows
|
| 890 |
+
del_outputs = [count_state, add_button, del_button] + ref_rows + images
|
| 891 |
+
add_button.click(fn=add_ref_row, inputs=[count_state], outputs=add_outputs, show_progress=False)
|
| 892 |
+
del_button.click(fn=del_ref_row, inputs=[count_state], outputs=del_outputs, show_progress=False)
|
ui/events/change_handlers.py
CHANGED
|
@@ -17,7 +17,7 @@ from .config_loaders import (
|
|
| 17 |
load_ipadapter_config
|
| 18 |
)
|
| 19 |
|
| 20 |
-
def make_update_fn(m_comp, cat_comp, cs_comp, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths, anima_cn_types, anima_cn_series, anima_cn_filepaths, diffsynth_cn_types, diffsynth_cn_series, diffsynth_cn_filepaths, krea2_cn_types, krea2_cn_series, krea2_cn_filepaths, ipa_preset, lora_acc, cn_acc, anima_cn_acc, diffsynth_cn_acc, krea2_cn_acc, ipa_acc, sd3_ipa_acc, flux1_ipa_acc, style_acc, embed_acc, cond_acc, ref_latent_acc, hidream_o1_ref_acc, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp, pid_acc=None, vae_acc=None, joyai_ref_acc=None, ref_img_acc=None):
|
| 21 |
def update_fn(*args):
|
| 22 |
arch = args[0]
|
| 23 |
category = args[1]
|
|
@@ -69,6 +69,7 @@ def make_update_fn(m_comp, cat_comp, cs_comp, ar_comp, width_comp, height_comp,
|
|
| 69 |
if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))
|
| 70 |
if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))
|
| 71 |
if joyai_ref_acc: updates[joyai_ref_acc] = gr.update(visible=('joyai_reference' in enabled_chains))
|
|
|
|
| 72 |
if ref_img_acc: updates[ref_img_acc] = gr.update(visible=('reference_image' in enabled_chains))
|
| 73 |
if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))
|
| 74 |
if vae_acc: updates[vae_acc] = gr.update(visible=('vae' in enabled_chains))
|
|
@@ -144,7 +145,7 @@ def make_update_fn(m_comp, cat_comp, cs_comp, ar_comp, width_comp, height_comp,
|
|
| 144 |
return update_fn
|
| 145 |
|
| 146 |
|
| 147 |
-
def make_model_change_fn(cat_comp_ref, cs_comp, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths, anima_cn_types, anima_cn_series, anima_cn_filepaths, diffsynth_cn_types, diffsynth_cn_series, diffsynth_cn_filepaths, krea2_cn_types, krea2_cn_series, krea2_cn_filepaths, arch_comp_ref, ipa_preset, lora_acc, cn_acc, anima_cn_acc, diffsynth_cn_acc, krea2_cn_acc, ipa_acc, sd3_ipa_acc, flux1_ipa_acc, style_acc, embed_acc, cond_acc, ref_latent_acc, hidream_o1_ref_acc, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp, pid_acc=None, vae_acc=None, joyai_ref_acc=None, ref_img_acc=None):
|
| 148 |
def change_fn(*args):
|
| 149 |
model_name = args[0]
|
| 150 |
idx = 1
|
|
@@ -201,6 +202,7 @@ def make_model_change_fn(cat_comp_ref, cs_comp, ar_comp, width_comp, height_comp
|
|
| 201 |
if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))
|
| 202 |
if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))
|
| 203 |
if joyai_ref_acc: updates[joyai_ref_acc] = gr.update(visible=('joyai_reference' in enabled_chains))
|
|
|
|
| 204 |
if ref_img_acc: updates[ref_img_acc] = gr.update(visible=('reference_image' in enabled_chains))
|
| 205 |
if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))
|
| 206 |
if vae_acc: updates[vae_acc] = gr.update(visible=('vae' in enabled_chains))
|
|
|
|
| 17 |
load_ipadapter_config
|
| 18 |
)
|
| 19 |
|
| 20 |
+
def make_update_fn(m_comp, cat_comp, cs_comp, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths, anima_cn_types, anima_cn_series, anima_cn_filepaths, diffsynth_cn_types, diffsynth_cn_series, diffsynth_cn_filepaths, krea2_cn_types, krea2_cn_series, krea2_cn_filepaths, ipa_preset, lora_acc, cn_acc, anima_cn_acc, diffsynth_cn_acc, krea2_cn_acc, ipa_acc, sd3_ipa_acc, flux1_ipa_acc, style_acc, embed_acc, cond_acc, ref_latent_acc, hidream_o1_ref_acc, guidance_comp, 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, ref_img_acc=None):
|
| 21 |
def update_fn(*args):
|
| 22 |
arch = args[0]
|
| 23 |
category = args[1]
|
|
|
|
| 69 |
if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))
|
| 70 |
if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))
|
| 71 |
if joyai_ref_acc: updates[joyai_ref_acc] = gr.update(visible=('joyai_reference' in enabled_chains))
|
| 72 |
+
if krea2_identity_edit_acc: updates[krea2_identity_edit_acc] = gr.update(visible=('krea2_identity_edit' in enabled_chains))
|
| 73 |
if ref_img_acc: updates[ref_img_acc] = gr.update(visible=('reference_image' in enabled_chains))
|
| 74 |
if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))
|
| 75 |
if vae_acc: updates[vae_acc] = gr.update(visible=('vae' in enabled_chains))
|
|
|
|
| 145 |
return update_fn
|
| 146 |
|
| 147 |
|
| 148 |
+
def make_model_change_fn(cat_comp_ref, cs_comp, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths, anima_cn_types, anima_cn_series, anima_cn_filepaths, diffsynth_cn_types, diffsynth_cn_series, diffsynth_cn_filepaths, krea2_cn_types, krea2_cn_series, krea2_cn_filepaths, arch_comp_ref, ipa_preset, lora_acc, cn_acc, anima_cn_acc, diffsynth_cn_acc, krea2_cn_acc, ipa_acc, sd3_ipa_acc, flux1_ipa_acc, style_acc, embed_acc, cond_acc, ref_latent_acc, hidream_o1_ref_acc, guidance_comp, 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, ref_img_acc=None):
|
| 149 |
def change_fn(*args):
|
| 150 |
model_name = args[0]
|
| 151 |
idx = 1
|
|
|
|
| 202 |
if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))
|
| 203 |
if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))
|
| 204 |
if joyai_ref_acc: updates[joyai_ref_acc] = gr.update(visible=('joyai_reference' in enabled_chains))
|
| 205 |
+
if krea2_identity_edit_acc: updates[krea2_identity_edit_acc] = gr.update(visible=('krea2_identity_edit' in enabled_chains))
|
| 206 |
if ref_img_acc: updates[ref_img_acc] = gr.update(visible=('reference_image' in enabled_chains))
|
| 207 |
if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))
|
| 208 |
if vae_acc: updates[vae_acc] = gr.update(visible=('vae' in enabled_chains))
|
ui/events/main.py
CHANGED
|
@@ -14,6 +14,7 @@ from .chain_handlers import (
|
|
| 14 |
create_reference_latent_event_handlers,
|
| 15 |
create_hidream_o1_reference_event_handlers,
|
| 16 |
create_joyai_reference_event_handlers,
|
|
|
|
| 17 |
create_reference_image_event_handlers
|
| 18 |
)
|
| 19 |
from .change_handlers import (
|
|
@@ -69,6 +70,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 69 |
ref_latent_accordion = ui_components.get(f'reference_latent_accordion_{prefix}')
|
| 70 |
hidream_o1_ref_accordion = ui_components.get(f'hidream_o1_reference_accordion_{prefix}')
|
| 71 |
joyai_ref_accordion = ui_components.get(f'joyai_reference_accordion_{prefix}')
|
|
|
|
| 72 |
ref_img_accordion = ui_components.get(f'reference_image_accordion_{prefix}')
|
| 73 |
pid_accordion = ui_components.get(f'pid_accordion_{prefix}')
|
| 74 |
vae_accordion = ui_components.get(f'vae_accordion_{prefix}')
|
|
@@ -108,6 +110,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 108 |
if ref_latent_accordion: outputs.append(ref_latent_accordion)
|
| 109 |
if hidream_o1_ref_accordion: outputs.append(hidream_o1_ref_accordion)
|
| 110 |
if joyai_ref_accordion: outputs.append(joyai_ref_accordion)
|
|
|
|
| 111 |
if ref_img_accordion: outputs.append(ref_img_accordion)
|
| 112 |
if pid_accordion: outputs.append(pid_accordion)
|
| 113 |
if vae_accordion: outputs.append(vae_accordion)
|
|
@@ -123,7 +126,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 123 |
krea2_cn_types_list, krea2_cn_series_list, krea2_cn_filepaths_list,
|
| 124 |
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,
|
| 125 |
ref_latent_accordion, hidream_o1_ref_accordion, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 126 |
-
pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, ref_img_acc=ref_img_accordion
|
| 127 |
)
|
| 128 |
inputs = [arch_comp, cat_comp]
|
| 129 |
if aspect_ratio_comp:
|
|
@@ -156,6 +159,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 156 |
if ref_latent_accordion: outputs2.append(ref_latent_accordion)
|
| 157 |
if hidream_o1_ref_accordion: outputs2.append(hidream_o1_ref_accordion)
|
| 158 |
if joyai_ref_accordion: outputs2.append(joyai_ref_accordion)
|
|
|
|
| 159 |
if ref_img_accordion: outputs2.append(ref_img_accordion)
|
| 160 |
if pid_accordion: outputs2.append(pid_accordion)
|
| 161 |
if vae_accordion: outputs2.append(vae_accordion)
|
|
@@ -176,7 +180,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 176 |
krea2_cn_types_list, krea2_cn_series_list, krea2_cn_filepaths_list,
|
| 177 |
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,
|
| 178 |
ref_latent_accordion, hidream_o1_ref_accordion, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 179 |
-
pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, ref_img_acc=ref_img_accordion
|
| 180 |
)
|
| 181 |
model_comp.change(fn=change_fn, inputs=inputs2, outputs=outputs2)
|
| 182 |
|
|
@@ -194,6 +198,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 194 |
create_reference_latent_event_handlers(prefix, ui_components)
|
| 195 |
create_hidream_o1_reference_event_handlers(prefix, ui_components)
|
| 196 |
create_joyai_reference_event_handlers(prefix, ui_components)
|
|
|
|
| 197 |
create_reference_image_event_handlers(prefix, ui_components)
|
| 198 |
create_run_event(prefix, task_type, ui_components)
|
| 199 |
|
|
|
|
| 14 |
create_reference_latent_event_handlers,
|
| 15 |
create_hidream_o1_reference_event_handlers,
|
| 16 |
create_joyai_reference_event_handlers,
|
| 17 |
+
create_krea2_identity_edit_event_handlers,
|
| 18 |
create_reference_image_event_handlers
|
| 19 |
)
|
| 20 |
from .change_handlers import (
|
|
|
|
| 70 |
ref_latent_accordion = ui_components.get(f'reference_latent_accordion_{prefix}')
|
| 71 |
hidream_o1_ref_accordion = ui_components.get(f'hidream_o1_reference_accordion_{prefix}')
|
| 72 |
joyai_ref_accordion = ui_components.get(f'joyai_reference_accordion_{prefix}')
|
| 73 |
+
krea2_identity_edit_accordion = ui_components.get(f'krea2_identity_edit_accordion_{prefix}')
|
| 74 |
ref_img_accordion = ui_components.get(f'reference_image_accordion_{prefix}')
|
| 75 |
pid_accordion = ui_components.get(f'pid_accordion_{prefix}')
|
| 76 |
vae_accordion = ui_components.get(f'vae_accordion_{prefix}')
|
|
|
|
| 110 |
if ref_latent_accordion: outputs.append(ref_latent_accordion)
|
| 111 |
if hidream_o1_ref_accordion: outputs.append(hidream_o1_ref_accordion)
|
| 112 |
if joyai_ref_accordion: outputs.append(joyai_ref_accordion)
|
| 113 |
+
if krea2_identity_edit_accordion: outputs.append(krea2_identity_edit_accordion)
|
| 114 |
if ref_img_accordion: outputs.append(ref_img_accordion)
|
| 115 |
if pid_accordion: outputs.append(pid_accordion)
|
| 116 |
if vae_accordion: outputs.append(vae_accordion)
|
|
|
|
| 126 |
krea2_cn_types_list, krea2_cn_series_list, krea2_cn_filepaths_list,
|
| 127 |
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,
|
| 128 |
ref_latent_accordion, hidream_o1_ref_accordion, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 129 |
+
pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, krea2_identity_edit_acc=krea2_identity_edit_accordion, ref_img_acc=ref_img_accordion
|
| 130 |
)
|
| 131 |
inputs = [arch_comp, cat_comp]
|
| 132 |
if aspect_ratio_comp:
|
|
|
|
| 159 |
if ref_latent_accordion: outputs2.append(ref_latent_accordion)
|
| 160 |
if hidream_o1_ref_accordion: outputs2.append(hidream_o1_ref_accordion)
|
| 161 |
if joyai_ref_accordion: outputs2.append(joyai_ref_accordion)
|
| 162 |
+
if krea2_identity_edit_accordion: outputs2.append(krea2_identity_edit_accordion)
|
| 163 |
if ref_img_accordion: outputs2.append(ref_img_accordion)
|
| 164 |
if pid_accordion: outputs2.append(pid_accordion)
|
| 165 |
if vae_accordion: outputs2.append(vae_accordion)
|
|
|
|
| 180 |
krea2_cn_types_list, krea2_cn_series_list, krea2_cn_filepaths_list,
|
| 181 |
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,
|
| 182 |
ref_latent_accordion, hidream_o1_ref_accordion, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 183 |
+
pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, krea2_identity_edit_acc=krea2_identity_edit_accordion, ref_img_acc=ref_img_accordion
|
| 184 |
)
|
| 185 |
model_comp.change(fn=change_fn, inputs=inputs2, outputs=outputs2)
|
| 186 |
|
|
|
|
| 198 |
create_reference_latent_event_handlers(prefix, ui_components)
|
| 199 |
create_hidream_o1_reference_event_handlers(prefix, ui_components)
|
| 200 |
create_joyai_reference_event_handlers(prefix, ui_components)
|
| 201 |
+
create_krea2_identity_edit_event_handlers(prefix, ui_components)
|
| 202 |
create_reference_image_event_handlers(prefix, ui_components)
|
| 203 |
create_run_event(prefix, task_type, ui_components)
|
| 204 |
|
ui/events/run_handlers.py
CHANGED
|
@@ -53,6 +53,7 @@ def create_run_event(prefix: str, task_type: str, ui_components: dict):
|
|
| 53 |
reference_latent_data_components = ui_components.get(f'all_reference_latent_components_flat_{prefix}', [])
|
| 54 |
hidream_o1_reference_data_components = ui_components.get(f'all_hidream_o1_reference_components_flat_{prefix}', [])
|
| 55 |
joyai_reference_data_components = ui_components.get(f'all_joyai_reference_components_flat_{prefix}', [])
|
|
|
|
| 56 |
reference_image_data_components = ui_components.get(f'all_reference_image_components_flat_{prefix}', [])
|
| 57 |
|
| 58 |
run_inputs_map['vae_source'] = ui_components.get(f'vae_source_{prefix}')
|
|
@@ -64,7 +65,7 @@ def create_run_event(prefix: str, task_type: str, ui_components: dict):
|
|
| 64 |
all_chains = [
|
| 65 |
lora_data_components, controlnet_data_components, anima_controlnet_lllite_data_components, diffsynth_controlnet_data_components, krea2_controlnet_data_components, ipadapter_data_components,
|
| 66 |
sd3_ipadapter_data_components, flux1_ipadapter_data_components, style_data_components,
|
| 67 |
-
embedding_data_components, conditioning_data_components, reference_latent_data_components, hidream_o1_reference_data_components, joyai_reference_data_components, reference_image_data_components
|
| 68 |
]
|
| 69 |
for chain in all_chains:
|
| 70 |
if chain:
|
|
@@ -95,6 +96,7 @@ def create_run_event(prefix: str, task_type: str, ui_components: dict):
|
|
| 95 |
assign_chain_data('reference_latent_data', reference_latent_data_components)
|
| 96 |
assign_chain_data('hidream_o1_reference_data', hidream_o1_reference_data_components)
|
| 97 |
assign_chain_data('joyai_reference_data', joyai_reference_data_components)
|
|
|
|
| 98 |
assign_chain_data('reference_image_data', reference_image_data_components)
|
| 99 |
|
| 100 |
return ui_dict
|
|
|
|
| 53 |
reference_latent_data_components = ui_components.get(f'all_reference_latent_components_flat_{prefix}', [])
|
| 54 |
hidream_o1_reference_data_components = ui_components.get(f'all_hidream_o1_reference_components_flat_{prefix}', [])
|
| 55 |
joyai_reference_data_components = ui_components.get(f'all_joyai_reference_components_flat_{prefix}', [])
|
| 56 |
+
krea2_identity_edit_data_components = ui_components.get(f'all_krea2_identity_edit_components_flat_{prefix}', [])
|
| 57 |
reference_image_data_components = ui_components.get(f'all_reference_image_components_flat_{prefix}', [])
|
| 58 |
|
| 59 |
run_inputs_map['vae_source'] = ui_components.get(f'vae_source_{prefix}')
|
|
|
|
| 65 |
all_chains = [
|
| 66 |
lora_data_components, controlnet_data_components, anima_controlnet_lllite_data_components, diffsynth_controlnet_data_components, krea2_controlnet_data_components, ipadapter_data_components,
|
| 67 |
sd3_ipadapter_data_components, flux1_ipadapter_data_components, style_data_components,
|
| 68 |
+
embedding_data_components, conditioning_data_components, reference_latent_data_components, hidream_o1_reference_data_components, joyai_reference_data_components, krea2_identity_edit_data_components, reference_image_data_components
|
| 69 |
]
|
| 70 |
for chain in all_chains:
|
| 71 |
if chain:
|
|
|
|
| 96 |
assign_chain_data('reference_latent_data', reference_latent_data_components)
|
| 97 |
assign_chain_data('hidream_o1_reference_data', hidream_o1_reference_data_components)
|
| 98 |
assign_chain_data('joyai_reference_data', joyai_reference_data_components)
|
| 99 |
+
assign_chain_data('krea2_identity_edit_data', krea2_identity_edit_data_components)
|
| 100 |
assign_chain_data('reference_image_data', reference_image_data_components)
|
| 101 |
|
| 102 |
return ui_dict
|
ui/shared/hires_fix_ui.py
CHANGED
|
@@ -7,7 +7,7 @@ from .ui_components import (
|
|
| 7 |
create_conditioning_ui, create_vae_override_ui,
|
| 8 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 9 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
| 10 |
-
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui
|
| 11 |
)
|
| 12 |
|
| 13 |
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
|
@@ -102,6 +102,7 @@ def create_ui():
|
|
| 102 |
components.update(create_reference_latent_ui(prefix))
|
| 103 |
components.update(create_hidream_o1_reference_ui(prefix))
|
| 104 |
components.update(create_joyai_reference_ui(prefix))
|
|
|
|
| 105 |
components.update(create_reference_image_ui(prefix))
|
| 106 |
components.update(create_vae_override_ui(prefix))
|
| 107 |
|
|
|
|
| 7 |
create_conditioning_ui, create_vae_override_ui,
|
| 8 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 9 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
| 10 |
+
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui
|
| 11 |
)
|
| 12 |
|
| 13 |
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
|
|
|
| 102 |
components.update(create_reference_latent_ui(prefix))
|
| 103 |
components.update(create_hidream_o1_reference_ui(prefix))
|
| 104 |
components.update(create_joyai_reference_ui(prefix))
|
| 105 |
+
components.update(create_krea2_identity_edit_ui(prefix))
|
| 106 |
components.update(create_reference_image_ui(prefix))
|
| 107 |
components.update(create_vae_override_ui(prefix))
|
| 108 |
|
ui/shared/img2img_ui.py
CHANGED
|
@@ -7,7 +7,7 @@ from .ui_components import (
|
|
| 7 |
create_conditioning_ui, create_vae_override_ui,
|
| 8 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 9 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
| 10 |
-
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui
|
| 11 |
)
|
| 12 |
|
| 13 |
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
|
@@ -83,6 +83,7 @@ def create_ui():
|
|
| 83 |
components.update(create_reference_latent_ui(prefix))
|
| 84 |
components.update(create_hidream_o1_reference_ui(prefix))
|
| 85 |
components.update(create_joyai_reference_ui(prefix))
|
|
|
|
| 86 |
components.update(create_reference_image_ui(prefix))
|
| 87 |
components.update(create_vae_override_ui(prefix))
|
| 88 |
|
|
|
|
| 7 |
create_conditioning_ui, create_vae_override_ui,
|
| 8 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 9 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
| 10 |
+
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui
|
| 11 |
)
|
| 12 |
|
| 13 |
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
|
|
|
| 83 |
components.update(create_reference_latent_ui(prefix))
|
| 84 |
components.update(create_hidream_o1_reference_ui(prefix))
|
| 85 |
components.update(create_joyai_reference_ui(prefix))
|
| 86 |
+
components.update(create_krea2_identity_edit_ui(prefix))
|
| 87 |
components.update(create_reference_image_ui(prefix))
|
| 88 |
components.update(create_vae_override_ui(prefix))
|
| 89 |
|
ui/shared/inpaint_ui.py
CHANGED
|
@@ -6,7 +6,7 @@ from .ui_components import (
|
|
| 6 |
create_conditioning_ui, create_vae_override_ui,
|
| 7 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 8 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
| 9 |
-
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui
|
| 10 |
)
|
| 11 |
|
| 12 |
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
|
@@ -115,6 +115,7 @@ def create_ui():
|
|
| 115 |
components.update(create_reference_latent_ui(prefix))
|
| 116 |
components.update(create_hidream_o1_reference_ui(prefix))
|
| 117 |
components.update(create_joyai_reference_ui(prefix))
|
|
|
|
| 118 |
components.update(create_reference_image_ui(prefix))
|
| 119 |
components.update(create_vae_override_ui(prefix))
|
| 120 |
components[f'accordion_wrapper_{prefix}'] = accordion_wrapper
|
|
|
|
| 6 |
create_conditioning_ui, create_vae_override_ui,
|
| 7 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 8 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
| 9 |
+
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui
|
| 10 |
)
|
| 11 |
|
| 12 |
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
|
|
|
| 115 |
components.update(create_reference_latent_ui(prefix))
|
| 116 |
components.update(create_hidream_o1_reference_ui(prefix))
|
| 117 |
components.update(create_joyai_reference_ui(prefix))
|
| 118 |
+
components.update(create_krea2_identity_edit_ui(prefix))
|
| 119 |
components.update(create_reference_image_ui(prefix))
|
| 120 |
components.update(create_vae_override_ui(prefix))
|
| 121 |
components[f'accordion_wrapper_{prefix}'] = accordion_wrapper
|
ui/shared/outpaint_ui.py
CHANGED
|
@@ -7,7 +7,7 @@ from .ui_components import (
|
|
| 7 |
create_conditioning_ui, create_vae_override_ui,
|
| 8 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 9 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
| 10 |
-
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui
|
| 11 |
)
|
| 12 |
|
| 13 |
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
|
@@ -98,6 +98,7 @@ def create_ui():
|
|
| 98 |
components.update(create_reference_latent_ui(prefix))
|
| 99 |
components.update(create_hidream_o1_reference_ui(prefix))
|
| 100 |
components.update(create_joyai_reference_ui(prefix))
|
|
|
|
| 101 |
components.update(create_reference_image_ui(prefix))
|
| 102 |
components.update(create_vae_override_ui(prefix))
|
| 103 |
|
|
|
|
| 7 |
create_conditioning_ui, create_vae_override_ui,
|
| 8 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 9 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
| 10 |
+
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui
|
| 11 |
)
|
| 12 |
|
| 13 |
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
|
|
|
| 98 |
components.update(create_reference_latent_ui(prefix))
|
| 99 |
components.update(create_hidream_o1_reference_ui(prefix))
|
| 100 |
components.update(create_joyai_reference_ui(prefix))
|
| 101 |
+
components.update(create_krea2_identity_edit_ui(prefix))
|
| 102 |
components.update(create_reference_image_ui(prefix))
|
| 103 |
components.update(create_vae_override_ui(prefix))
|
| 104 |
|
ui/shared/txt2img_ui.py
CHANGED
|
@@ -6,7 +6,7 @@ from .ui_components import (
|
|
| 6 |
create_conditioning_ui, create_vae_override_ui,
|
| 7 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 8 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
| 9 |
-
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui,
|
| 10 |
create_pid_ui
|
| 11 |
)
|
| 12 |
|
|
@@ -55,6 +55,7 @@ def create_ui():
|
|
| 55 |
components.update(create_reference_latent_ui(prefix))
|
| 56 |
components.update(create_hidream_o1_reference_ui(prefix))
|
| 57 |
components.update(create_joyai_reference_ui(prefix))
|
|
|
|
| 58 |
components.update(create_reference_image_ui(prefix))
|
| 59 |
components.update(create_vae_override_ui(prefix))
|
| 60 |
components.update(create_pid_ui(prefix))
|
|
|
|
| 6 |
create_conditioning_ui, create_vae_override_ui,
|
| 7 |
create_model_architecture_filter_ui, create_category_filter_ui,
|
| 8 |
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
|
| 9 |
+
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui,
|
| 10 |
create_pid_ui
|
| 11 |
)
|
| 12 |
|
|
|
|
| 55 |
components.update(create_reference_latent_ui(prefix))
|
| 56 |
components.update(create_hidream_o1_reference_ui(prefix))
|
| 57 |
components.update(create_joyai_reference_ui(prefix))
|
| 58 |
+
components.update(create_krea2_identity_edit_ui(prefix))
|
| 59 |
components.update(create_reference_image_ui(prefix))
|
| 60 |
components.update(create_vae_override_ui(prefix))
|
| 61 |
components.update(create_pid_ui(prefix))
|
ui/shared/ui_components.py
CHANGED
|
@@ -769,4 +769,33 @@ def create_pid_ui(prefix: str):
|
|
| 769 |
interactive=True
|
| 770 |
)
|
| 771 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 772 |
return components
|
|
|
|
| 769 |
interactive=True
|
| 770 |
)
|
| 771 |
|
| 772 |
+
return components
|
| 773 |
+
|
| 774 |
+
def create_krea2_identity_edit_ui(prefix: str, max_units=2):
|
| 775 |
+
components = {}
|
| 776 |
+
key = lambda name: f"{name}_{prefix}"
|
| 777 |
+
|
| 778 |
+
with gr.Accordion("Krea-2 Identity Edit Setting", open=False, visible=('krea2_identity_edit' in default_enabled_chains)) as ref_accordion:
|
| 779 |
+
components[key('krea2_identity_edit_accordion')] = ref_accordion
|
| 780 |
+
gr.Markdown("💡 **Tip:** Processed using the [lbouaraba/comfyui-krea2edit](https://github.com/lbouaraba/comfyui-krea2edit) node. (Krea-2-Turbo recommended, Krea-2-Raw need set ZeroGPU Duration (s) to 120 ) In txt2img mode, adding a single reference image performs an **Image Edit**, while adding multiple images performs an **Image Combine**.")
|
| 781 |
+
|
| 782 |
+
ref_image_groups = []
|
| 783 |
+
ref_image_inputs = []
|
| 784 |
+
with gr.Row():
|
| 785 |
+
for i in range(max_units):
|
| 786 |
+
with gr.Column(visible=(i < 1), min_width=160) as img_col:
|
| 787 |
+
img_comp = gr.Image(type="pil", label=f"Ref. {i+1}", sources=["upload"], height=150)
|
| 788 |
+
ref_image_groups.append(img_col)
|
| 789 |
+
ref_image_inputs.append(img_comp)
|
| 790 |
+
|
| 791 |
+
components[key('krea2_identity_edit_rows')] = ref_image_groups
|
| 792 |
+
components[key('krea2_identity_edit_images')] = ref_image_inputs
|
| 793 |
+
|
| 794 |
+
with gr.Row():
|
| 795 |
+
components[key('add_krea2_identity_edit_button')] = gr.Button("✚ Add Reference Image")
|
| 796 |
+
components[key('delete_krea2_identity_edit_button')] = gr.Button("➖ Delete Reference Image", visible=False)
|
| 797 |
+
components[key('krea2_identity_edit_count_state')] = gr.State(1)
|
| 798 |
+
|
| 799 |
+
components[key('all_krea2_identity_edit_components_flat')] = ref_image_inputs
|
| 800 |
+
|
| 801 |
return components
|
utils/app_utils.py
CHANGED
|
@@ -498,6 +498,72 @@ def ensure_controlnet_model_downloaded(filename: str, progress):
|
|
| 498 |
pass
|
| 499 |
raise gr.Error(f"Failed to download ControlNet model '{filename}': {e}")
|
| 500 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 501 |
def load_ipadapter_presets():
|
| 502 |
global IPADAPTER_PRESETS
|
| 503 |
if IPADAPTER_PRESETS is not None:
|
|
|
|
| 498 |
pass
|
| 499 |
raise gr.Error(f"Failed to download ControlNet model '{filename}': {e}")
|
| 500 |
|
| 501 |
+
def ensure_file_downloaded(filename: str, progress=None):
|
| 502 |
+
if not filename or filename == "None":
|
| 503 |
+
return
|
| 504 |
+
|
| 505 |
+
download_info = ALL_FILE_DOWNLOAD_MAP.get(filename)
|
| 506 |
+
if not download_info:
|
| 507 |
+
print(f"⚠️ Warning: File '{filename}' not found in configuration (file_list.yaml). Cannot download.")
|
| 508 |
+
return
|
| 509 |
+
|
| 510 |
+
category = download_info.get("category", "loras")
|
| 511 |
+
dest_dir = CATEGORY_TO_DIR_MAP.get(category, LORA_DIR)
|
| 512 |
+
dest_path = os.path.join(dest_dir, filename)
|
| 513 |
+
|
| 514 |
+
if os.path.lexists(dest_path):
|
| 515 |
+
if not os.path.exists(dest_path):
|
| 516 |
+
print(f"⚠️ Found and removed broken symlink: {dest_path}")
|
| 517 |
+
os.remove(dest_path)
|
| 518 |
+
else:
|
| 519 |
+
return
|
| 520 |
+
|
| 521 |
+
source = download_info.get("source")
|
| 522 |
+
try:
|
| 523 |
+
if source == "hf":
|
| 524 |
+
repo_id = download_info.get("repo_id")
|
| 525 |
+
repo_filename = download_info.get("repository_file_path", filename)
|
| 526 |
+
if not repo_id:
|
| 527 |
+
raise ValueError("repo_id is missing for Hugging Face download.")
|
| 528 |
+
|
| 529 |
+
if progress and callable(progress):
|
| 530 |
+
progress(0, desc=f"Downloading: {filename}")
|
| 531 |
+
cached_path = hf_hub_download(repo_id=repo_id, filename=repo_filename, token=os.environ.get("HF_TOKEN"))
|
| 532 |
+
os.makedirs(dest_dir, exist_ok=True)
|
| 533 |
+
os.symlink(cached_path, dest_path)
|
| 534 |
+
print(f"✅ Symlinked '{cached_path}' to '{dest_path}'")
|
| 535 |
+
if progress and callable(progress):
|
| 536 |
+
progress(1.0, desc=f"Downloaded: {filename}")
|
| 537 |
+
|
| 538 |
+
elif source == "civitai":
|
| 539 |
+
model_version_id = download_info.get("model_version_id")
|
| 540 |
+
if not model_version_id:
|
| 541 |
+
raise ValueError("model_version_id is missing for Civitai download.")
|
| 542 |
+
|
| 543 |
+
file_info = get_civitai_file_info(model_version_id)
|
| 544 |
+
if not file_info or not file_info.get('downloadUrl'):
|
| 545 |
+
raise ConnectionError(f"Could not get download URL for Civitai model version ID {model_version_id}")
|
| 546 |
+
|
| 547 |
+
status = download_file(
|
| 548 |
+
file_info['downloadUrl'],
|
| 549 |
+
dest_path,
|
| 550 |
+
api_key=os.environ.get("CIVITAI_API_KEY", ""),
|
| 551 |
+
progress=progress,
|
| 552 |
+
desc=f"Downloading: {filename}"
|
| 553 |
+
)
|
| 554 |
+
if "Failed" in status:
|
| 555 |
+
raise ConnectionError(status)
|
| 556 |
+
else:
|
| 557 |
+
raise NotImplementedError(f"Download source '{source}' is not implemented for '{filename}'.")
|
| 558 |
+
|
| 559 |
+
except Exception as e:
|
| 560 |
+
if os.path.lexists(dest_path):
|
| 561 |
+
try:
|
| 562 |
+
os.remove(dest_path)
|
| 563 |
+
except OSError:
|
| 564 |
+
pass
|
| 565 |
+
raise gr.Error(f"Failed to download file '{filename}': {e}")
|
| 566 |
+
|
| 567 |
def load_ipadapter_presets():
|
| 568 |
global IPADAPTER_PRESETS
|
| 569 |
if IPADAPTER_PRESETS is not None:
|
yaml/file_list.yaml
CHANGED
|
@@ -401,10 +401,10 @@ file:
|
|
| 401 |
source: "hf"
|
| 402 |
repo_id: "Comfy-Org/Krea-2"
|
| 403 |
repository_file_path: "diffusion_models/krea2_turbo_nvfp4.safetensors"
|
| 404 |
-
- filename: "
|
| 405 |
source: "hf"
|
| 406 |
-
repo_id: "
|
| 407 |
-
repository_file_path: "
|
| 408 |
# Mage-Flow
|
| 409 |
- filename: "mage_flow_turbo_int8_convrot.safetensors"
|
| 410 |
source: "hf"
|
|
@@ -745,6 +745,11 @@ file:
|
|
| 745 |
repo_id: "black-forest-labs/FLUX.1-Redux-dev"
|
| 746 |
repository_file_path: "flux1-redux-dev.safetensors"
|
| 747 |
loras:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 748 |
# Krea2 ControlNet
|
| 749 |
- filename: "depth-control-lora.safetensors"
|
| 750 |
source: "hf"
|
|
|
|
| 401 |
source: "hf"
|
| 402 |
repo_id: "Comfy-Org/Krea-2"
|
| 403 |
repository_file_path: "diffusion_models/krea2_turbo_nvfp4.safetensors"
|
| 404 |
+
- filename: "krea2_raw-nvfp4.safetensors"
|
| 405 |
source: "hf"
|
| 406 |
+
repo_id: "tsukiyomi/krea2_raw-nvfp4"
|
| 407 |
+
repository_file_path: "krea2_raw-nvfp4.safetensors"
|
| 408 |
# Mage-Flow
|
| 409 |
- filename: "mage_flow_turbo_int8_convrot.safetensors"
|
| 410 |
source: "hf"
|
|
|
|
| 745 |
repo_id: "black-forest-labs/FLUX.1-Redux-dev"
|
| 746 |
repository_file_path: "flux1-redux-dev.safetensors"
|
| 747 |
loras:
|
| 748 |
+
# Krea2 Identity Edit
|
| 749 |
+
- filename: "krea2_identity_edit_v1_2.safetensors"
|
| 750 |
+
source: "hf"
|
| 751 |
+
repo_id: "conradlocke/krea2-identity-edit"
|
| 752 |
+
repository_file_path: "krea2_identity_edit_v1_2.safetensors"
|
| 753 |
# Krea2 ControlNet
|
| 754 |
- filename: "depth-control-lora.safetensors"
|
| 755 |
source: "hf"
|
yaml/image_gen_features.yaml
CHANGED
|
@@ -20,7 +20,7 @@ krea-2:
|
|
| 20 |
enabled_chains:
|
| 21 |
- lora
|
| 22 |
- krea2_controlnet
|
| 23 |
-
-
|
| 24 |
- pid
|
| 25 |
|
| 26 |
boogu-image:
|
|
|
|
| 20 |
enabled_chains:
|
| 21 |
- lora
|
| 22 |
- krea2_controlnet
|
| 23 |
+
- krea2_identity_edit
|
| 24 |
- pid
|
| 25 |
|
| 26 |
boogu-image:
|
yaml/injectors.yaml
CHANGED
|
@@ -31,6 +31,8 @@ injector_definitions:
|
|
| 31 |
module: "chain_injectors.hidream_o1_reference_injector"
|
| 32 |
dynamic_joyai_reference_chains:
|
| 33 |
module: "chain_injectors.joyai_reference_injector"
|
|
|
|
|
|
|
| 34 |
dynamic_reference_image_chains:
|
| 35 |
module: "chain_injectors.reference_image_injector"
|
| 36 |
dynamic_pid_chains:
|
|
@@ -49,6 +51,7 @@ injector_order:
|
|
| 49 |
- dynamic_style_chains
|
| 50 |
- dynamic_controlnet_chains
|
| 51 |
- dynamic_krea2_controlnet_chains
|
|
|
|
| 52 |
- dynamic_anima_controlnet_lllite_chains
|
| 53 |
- dynamic_hidream_o1_smoothing_chains
|
| 54 |
- dynamic_hidream_o1_reference_chains
|
|
|
|
| 31 |
module: "chain_injectors.hidream_o1_reference_injector"
|
| 32 |
dynamic_joyai_reference_chains:
|
| 33 |
module: "chain_injectors.joyai_reference_injector"
|
| 34 |
+
dynamic_krea2_identity_edit_chains:
|
| 35 |
+
module: "chain_injectors.krea2_identity_edit_injector"
|
| 36 |
dynamic_reference_image_chains:
|
| 37 |
module: "chain_injectors.reference_image_injector"
|
| 38 |
dynamic_pid_chains:
|
|
|
|
| 51 |
- dynamic_style_chains
|
| 52 |
- dynamic_controlnet_chains
|
| 53 |
- dynamic_krea2_controlnet_chains
|
| 54 |
+
- dynamic_krea2_identity_edit_chains
|
| 55 |
- dynamic_anima_controlnet_lllite_chains
|
| 56 |
- dynamic_hidream_o1_smoothing_chains
|
| 57 |
- dynamic_hidream_o1_reference_chains
|
yaml/model_list.yaml
CHANGED
|
@@ -9,7 +9,7 @@ Checkpoint:
|
|
| 9 |
vae: "qwen_image_vae.safetensors"
|
| 10 |
- display_name: "Krea-2-Raw"
|
| 11 |
components:
|
| 12 |
-
unet: "
|
| 13 |
clip: "qwen3vl_4b_fp8_scaled.safetensors"
|
| 14 |
vae: "qwen_image_vae.safetensors"
|
| 15 |
Mage-Flow:
|
|
|
|
| 9 |
vae: "qwen_image_vae.safetensors"
|
| 10 |
- display_name: "Krea-2-Raw"
|
| 11 |
components:
|
| 12 |
+
unet: "krea2_raw-nvfp4.safetensors"
|
| 13 |
clip: "qwen3vl_4b_fp8_scaled.safetensors"
|
| 14 |
vae: "qwen_image_vae.safetensors"
|
| 15 |
Mage-Flow:
|