Spaces:
Running on Zero
Running on Zero
Add AuraFlow architecture model.
Browse filesFiles changed (18)
- .gitattributes+35-4
- app.py+36-6
- chain_injectors/anima_controlnet_lllite_injector.py+6-1
- comfy_integration/setup.py+1-9
- core/pipelines/base_pipeline.py+14-3
- core/pipelines/workflow_recipes/_partials/conditioning/auraflow.yamlAdded+48
- requirements.txt+2-2
- ui/events/chain_handlers.py+19
- ui/events/change_handlers.py+364-364
- ui/layout.py+1-9
- ui/shared/ui_components.py+1-2
- yaml/anima_controlnet_lllite_models.yaml+5-2
- yaml/constants.yaml+9
- yaml/file_list.yaml+31-17
- yaml/image_gen_features.yaml+6
- yaml/model_architectures.yaml+4
- yaml/model_defaults.yaml+18-3
- yaml/model_list.yaml+10-1
1234/web/assets/** linguist-generated/web/** linguist-vendoredcomfy_api_nodes/apis/__init__.py linguist-generatedcomfy/text_encoders/t5_pile_tokenizer/tokenizer.model filter=lfs diff=lfs merge=lfs -text1234567891011121314151617181920212223242526272829303132333435*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text
39 unmodified lines4041424344453 unmodified lines4950515253545556575821 unmodified lines808182838485868711 unmodified lines9910010110210310410539 unmodified linesprint(msg)return msg@spaces.GPUdef dummy_gpu_for_startup():try:3 unmodified linesprint("--- [GPU Startup] Startup check passed. ---")return "Startup check passed."except BaseException as e:err_msg = str(e)if "uncorrectable ECC error" in err_msg or "cudaErrorECCUncorrectable" in err_msg:print("\n" + "="*80)print(f"🚨 [Fatal GPU Error] Captured uncorrectable ECC error during inference: {err_msg}")print("🚨 Terminating process to trigger an automatic container restart...")print("="*80 + "\n")os._exit(1)21 unmodified linesprint("--- Initiating GPU Startup Check & SageAttention Patch Verification ---")try:dummy_gpu_for_startup()except Exception as e:print(f"--- [GPU Startup] ⚠️ Warning: Startup check failed: {e} ---")print("--- Starting Application Setup ---")11 unmodified linesdemo = build_ui(attach_event_handlers)print("--- Launching Gradio Interface ---")demo.queue().launch(server_name="0.0.0.0", server_port=7860)if __name__ == "__main__":39 unmodified lines4041424344454647484950515253545556575859603 unmodified lines64656667686970717221 unmodified lines94959697989910010110210310410510610710811 unmodified lines12012112212312412512612712812913013113213313413539 unmodified linesprint(msg)return msgdef is_fatal_gpu_error(e: BaseException) -> bool:err_type = type(e).__name__err_str = f"{err_type}: {str(e)} | {repr(e)}".lower()fatal_keywords = ["ecc","uncorrectable","cudaerror","acceleratorerror","cuda error","cuda_error","device-side assertion","cuda_launch_blocking",]return any(kw in err_str for kw in fatal_keywords)@spaces.GPUdef dummy_gpu_for_startup():try:3 unmodified linesprint("--- [GPU Startup] Startup check passed. ---")return "Startup check passed."except BaseException as e:if is_fatal_gpu_error(e):print("\n" + "="*80)print(f"🚨 [Fatal GPU Error] Captured fatal GPU error during startup check: {e}")print("🚨 Terminating process to trigger an automatic container restart...")print("="*80 + "\n")os._exit(1)21 unmodified linesprint("--- Initiating GPU Startup Check & SageAttention Patch Verification ---")try:dummy_gpu_for_startup()except BaseException as e:err_msg = f"{type(e).__name__}: {str(e)}"print(f"--- [GPU Startup] ⚠️ Warning: Startup check failed: {err_msg} ---")if is_fatal_gpu_error(e):print("\n" + "="*80)print(f"🚨 [Fatal GPU Error] Captured fatal GPU error during startup check: {err_msg}")print("🚨 Terminating process to trigger an automatic container restart...")print("="*80 + "\n")os._exit(1)print("--- Starting Application Setup ---")11 unmodified linesdemo = build_ui(attach_event_handlers)print("--- Launching Gradio Interface ---")try:demo.queue().launch(server_name="0.0.0.0", server_port=7860)except ValueError as e:if "localhost is not accessible" in str(e):print("\n" + "="*80)print(f"🚨 [Gradio Launch Error] Localhost accessibility check failed: {e}")print("🚨 Terminating process to trigger an automatic container restart...")print("="*80 + "\n")sys.exit(1)raise eif __name__ == "__main__":
27 unmodified lines28293031323334353637383940414227 unmodified linesimage_scaler_node['inputs']['megapixels'] = 1.0assembler.workflow[image_scaler_id] = image_scaler_nodeapply_cn_id = assembler._get_unique_id()apply_cn_node = assembler._get_node_template("AnimaLLLiteApply")apply_cn_node['inputs']['lllite_name'] = item_data['control_net_name']apply_cn_node['inputs']['strength'] = item_data['strength']apply_cn_node['inputs']['start_percent'] = item_data.get('start_percent', 0.0)apply_cn_node['inputs']['end_percent'] = item_data.get('end_percent', 1.0)apply_cn_node['inputs']['model'] = current_model_connectionapply_cn_node['inputs']['image'] = [image_scaler_id, 0]assembler.workflow[apply_cn_id] = apply_cn_node27 unmodified lines282930313233343536373839404142434445464727 unmodified linesimage_scaler_node['inputs']['megapixels'] = 1.0assembler.workflow[image_scaler_id] = image_scaler_nodepatch_loader_id = assembler._get_unique_id()patch_loader_node = assembler._get_node_template("ModelPatchLoader")patch_loader_node['inputs']['name'] = item_data['control_net_name']assembler.workflow[patch_loader_id] = patch_loader_nodeapply_cn_id = assembler._get_unique_id()apply_cn_node = assembler._get_node_template("AnimaLLLiteApply")apply_cn_node['inputs']['strength'] = item_data['strength']apply_cn_node['inputs']['start_percent'] = item_data.get('start_percent', 0.0)apply_cn_node['inputs']['end_percent'] = item_data.get('end_percent', 1.0)apply_cn_node['inputs']['model'] = current_model_connectionapply_cn_node['inputs']['model_patch'] = [patch_loader_id, 0]apply_cn_node['inputs']['image'] = [image_scaler_id, 0]assembler.workflow[apply_cn_id] = apply_cn_node
79 unmodified lines80818283848586878889909192939479 unmodified lineselse:print("✅ ComfyUI-Newbie-Nodes extension already exists.")# 5. ComfyUI-Anima-LLLiteanima_controlnet_lllite_nodes_path = os.path.join(APP_DIR, "custom_nodes", "ComfyUI-Anima-LLLite")if not os.path.exists(anima_controlnet_lllite_nodes_path):os.system(f"git clone https://github.com/kohya-ss/ComfyUI-Anima-LLLite.git {anima_controlnet_lllite_nodes_path}")print("✅ ComfyUI-Anima-LLLite extension cloned.")else:print("✅ ComfyUI-Anima-LLLite extension already exists.")# 6. comfyui-krea2-controlnetkrea2_controlnet_nodes_path = os.path.join(APP_DIR, "custom_nodes", "comfyui-krea2-controlnet")if not os.path.exists(krea2_controlnet_nodes_path):os.system(f"git clone https://github.com/facok/comfyui-krea2-controlnet.git {krea2_controlnet_nodes_path}")79 unmodified lines8081828384858679 unmodified lineselse:print("✅ ComfyUI-Newbie-Nodes extension already exists.")# 5. comfyui-krea2-controlnetkrea2_controlnet_nodes_path = os.path.join(APP_DIR, "custom_nodes", "comfyui-krea2-controlnet")if not os.path.exists(krea2_controlnet_nodes_path):os.system(f"git clone https://github.com/facok/comfyui-krea2-controlnet.git {krea2_controlnet_nodes_path}")
40 unmodified lines4142434445464748495040 unmodified linestry:return gpu_runner(*args, **kwargs)except BaseException as e:err_msg = str(e)if "uncorrectable ECC error" in err_msg or "cudaErrorECCUncorrectable" in err_msg:print("\n" + "="*80)print(f"🚨 [Fatal GPU Error] Captured uncorrectable ECC error during inference: {err_msg}")print("🚨 Terminating process to trigger an automatic container restart...")print("="*80 + "\n")os._exit(1)40 unmodified lines41424344454647484950515253545556575859606140 unmodified linestry:return gpu_runner(*args, **kwargs)except BaseException as e:err_type = type(e).__name__err_str = f"{err_type}: {str(e)} | {repr(e)}".lower()fatal_keywords = ["ecc","uncorrectable","cudaerror","acceleratorerror","cuda error","cuda_error","device-side assertion","cuda_launch_blocking",]if any(kw in err_str for kw in fatal_keywords):print("\n" + "="*80)print(f"🚨 [Fatal GPU Error] Captured fatal GPU error during inference: {e}")print("🚨 Terminating process to trigger an automatic container restart...")print("="*80 + "\n")os._exit(1)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748nodes: ckpt_loader: class_type: CheckpointLoaderSimple title: "Load Checkpoint"
connections: - from: "ckpt_loader:0" to: "ksampler:model" - from: "ckpt_loader:1" to: "pos_prompt:clip" - from: "ckpt_loader:1" to: "neg_prompt:clip" - from: "pos_prompt:0" to: "ksampler:positive" - from: "neg_prompt:0" to: "ksampler:negative" - from: "ckpt_loader:2" to: "vae_decode:vae" - from: "ckpt_loader:2" to: "vae_encode:vae"
dynamic_vae_chains: vae_chain: targets: - "vae_decode:vae" - "vae_encode:vae"
dynamic_lora_chains: lora_chain: template: "LoraLoader" start: "ckpt_loader" output_map: "0": "model" "1": "clip" input_map: "model": "model" "clip": "clip" end_input_map: "model": ["ksampler:model"] "clip": ["pos_prompt:clip", "neg_prompt:clip"]
dynamic_conditioning_chains: conditioning_chain: ksampler_node: "ksampler" clip_source: "ckpt_loader:1"
ui_map: model_name: "ckpt_loader:ckpt_name"1234516 unmodified lines22232425262728comfyui-frontend-package==1.45.21comfyui-workflow-templates==0.11.9comfyui-embedded-docs==0.5.8torchtorchsde16 unmodified linesSQLAlchemy>=2.0.0filelockav>=16.0.0comfy-kitchen==0.2.20comfy-aimdo==0.4.10requestssimpleeval>=1.0.01234516 unmodified lines22232425262728comfyui-frontend-package==1.45.21comfyui-workflow-templates==0.11.12comfyui-embedded-docs==0.5.8torchtorchsde16 unmodified linesSQLAlchemy>=2.0.0filelockav>=16.0.0comfy-kitchen==0.2.22comfy-aimdo==0.4.10requestssimpleeval>=1.0.0
45 unmodified lines46474849505152535455655 unmodified lines71171271371471571671771871972045 unmodified lineslora_ids = ui_components[f'lora_ids_{prefix}']lora_scales = ui_components[f'lora_scales_{prefix}']lora_uploads = ui_components[f'lora_uploads_{prefix}']count_state = ui_components[f'lora_count_state_{prefix}']add_button = ui_components[f'add_lora_button_{prefix}']del_button = ui_components[f'delete_lora_button_{prefix}']def add_lora_row(c):updates = {}if c < MAX_LORAS:655 unmodified linesif not rows: returnids = ui_components[f'embeddings_ids_{prefix}']files = ui_components[f'embeddings_files_{prefix}']count_state = ui_components[f'embedding_count_state_{prefix}']add_button = ui_components[f'add_embedding_button_{prefix}']del_button = ui_components[f'delete_embedding_button_{prefix}']def add_row(c):c += 1return {45 unmodified lines46474849505152535455565758596061626364655 unmodified lines72072172272372472572672772872973073173273373473573673773873945 unmodified lineslora_ids = ui_components[f'lora_ids_{prefix}']lora_scales = ui_components[f'lora_scales_{prefix}']lora_uploads = ui_components[f'lora_uploads_{prefix}']lora_sources = ui_components[f'lora_sources_{prefix}']count_state = ui_components[f'lora_count_state_{prefix}']add_button = ui_components[f'add_lora_button_{prefix}']del_button = ui_components[f'delete_lora_button_{prefix}']for i in range(MAX_LORAS):lora_uploads[i].upload(fn=on_lora_upload,inputs=[lora_uploads[i]],outputs=[lora_ids[i], lora_sources[i]],show_progress=True)def add_lora_row(c):updates = {}if c < MAX_LORAS:655 unmodified linesif not rows: returnids = ui_components[f'embeddings_ids_{prefix}']files = ui_components[f'embeddings_files_{prefix}']sources = ui_components[f'embeddings_sources_{prefix}']upload_buttons = ui_components[f'embeddings_uploads_{prefix}']count_state = ui_components[f'embedding_count_state_{prefix}']add_button = ui_components[f'add_embedding_button_{prefix}']del_button = ui_components[f'delete_embedding_button_{prefix}']for i in range(MAX_EMBEDDINGS):upload_buttons[i].upload(fn=on_embedding_upload,inputs=[upload_buttons[i]],outputs=[ids[i], sources[i], files[i]],show_progress=True)def add_row(c):c += 1return {
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365import gradio as grfrom core.settings import (MODEL_TYPE_MAP,MODEL_MAP_CHECKPOINT,FEATURES_CONFIG,ARCHITECTURES_CONFIG,MODEL_DEFAULTS_CONFIG,ARCH_CATEGORIES_MAP)from utils.app_utils import get_model_generation_defaultsfrom ui.shared.ui_components import RESOLUTION_MAPfrom .config_loaders import (get_cn_defaults,get_anima_cn_defaults,get_diffsynth_cn_defaults,get_krea2_cn_defaults,load_ipadapter_config)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):def update_fn(*args):arch = args[0]category = args[1]current_ar = args[2] if len(args) > 2 else Noneif arch == "ALL":valid_cats = list(set(cat for cats in ARCH_CATEGORIES_MAP.values() for cat in cats))else:valid_cats = ARCH_CATEGORIES_MAP.get(arch, [])cat_choices = ["ALL"] + sorted(valid_cats)new_category = category if category in cat_choices else "ALL"choices = []for name, info in MODEL_MAP_CHECKPOINT.items():m_arch = info[2]m_cat = info[4] if len(info) > 4 else Nonearch_match = (arch == "ALL" or m_arch == arch)cat_match = (new_category == "ALL" or m_cat == new_category)if arch_match and cat_match:choices.append(name)val = choices[0] if choices else Noneupdates = {m_comp: gr.update(choices=choices, value=val),cat_comp: gr.update(choices=cat_choices, value=new_category)}m_type = MODEL_TYPE_MAP.get(val, "SDXL") if val else "SDXL"architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})arch_model_type = architectures_dict.get(m_type, {}).get("model_type", m_type.lower().replace(" ", "").replace(".", ""))arch_features = FEATURES_CONFIG.get(arch_model_type, FEATURES_CONFIG.get('default', {}))enabled_chains = arch_features.get('enabled_chains', [])if lora_acc: updates[lora_acc] = gr.update(visible=('lora' in enabled_chains))if cn_acc: updates[cn_acc] = gr.update(visible=('controlnet' in enabled_chains))if anima_cn_acc: updates[anima_cn_acc] = gr.update(visible=('anima_controlnet_lllite' in enabled_chains))if diffsynth_cn_acc: updates[diffsynth_cn_acc] = gr.update(visible=('controlnet_model_patch' in enabled_chains))if krea2_cn_acc: updates[krea2_cn_acc] = gr.update(visible=('krea2_controlnet' in enabled_chains))if ipa_acc: updates[ipa_acc] = gr.update(visible=('ipadapter' in enabled_chains))if flux1_ipa_acc: updates[flux1_ipa_acc] = gr.update(visible=('flux1_ipadapter' in enabled_chains))if sd3_ipa_acc: updates[sd3_ipa_acc] = gr.update(visible=('sd3_ipadapter' in enabled_chains))if style_acc: updates[style_acc] = gr.update(visible=('style' in enabled_chains))if embed_acc: updates[embed_acc] = gr.update(visible=('embedding' in enabled_chains))if cond_acc: updates[cond_acc] = gr.update(visible=('conditioning' in enabled_chains))if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))if vae_acc: updates[vae_acc] = gr.update(visible=('vae' in enabled_chains))if cs_comp:updates[cs_comp] = gr.update(visible=(arch_model_type == "sd15"))if guidance_comp:updates[guidance_comp] = gr.update(visible=(arch_model_type == "flux1"))if ar_comp:res_key = arch_model_typeif res_key not in RESOLUTION_MAP:res_key = 'sdxl'res_map = RESOLUTION_MAP.get(res_key, {})target_ar = current_ar if current_ar in res_map else (list(res_map.keys())[0] if res_map else "1:1 (Square)")updates[ar_comp] = gr.update(choices=list(res_map.keys()), value=target_ar)if width_comp and height_comp and target_ar in res_map:updates[width_comp] = gr.update(value=res_map[target_ar][0])updates[height_comp] = gr.update(value=res_map[target_ar][1])controlnet_key = architectures_dict.get(m_type, {}).get("controlnet_key", m_type)all_types, default_type, series_choices, default_series, filepath = get_cn_defaults(controlnet_key)for t_comp in cn_types:updates[t_comp] = gr.update(choices=all_types, value=default_type)for s_comp in cn_series:updates[s_comp] = gr.update(choices=series_choices, value=default_series)for f_comp in cn_filepaths:updates[f_comp] = filepathanima_all_types, anima_default_type, anima_series_choices, anima_default_series, anima_filepath = get_anima_cn_defaults()for t_comp in anima_cn_types:updates[t_comp] = gr.update(choices=anima_all_types, value=anima_default_type)for s_comp in anima_cn_series:updates[s_comp] = gr.update(choices=anima_series_choices, value=anima_default_series)for f_comp in anima_cn_filepaths:updates[f_comp] = anima_filepathdiffsynth_all_types, diffsynth_default_type, diffsynth_series_choices, diffsynth_default_series, diffsynth_filepath = get_diffsynth_cn_defaults(controlnet_key)for t_comp in diffsynth_cn_types:updates[t_comp] = gr.update(choices=diffsynth_all_types, value=diffsynth_default_type)for s_comp in diffsynth_cn_series:updates[s_comp] = gr.update(choices=diffsynth_series_choices, value=diffsynth_default_series)for f_comp in diffsynth_cn_filepaths:updates[f_comp] = diffsynth_filepathkrea2_all_types, krea2_default_type, krea2_series_choices, krea2_default_series, krea2_filepath = get_krea2_cn_defaults()for t_comp in krea2_cn_types:updates[t_comp] = gr.update(choices=krea2_all_types, value=krea2_default_type)for s_comp in krea2_cn_series:updates[s_comp] = gr.update(choices=krea2_series_choices, value=krea2_default_series)for f_comp in krea2_cn_filepaths:updates[f_comp] = krea2_filepathif ipa_preset and (arch_model_type in ["sdxl", "sd15", "sd35"]):config = load_ipadapter_config()ipa_arch_key = "SDXL" if arch_model_type in ["sdxl", "sd35"] else "SD1.5"std_presets = config.get("IPAdapter_presets", {}).get(ipa_arch_key, [])face_presets = config.get("IPAdapter_FaceID_presets", {}).get(ipa_arch_key, [])all_ipa_presets = std_presets + face_presetsdefault_ipa = all_ipa_presets[0] if all_ipa_presets else Noneupdates[ipa_preset] = gr.update(choices=all_ipa_presets, value=default_ipa)defaults = get_model_generation_defaults(val, arch_model_type, MODEL_DEFAULTS_CONFIG)if steps_comp: updates[steps_comp] = gr.update(value=defaults.get('steps'))if cfg_comp: updates[cfg_comp] = gr.update(value=defaults.get('cfg'))if sampler_comp: updates[sampler_comp] = gr.update(value=defaults.get('sampler_name'))if scheduler_comp: updates[scheduler_comp] = gr.update(value=defaults.get('scheduler'))if prompt_comp: updates[prompt_comp] = gr.update(value=defaults.get('positive_prompt'))if neg_prompt_comp: updates[neg_prompt_comp] = gr.update(value=defaults.get('negative_prompt'))return updatesreturn update_fndef 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):def change_fn(*args):model_name = args[0]idx = 1current_arch = args[idx] if arch_comp_ref and idx < len(args) else Noneif arch_comp_ref: idx += 1current_cat = args[idx] if cat_comp_ref and idx < len(args) else Noneif cat_comp_ref: idx += 1current_ar = args[idx] if idx < len(args) else Nonem_type = MODEL_TYPE_MAP.get(model_name, "SDXL")m_info = MODEL_MAP_CHECKPOINT.get(model_name)m_cat = m_info[4] if m_info and len(m_info) > 4 else Noneif not m_cat: m_cat = "ALL"updates = {}target_arch = m_typeif arch_comp_ref:if current_arch == "ALL":updates[arch_comp_ref] = gr.update()target_arch = "ALL"else:updates[arch_comp_ref] = m_typeif cat_comp_ref:if target_arch == "ALL":valid_cats = list(set(cat for cats in ARCH_CATEGORIES_MAP.values() for cat in cats))else:valid_cats = ARCH_CATEGORIES_MAP.get(target_arch, [])cat_choices = ["ALL"] + sorted(valid_cats)if current_cat == "ALL":updates[cat_comp_ref] = gr.update(choices=cat_choices)else:updates[cat_comp_ref] = gr.update(choices=cat_choices, value=m_cat)architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})arch_model_type = architectures_dict.get(m_type, {}).get("model_type", m_type.lower().replace(" ", "").replace(".", ""))arch_features = FEATURES_CONFIG.get(arch_model_type, FEATURES_CONFIG.get('default', {}))enabled_chains = arch_features.get('enabled_chains', [])if lora_acc: updates[lora_acc] = gr.update(visible=('lora' in enabled_chains))if cn_acc: updates[cn_acc] = gr.update(visible=('controlnet' in enabled_chains))if anima_cn_acc: updates[anima_cn_acc] = gr.update(visible=('anima_controlnet_lllite' in enabled_chains))if diffsynth_cn_acc: updates[diffsynth_cn_acc] = gr.update(visible=('controlnet_model_patch' in enabled_chains))if krea2_cn_acc: updates[krea2_cn_acc] = gr.update(visible=('krea2_controlnet' in enabled_chains))if ipa_acc: updates[ipa_acc] = gr.update(visible=('ipadapter' in enabled_chains))if flux1_ipa_acc: updates[flux1_ipa_acc] = gr.update(visible=('flux1_ipadapter' in enabled_chains))if sd3_ipa_acc: updates[sd3_ipa_acc] = gr.update(visible=('sd3_ipadapter' in enabled_chains))if style_acc: updates[style_acc] = gr.update(visible=('style' in enabled_chains))if embed_acc: updates[embed_acc] = gr.update(visible=('embedding' in enabled_chains))if cond_acc: updates[cond_acc] = gr.update(visible=('conditioning' in enabled_chains))if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))if vae_acc: updates[vae_acc] = gr.update(visible=('vae' in enabled_chains))if cs_comp:updates[cs_comp] = gr.update(visible=(arch_model_type == "sd15"))if guidance_comp:updates[guidance_comp] = gr.update(visible=(arch_model_type == "flux1"))if ar_comp:res_key = arch_model_typeif res_key not in RESOLUTION_MAP:res_key = 'sdxl'res_map = RESOLUTION_MAP.get(res_key, {})target_ar = current_ar if current_ar in res_map else (list(res_map.keys())[0] if res_map else "1:1 (Square)")updates[ar_comp] = gr.update(choices=list(res_map.keys()), value=target_ar)if width_comp and height_comp and target_ar in res_map:updates[width_comp] = gr.update(value=res_map[target_ar][0])updates[height_comp] = gr.update(value=res_map[target_ar][1])controlnet_key = architectures_dict.get(m_type, {}).get("controlnet_key", m_type)all_types, default_type, series_choices, default_series, filepath = get_cn_defaults(controlnet_key)for t_comp in cn_types:updates[t_comp] = gr.update(choices=all_types, value=default_type)for s_comp in cn_series:updates[s_comp] = gr.update(choices=series_choices, value=default_series)for f_comp in cn_filepaths:updates[f_comp] = filepathanima_all_types, anima_default_type, anima_series_choices, anima_default_series, anima_filepath = get_anima_cn_defaults()for t_comp in anima_cn_types:updates[t_comp] = gr.update(choices=anima_all_types, value=anima_default_type)for s_comp in anima_cn_series:updates[s_comp] = gr.update(choices=anima_series_choices, value=anima_default_series)for f_comp in anima_cn_filepaths:updates[f_comp] = anima_filepathdiffsynth_all_types, diffsynth_default_type, diffsynth_series_choices, diffsynth_default_series, diffsynth_filepath = get_diffsynth_cn_defaults(controlnet_key)for t_comp in diffsynth_cn_types:updates[t_comp] = gr.update(choices=diffsynth_all_types, value=diffsynth_default_type)for s_comp in diffsynth_cn_series:updates[s_comp] = gr.update(choices=diffsynth_series_choices, value=diffsynth_default_series)for f_comp in diffsynth_cn_filepaths:updates[f_comp] = diffsynth_filepathkrea2_all_types, krea2_default_type, krea2_series_choices, krea2_default_series, krea2_filepath = get_krea2_cn_defaults()for t_comp in krea2_cn_types:updates[t_comp] = gr.update(choices=krea2_all_types, value=krea2_default_type)for s_comp in krea2_cn_series:updates[s_comp] = gr.update(choices=krea2_series_choices, value=krea2_default_series)for f_comp in krea2_cn_filepaths:updates[f_comp] = krea2_filepathif ipa_preset and (arch_model_type in ["sdxl", "sd15", "sd35"]):config = load_ipadapter_config()ipa_arch_key = "SDXL" if arch_model_type in ["sdxl", "sd35"] else "SD1.5"std_presets = config.get("IPAdapter_presets", {}).get(ipa_arch_key, [])face_presets = config.get("IPAdapter_FaceID_presets", {}).get(ipa_arch_key, [])all_ipa_presets = std_presets + face_presetsdefault_ipa = all_ipa_presets[0] if all_ipa_presets else Noneupdates[ipa_preset] = gr.update(choices=all_ipa_presets, value=default_ipa)defaults = get_model_generation_defaults(model_name, arch_model_type, MODEL_DEFAULTS_CONFIG)if steps_comp: updates[steps_comp] = gr.update(value=defaults.get('steps'))if cfg_comp: updates[cfg_comp] = gr.update(value=defaults.get('cfg'))if sampler_comp: updates[sampler_comp] = gr.update(value=defaults.get('sampler_name'))if scheduler_comp: updates[scheduler_comp] = gr.update(value=defaults.get('scheduler'))if prompt_comp: updates[prompt_comp] = gr.update(value=defaults.get('positive_prompt'))if neg_prompt_comp: updates[neg_prompt_comp] = gr.update(value=defaults.get('negative_prompt'))return updatesreturn change_fndef initialize_all_cn_dropdowns(ui_components):default_model_name = list(MODEL_MAP_CHECKPOINT.keys())[0] if MODEL_MAP_CHECKPOINT else Nonedefault_m_type = MODEL_TYPE_MAP.get(default_model_name, "SDXL") if default_model_name else "SDXL"architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})controlnet_key = architectures_dict.get(default_m_type, {}).get("controlnet_key", default_m_type)all_types, default_type, series_choices, default_series, filepath = get_cn_defaults(controlnet_key)anima_all_types, anima_default_type, anima_series_choices, anima_default_series, anima_filepath = get_anima_cn_defaults()diffsynth_all_types, diffsynth_default_type, diffsynth_series_choices, diffsynth_default_series, diffsynth_filepath = get_diffsynth_cn_defaults(controlnet_key)krea2_all_types, krea2_default_type, krea2_series_choices, krea2_default_series, krea2_filepath = get_krea2_cn_defaults()updates = {}for prefix in ["txt2img", "img2img", "inpaint", "outpaint", "hires_fix"]:if f'controlnet_types_{prefix}' in ui_components:for type_dd in ui_components[f'controlnet_types_{prefix}']:updates[type_dd] = gr.update(choices=all_types, value=default_type)for series_dd in ui_components[f'controlnet_series_{prefix}']:updates[series_dd] = gr.update(choices=series_choices, value=default_series)for filepath_state in ui_components[f'controlnet_filepaths_{prefix}']:updates[filepath_state] = filepathif f'anima_controlnet_lllite_types_{prefix}' in ui_components:for type_dd in ui_components[f'anima_controlnet_lllite_types_{prefix}']:updates[type_dd] = gr.update(choices=anima_all_types, value=anima_default_type)for series_dd in ui_components[f'anima_controlnet_lllite_series_{prefix}']:updates[series_dd] = gr.update(choices=anima_series_choices, value=anima_default_series)for filepath_state in ui_components[f'anima_controlnet_lllite_filepaths_{prefix}']:updates[filepath_state] = anima_filepathif f'diffsynth_controlnet_types_{prefix}' in ui_components:for type_dd in ui_components[f'diffsynth_controlnet_types_{prefix}']:updates[type_dd] = gr.update(choices=diffsynth_all_types, value=diffsynth_default_type)for series_dd in ui_components[f'diffsynth_controlnet_series_{prefix}']:updates[series_dd] = gr.update(choices=diffsynth_series_choices, value=default_series)for filepath_state in ui_components[f'diffsynth_controlnet_filepaths_{prefix}']:updates[filepath_state] = diffsynth_filepathif f'krea2_controlnet_types_{prefix}' in ui_components:for type_dd in ui_components[f'krea2_controlnet_types_{prefix}']:updates[type_dd] = gr.update(choices=krea2_all_types, value=krea2_default_type)for series_dd in ui_components[f'krea2_controlnet_series_{prefix}']:updates[series_dd] = gr.update(choices=krea2_series_choices, value=krea2_default_series)for filepath_state in ui_components[f'krea2_controlnet_filepaths_{prefix}']:updates[filepath_state] = krea2_filepathreturn updatesdef initialize_all_ipa_dropdowns(ui_components):config = load_ipadapter_config()if not config: return {}default_model_name = list(MODEL_MAP_CHECKPOINT.keys())[0] if MODEL_MAP_CHECKPOINT else Nonedefault_m_type = MODEL_TYPE_MAP.get(default_model_name, "SDXL") if default_model_name else "SDXL"architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})arch_model_type = architectures_dict.get(default_m_type, {}).get("model_type", default_m_type.lower().replace(" ", "").replace(".", ""))ipa_arch_key = "SDXL" if arch_model_type in ["sdxl", "sd35"] else "SD1.5"unified_presets = config.get("IPAdapter_presets", {}).get(ipa_arch_key, [])faceid_presets = config.get("IPAdapter_FaceID_presets", {}).get(ipa_arch_key, [])all_presets = unified_presets + faceid_presetsdefault_preset = all_presets[0] if all_presets else Noneis_faceid_default = default_preset in faceid_presetslora_strength_update = gr.update(visible=is_faceid_default)updates = {}for prefix in ["txt2img", "img2img", "inpaint", "outpaint", "hires_fix"]:if f'ipadapter_final_preset_{prefix}' in ui_components:for lora_strength_slider in ui_components[f'ipadapter_lora_strengths_{prefix}']:updates[lora_strength_slider] = lora_strength_updateupdates[ui_components[f'ipadapter_final_preset_{prefix}']] = gr.update(choices=all_presets, value=default_preset)updates[ui_components[f'ipadapter_final_lora_strength_{prefix}']] = lora_strength_updatereturn updatesdef run_on_load(ui_components):cn_updates = initialize_all_cn_dropdowns(ui_components)ipa_updates = initialize_all_ipa_dropdowns(ui_components)return {**cn_updates, **ipa_updates}def on_aspect_ratio_change(ratio_key, model_display_name):m_type = MODEL_TYPE_MAP.get(model_display_name, 'SDXL')architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})arch_model_type = architectures_dict.get(m_type, {}).get("model_type", m_type.lower().replace(" ", "").replace(".", ""))res_map = RESOLUTION_MAP.get(arch_model_type, RESOLUTION_MAP.get("sdxl", {}))w, h = res_map.get(ratio_key, (1024, 1024))return w, h123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365import gradio as grfrom core.settings import (MODEL_TYPE_MAP,MODEL_MAP_CHECKPOINT,FEATURES_CONFIG,ARCHITECTURES_CONFIG,MODEL_DEFAULTS_CONFIG,ARCH_CATEGORIES_MAP)from utils.app_utils import get_model_generation_defaultsfrom ui.shared.ui_components import RESOLUTION_MAPfrom .config_loaders import (get_cn_defaults,get_anima_cn_defaults,get_diffsynth_cn_defaults,get_krea2_cn_defaults,load_ipadapter_config)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):def update_fn(*args):arch = args[0]category = args[1]current_ar = args[2] if len(args) > 2 else Noneif arch == "ALL":valid_cats = list(set(cat for cats in ARCH_CATEGORIES_MAP.values() for cat in cats))else:valid_cats = ARCH_CATEGORIES_MAP.get(arch, [])cat_choices = ["ALL"] + sorted(valid_cats)new_category = category if category in cat_choices else "ALL"choices = []for name, info in MODEL_MAP_CHECKPOINT.items():m_arch = info[2]m_cat = info[4] if len(info) > 4 else Nonearch_match = (arch == "ALL" or m_arch == arch)cat_match = (new_category == "ALL" or m_cat == new_category)if arch_match and cat_match:choices.append(name)val = choices[0] if choices else Noneupdates = {m_comp: gr.update(choices=choices, value=val),cat_comp: gr.update(choices=cat_choices, value=new_category)}m_type = MODEL_TYPE_MAP.get(val, "SDXL") if val else "SDXL"architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})arch_model_type = architectures_dict.get(m_type, {}).get("model_type", m_type.lower().replace(" ", "").replace(".", ""))arch_features = FEATURES_CONFIG.get(arch_model_type, FEATURES_CONFIG.get('default', {}))enabled_chains = arch_features.get('enabled_chains', [])if lora_acc: updates[lora_acc] = gr.update(visible=('lora' in enabled_chains))if cn_acc: updates[cn_acc] = gr.update(visible=('controlnet' in enabled_chains))if anima_cn_acc: updates[anima_cn_acc] = gr.update(visible=('anima_controlnet_lllite' in enabled_chains))if diffsynth_cn_acc: updates[diffsynth_cn_acc] = gr.update(visible=('controlnet_model_patch' in enabled_chains))if krea2_cn_acc: updates[krea2_cn_acc] = gr.update(visible=('krea2_controlnet' in enabled_chains))if ipa_acc: updates[ipa_acc] = gr.update(visible=('ipadapter' in enabled_chains))if flux1_ipa_acc: updates[flux1_ipa_acc] = gr.update(visible=('flux1_ipadapter' in enabled_chains))if sd3_ipa_acc: updates[sd3_ipa_acc] = gr.update(visible=('sd3_ipadapter' in enabled_chains))if style_acc: updates[style_acc] = gr.update(visible=('style' in enabled_chains))if embed_acc: updates[embed_acc] = gr.update(visible=('embedding' in enabled_chains))if cond_acc: updates[cond_acc] = gr.update(visible=('conditioning' in enabled_chains))if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))if vae_acc: updates[vae_acc] = gr.update(visible=('vae' in enabled_chains))if cs_comp:updates[cs_comp] = gr.update(visible=(arch_model_type == "sd15"))if guidance_comp:updates[guidance_comp] = gr.update(visible=(arch_model_type == "flux1"))if ar_comp:res_key = arch_model_typeif res_key not in RESOLUTION_MAP:res_key = 'sdxl'res_map = RESOLUTION_MAP.get(res_key, {})target_ar = current_ar if current_ar in res_map else (list(res_map.keys())[0] if res_map else "1:1 (Square)")updates[ar_comp] = gr.update(choices=list(res_map.keys()), value=target_ar)if width_comp and height_comp and target_ar in res_map:updates[width_comp] = gr.update(value=res_map[target_ar][0])updates[height_comp] = gr.update(value=res_map[target_ar][1])controlnet_key = architectures_dict.get(m_type, {}).get("controlnet_key", m_type)all_types, default_type, series_choices, default_series, filepath = get_cn_defaults(controlnet_key)for t_comp in cn_types:updates[t_comp] = gr.update(choices=all_types, value=default_type)for s_comp in cn_series:updates[s_comp] = gr.update(choices=series_choices, value=default_series)for f_comp in cn_filepaths:updates[f_comp] = filepathanima_all_types, anima_default_type, anima_series_choices, anima_default_series, anima_filepath = get_anima_cn_defaults()for t_comp in anima_cn_types:updates[t_comp] = gr.update(choices=anima_all_types, value=anima_default_type)for s_comp in anima_cn_series:updates[s_comp] = gr.update(choices=anima_series_choices, value=anima_default_series)for f_comp in anima_cn_filepaths:updates[f_comp] = anima_filepathdiffsynth_all_types, diffsynth_default_type, diffsynth_series_choices, diffsynth_default_series, diffsynth_filepath = get_diffsynth_cn_defaults(controlnet_key)for t_comp in diffsynth_cn_types:updates[t_comp] = gr.update(choices=diffsynth_all_types, value=diffsynth_default_type)for s_comp in diffsynth_cn_series:updates[s_comp] = gr.update(choices=diffsynth_series_choices, value=diffsynth_default_series)for f_comp in diffsynth_cn_filepaths:updates[f_comp] = diffsynth_filepathkrea2_all_types, krea2_default_type, krea2_series_choices, krea2_default_series, krea2_filepath = get_krea2_cn_defaults()for t_comp in krea2_cn_types:updates[t_comp] = gr.update(choices=krea2_all_types, value=krea2_default_type)for s_comp in krea2_cn_series:updates[s_comp] = gr.update(choices=krea2_series_choices, value=krea2_default_series)for f_comp in krea2_cn_filepaths:updates[f_comp] = krea2_filepathif ipa_preset and (arch_model_type in ["sdxl", "sd15", "sd35"]):config = load_ipadapter_config()ipa_arch_key = "SDXL" if arch_model_type in ["sdxl", "sd35"] else "SD1.5"std_presets = config.get("IPAdapter_presets", {}).get(ipa_arch_key, [])face_presets = config.get("IPAdapter_FaceID_presets", {}).get(ipa_arch_key, [])all_ipa_presets = std_presets + face_presetsdefault_ipa = all_ipa_presets[0] if all_ipa_presets else Noneupdates[ipa_preset] = gr.update(choices=all_ipa_presets, value=default_ipa)defaults = get_model_generation_defaults(val, arch_model_type, MODEL_DEFAULTS_CONFIG)if steps_comp: updates[steps_comp] = gr.update(value=defaults.get('steps'))if cfg_comp: updates[cfg_comp] = gr.update(value=defaults.get('cfg'))if sampler_comp: updates[sampler_comp] = gr.update(value=defaults.get('sampler_name'))if scheduler_comp: updates[scheduler_comp] = gr.update(value=defaults.get('scheduler'))if prompt_comp: updates[prompt_comp] = gr.update(value=defaults.get('positive_prompt'))if neg_prompt_comp: updates[neg_prompt_comp] = gr.update(value=defaults.get('negative_prompt'))return updatesreturn update_fndef 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):def change_fn(*args):model_name = args[0]idx = 1current_arch = args[idx] if arch_comp_ref and idx < len(args) else Noneif arch_comp_ref: idx += 1current_cat = args[idx] if cat_comp_ref and idx < len(args) else Noneif cat_comp_ref: idx += 1current_ar = args[idx] if idx < len(args) else Nonem_type = MODEL_TYPE_MAP.get(model_name, "SDXL")m_info = MODEL_MAP_CHECKPOINT.get(model_name)m_cat = m_info[4] if m_info and len(m_info) > 4 else Noneif not m_cat: m_cat = "ALL"updates = {}target_arch = m_typeif arch_comp_ref:if current_arch == "ALL":updates[arch_comp_ref] = gr.update()target_arch = "ALL"else:updates[arch_comp_ref] = m_typeif cat_comp_ref:if target_arch == "ALL":valid_cats = list(set(cat for cats in ARCH_CATEGORIES_MAP.values() for cat in cats))else:valid_cats = ARCH_CATEGORIES_MAP.get(target_arch, [])cat_choices = ["ALL"] + sorted(valid_cats)if current_cat == "ALL":updates[cat_comp_ref] = gr.update(choices=cat_choices)else:updates[cat_comp_ref] = gr.update(choices=cat_choices, value=m_cat)architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})arch_model_type = architectures_dict.get(m_type, {}).get("model_type", m_type.lower().replace(" ", "").replace(".", ""))arch_features = FEATURES_CONFIG.get(arch_model_type, FEATURES_CONFIG.get('default', {}))enabled_chains = arch_features.get('enabled_chains', [])if lora_acc: updates[lora_acc] = gr.update(visible=('lora' in enabled_chains))if cn_acc: updates[cn_acc] = gr.update(visible=('controlnet' in enabled_chains))if anima_cn_acc: updates[anima_cn_acc] = gr.update(visible=('anima_controlnet_lllite' in enabled_chains))if diffsynth_cn_acc: updates[diffsynth_cn_acc] = gr.update(visible=('controlnet_model_patch' in enabled_chains))if krea2_cn_acc: updates[krea2_cn_acc] = gr.update(visible=('krea2_controlnet' in enabled_chains))if ipa_acc: updates[ipa_acc] = gr.update(visible=('ipadapter' in enabled_chains))if flux1_ipa_acc: updates[flux1_ipa_acc] = gr.update(visible=('flux1_ipadapter' in enabled_chains))if sd3_ipa_acc: updates[sd3_ipa_acc] = gr.update(visible=('sd3_ipadapter' in enabled_chains))if style_acc: updates[style_acc] = gr.update(visible=('style' in enabled_chains))if embed_acc: updates[embed_acc] = gr.update(visible=('embedding' in enabled_chains))if cond_acc: updates[cond_acc] = gr.update(visible=('conditioning' in enabled_chains))if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))if vae_acc: updates[vae_acc] = gr.update(visible=('vae' in enabled_chains))if cs_comp:updates[cs_comp] = gr.update(visible=(arch_model_type == "sd15"))if guidance_comp:updates[guidance_comp] = gr.update(visible=(arch_model_type == "flux1"))if ar_comp:res_key = arch_model_typeif res_key not in RESOLUTION_MAP:res_key = 'sdxl'res_map = RESOLUTION_MAP.get(res_key, {})target_ar = current_ar if current_ar in res_map else (list(res_map.keys())[0] if res_map else "1:1 (Square)")updates[ar_comp] = gr.update(choices=list(res_map.keys()), value=target_ar)if width_comp and height_comp and target_ar in res_map:updates[width_comp] = gr.update(value=res_map[target_ar][0])updates[height_comp] = gr.update(value=res_map[target_ar][1])controlnet_key = architectures_dict.get(m_type, {}).get("controlnet_key", m_type)all_types, default_type, series_choices, default_series, filepath = get_cn_defaults(controlnet_key)for t_comp in cn_types:updates[t_comp] = gr.update(choices=all_types, value=default_type)for s_comp in cn_series:updates[s_comp] = gr.update(choices=series_choices, value=default_series)for f_comp in cn_filepaths:updates[f_comp] = filepathanima_all_types, anima_default_type, anima_series_choices, anima_default_series, anima_filepath = get_anima_cn_defaults()for t_comp in anima_cn_types:updates[t_comp] = gr.update(choices=anima_all_types, value=anima_default_type)for s_comp in anima_cn_series:updates[s_comp] = gr.update(choices=anima_series_choices, value=anima_default_series)for f_comp in anima_cn_filepaths:updates[f_comp] = anima_filepathdiffsynth_all_types, diffsynth_default_type, diffsynth_series_choices, diffsynth_default_series, diffsynth_filepath = get_diffsynth_cn_defaults(controlnet_key)for t_comp in diffsynth_cn_types:updates[t_comp] = gr.update(choices=diffsynth_all_types, value=diffsynth_default_type)for s_comp in diffsynth_cn_series:updates[s_comp] = gr.update(choices=diffsynth_series_choices, value=diffsynth_default_series)for f_comp in diffsynth_cn_filepaths:updates[f_comp] = diffsynth_filepathkrea2_all_types, krea2_default_type, krea2_series_choices, krea2_default_series, krea2_filepath = get_krea2_cn_defaults()for t_comp in krea2_cn_types:updates[t_comp] = gr.update(choices=krea2_all_types, value=krea2_default_type)for s_comp in krea2_cn_series:updates[s_comp] = gr.update(choices=krea2_series_choices, value=krea2_default_series)for f_comp in krea2_cn_filepaths:updates[f_comp] = krea2_filepathif ipa_preset and (arch_model_type in ["sdxl", "sd15", "sd35"]):config = load_ipadapter_config()ipa_arch_key = "SDXL" if arch_model_type in ["sdxl", "sd35"] else "SD1.5"std_presets = config.get("IPAdapter_presets", {}).get(ipa_arch_key, [])face_presets = config.get("IPAdapter_FaceID_presets", {}).get(ipa_arch_key, [])all_ipa_presets = std_presets + face_presetsdefault_ipa = all_ipa_presets[0] if all_ipa_presets else Noneupdates[ipa_preset] = gr.update(choices=all_ipa_presets, value=default_ipa)defaults = get_model_generation_defaults(model_name, arch_model_type, MODEL_DEFAULTS_CONFIG)if steps_comp: updates[steps_comp] = gr.update(value=defaults.get('steps'))if cfg_comp: updates[cfg_comp] = gr.update(value=defaults.get('cfg'))if sampler_comp: updates[sampler_comp] = gr.update(value=defaults.get('sampler_name'))if scheduler_comp: updates[scheduler_comp] = gr.update(value=defaults.get('scheduler'))if prompt_comp: updates[prompt_comp] = gr.update(value=defaults.get('positive_prompt'))if neg_prompt_comp: updates[neg_prompt_comp] = gr.update(value=defaults.get('negative_prompt'))return updatesreturn change_fndef initialize_all_cn_dropdowns(ui_components):default_model_name = list(MODEL_MAP_CHECKPOINT.keys())[0] if MODEL_MAP_CHECKPOINT else Nonedefault_m_type = MODEL_TYPE_MAP.get(default_model_name, "SDXL") if default_model_name else "SDXL"architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})controlnet_key = architectures_dict.get(default_m_type, {}).get("controlnet_key", default_m_type)all_types, default_type, series_choices, default_series, filepath = get_cn_defaults(controlnet_key)anima_all_types, anima_default_type, anima_series_choices, anima_default_series, anima_filepath = get_anima_cn_defaults()diffsynth_all_types, diffsynth_default_type, diffsynth_series_choices, diffsynth_default_series, diffsynth_filepath = get_diffsynth_cn_defaults(controlnet_key)krea2_all_types, krea2_default_type, krea2_series_choices, krea2_default_series, krea2_filepath = get_krea2_cn_defaults()updates = {}for prefix in ["txt2img", "img2img", "inpaint", "outpaint", "hires_fix"]:if f'controlnet_types_{prefix}' in ui_components:for type_dd in ui_components[f'controlnet_types_{prefix}']:updates[type_dd] = gr.update(choices=all_types, value=default_type)for series_dd in ui_components[f'controlnet_series_{prefix}']:updates[series_dd] = gr.update(choices=series_choices, value=default_series)for filepath_state in ui_components[f'controlnet_filepaths_{prefix}']:updates[filepath_state] = filepathif f'anima_controlnet_lllite_types_{prefix}' in ui_components:for type_dd in ui_components[f'anima_controlnet_lllite_types_{prefix}']:updates[type_dd] = gr.update(choices=anima_all_types, value=anima_default_type)for series_dd in ui_components[f'anima_controlnet_lllite_series_{prefix}']:updates[series_dd] = gr.update(choices=anima_series_choices, value=anima_default_series)for filepath_state in ui_components[f'anima_controlnet_lllite_filepaths_{prefix}']:updates[filepath_state] = anima_filepathif f'diffsynth_controlnet_types_{prefix}' in ui_components:for type_dd in ui_components[f'diffsynth_controlnet_types_{prefix}']:updates[type_dd] = gr.update(choices=diffsynth_all_types, value=diffsynth_default_type)for series_dd in ui_components[f'diffsynth_controlnet_series_{prefix}']:updates[series_dd] = gr.update(choices=diffsynth_series_choices, value=default_series)for filepath_state in ui_components[f'diffsynth_controlnet_filepaths_{prefix}']:updates[filepath_state] = diffsynth_filepathif f'krea2_controlnet_types_{prefix}' in ui_components:for type_dd in ui_components[f'krea2_controlnet_types_{prefix}']:updates[type_dd] = gr.update(choices=krea2_all_types, value=krea2_default_type)for series_dd in ui_components[f'krea2_controlnet_series_{prefix}']:updates[series_dd] = gr.update(choices=krea2_series_choices, value=krea2_default_series)for filepath_state in ui_components[f'krea2_controlnet_filepaths_{prefix}']:updates[filepath_state] = krea2_filepathreturn updatesdef initialize_all_ipa_dropdowns(ui_components):config = load_ipadapter_config()if not config: return {}default_model_name = list(MODEL_MAP_CHECKPOINT.keys())[0] if MODEL_MAP_CHECKPOINT else Nonedefault_m_type = MODEL_TYPE_MAP.get(default_model_name, "SDXL") if default_model_name else "SDXL"architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})arch_model_type = architectures_dict.get(default_m_type, {}).get("model_type", default_m_type.lower().replace(" ", "").replace(".", ""))ipa_arch_key = "SDXL" if arch_model_type in ["sdxl", "sd35"] else "SD1.5"unified_presets = config.get("IPAdapter_presets", {}).get(ipa_arch_key, [])faceid_presets = config.get("IPAdapter_FaceID_presets", {}).get(ipa_arch_key, [])all_presets = unified_presets + faceid_presetsdefault_preset = all_presets[0] if all_presets else Noneis_faceid_default = default_preset in faceid_presetslora_strength_update = gr.update(visible=is_faceid_default)updates = {}for prefix in ["txt2img", "img2img", "inpaint", "outpaint", "hires_fix"]:if f'ipadapter_final_preset_{prefix}' in ui_components:for lora_strength_slider in ui_components[f'ipadapter_lora_strengths_{prefix}']:updates[lora_strength_slider] = lora_strength_updateupdates[ui_components[f'ipadapter_final_preset_{prefix}']] = gr.update(choices=all_presets, value=default_preset)updates[ui_components[f'ipadapter_final_lora_strength_{prefix}']] = lora_strength_updatereturn updatesdef run_on_load(ui_components):cn_updates = initialize_all_cn_dropdowns(ui_components)ipa_updates = initialize_all_ipa_dropdowns(ui_components)return {**cn_updates, **ipa_updates}def on_aspect_ratio_change(ratio_key, model_display_name):m_type = MODEL_TYPE_MAP.get(model_display_name, 'SDXL')architectures_dict = ARCHITECTURES_CONFIG.get('architectures', {})arch_model_type = architectures_dict.get(m_type, {}).get("model_type", m_type.lower().replace(" ", "").replace(".", ""))res_map = RESOLUTION_MAP.get(arch_model_type, RESOLUTION_MAP.get("sdxl", {}))w, h = res_map.get(ratio_key, (1024, 1024))return w, h
11 unmodified lines12131415161718192021222324252611 unmodified lineswith gr.Blocks() as demo:gr.Markdown("# ImageGen")gr.Markdown("This demo is a streamlined version of the [Comfy web UI](https://github.com/RioShiina47/comfy-webui)'s [ImageGen](https://huggingface.co/spaces/RioShiina/ImageGen) functionality. ""Other spaces: [ImageGen1](https://huggingface.co/spaces/RioShiina/ImageGen1), ""[ImageGen2](https://huggingface.co/spaces/RioShiina/ImageGen2), ""[ImageGen3](https://huggingface.co/spaces/RioShiina/ImageGen3), ""[ImageGen4](https://huggingface.co/spaces/RioShiina/ImageGen4), ""[ImageGen5](https://huggingface.co/spaces/RioShiina/ImageGen5), ""[ImageGen6](https://huggingface.co/spaces/RioShiina/ImageGen6), ""[ImageGen7](https://huggingface.co/spaces/RioShiina/ImageGen7), ""[ImageGen8](https://huggingface.co/spaces/RioShiina/ImageGen8)")with gr.Tabs(elem_id="tabs_container") as tabs:with gr.TabItem("Txt2Img", id=0):11 unmodified lines1213141516171811 unmodified lineswith gr.Blocks() as demo:gr.Markdown("# ImageGen")gr.Markdown("This demo is a streamlined version of the [Comfy web UI](https://github.com/RioShiina47/comfy-webui)'s [ImageGen](https://huggingface.co/spaces/RioShiina/ImageGen) functionality.")with gr.Tabs(elem_id="tabs_container") as tabs:with gr.TabItem("Txt2Img", id=0):
249 unmodified lines250251252253254255256257258249 unmodified linescomponents = {}key = lambda name: f"{name}_{prefix}"with gr.Accordion("Anima ControlNet Lllite Settings", open=False, visible=('anima_controlnet_lllite' in default_enabled_chains)) as accordion:components[key('anima_controlnet_lllite_accordion')] = accordiongr.Markdown("💡 **Tip:** Processed using the [kohya-ss/ComfyUI-Anima-LLLite](https://github.com/kohya-ss/ComfyUI-Anima-LLLite) node.")cn_rows, images, series, types, strengths, filepaths, start_percents, end_percents = [], [], [], [], [], [], [], []components.update({249 unmodified lines250251252253254255256257249 unmodified linescomponents = {}key = lambda name: f"{name}_{prefix}"with gr.Accordion("Anima ControlNet LLLite Settings", open=False, visible=('anima_controlnet_lllite' in default_enabled_chains)) as accordion:components[key('anima_controlnet_lllite_accordion')] = accordioncn_rows, images, series, types, strengths, filepaths, start_percents, end_percents = [], [], [], [], [], [], [], []components.update({
12345678910Anima_ControlNet_Lllite:- Filepath: "anima-lllite-lineart-1.safetensors"Series: "kohya-ss"Type: ["Lineart"]- Filepath: "anima-lllite-depth-1.safetensors"Series: "kohya-ss"Type: ["Depth"]- Filepath: "anima-lllite-pose-1.safetensors"Series: "kohya-ss"Type: ["Pose"]12345678910111213Anima_ControlNet_Lllite:- Filepath: "anima-lllite-any-test-like-v2.safetensors"Series: "kohya-ss"Type: ["Any-Test"]- Filepath: "anima-lllite-depth-1.safetensors"Series: "kohya-ss"Type: ["Depth"]- Filepath: "anima-lllite-lineart-1.safetensors"Series: "kohya-ss"Type: ["Lineart"]- Filepath: "anima-lllite-pose-1.safetensors"Series: "kohya-ss"Type: ["Pose"]
198 unmodified lines19920020120220320444 unmodified lines249250251252253254198 unmodified lines"3:4 (Classic Portrait)": [896, 1152]"3:2 (Photography)": [1216, 832]"2:3 (Photography Portrait)": [832, 1216]sd35:"1:1 (Square)": [1024, 1024]"16:9 (Landscape)": [1344, 768]44 unmodified lineshidream-o1: 32hidream-i1: 1flux1: 1sd35: 1sdxl: 1sd15: 1198 unmodified lines19920020120220320420520620720820921021121244 unmodified lines257258259260261262263198 unmodified lines"3:4 (Classic Portrait)": [896, 1152]"3:2 (Photography)": [1216, 832]"2:3 (Photography Portrait)": [832, 1216]auraflow:"1:1 (Square)": [1024, 1024]"16:9 (Landscape)": [1344, 768]"9:16 (Portrait)": [768, 1344]"4:3 (Classic)": [1152, 896]"3:4 (Classic Portrait)": [896, 1152]"3:2 (Photography)": [1216, 832]"2:3 (Photography Portrait)": [832, 1216]sd35:"1:1 (Square)": [1024, 1024]"16:9 (Landscape)": [1344, 768]44 unmodified lineshidream-o1: 32hidream-i1: 1flux1: 1auraflow: 1sd35: 1sdxl: 1sd15: 1
13 unmodified lines141516171819100 unmodified lines12012112212312412520 unmodified lines146147148149150151152153154155156157158159160161162163164165166167168580 unmodified lines74975075175275375413 unmodified linessource: "hf"repo_id: "Comfy-Org/Lumina_Image_2.0_Repackaged"repository_file_path: "all_in_one/lumina_2.safetensors"# SD3.5- filename: "sd3.5_large_fp8_scaled.safetensors"source: "hf"100 unmodified linessource: "hf"repo_id: "stabilityai/stable-diffusion-xl-base-1.0"repository_file_path: "sd_xl_base_1.0.safetensors"# SD1.5- filename: "v1-5-pruned-emaonly.safetensors"source: "hf"20 unmodified linesrepo_id: "Comfy-Org/sigclip_vision_384"repository_file_path: "sigclip_vision_patch14_384.safetensors"controlnet:# Anima- filename: "anima-lllite-lineart-1.safetensors"source: "hf"repo_id: "kohya-ss/Anima-LLLite"repository_file_path: "anima-lllite-lineart-1.safetensors"- filename: "anima-lllite-depth-1.safetensors"source: "hf"repo_id: "kohya-ss/Anima-LLLite"repository_file_path: "anima-lllite-depth-1.safetensors"- filename: "anima-lllite-pose-1.safetensors"source: "hf"repo_id: "kohya-ss/Anima-LLLite"repository_file_path: "anima-lllite-pose-1.safetensors"- filename: "anima-lllite-scribble-1.safetensors"source: "hf"repo_id: "kohya-ss/Anima-LLLite"repository_file_path: "anima-lllite-scribble-1.safetensors"# SD3.5- filename: "sd3.5_large_controlnet_blur.safetensors"source: "hf"580 unmodified linesrepo_id: "h94/IP-Adapter-FaceID"repository_file_path: "ip-adapter-faceid-plusv2_sdxl_lora.safetensors"model_patches:# Z-Image- filename: "Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.safetensors"source: "hf"13 unmodified lines1415161718192021222324100 unmodified lines12512612712812913013113213313413520 unmodified lines156157158159160161580 unmodified lines74274374474574674774874975075175275375475575675775875976076176276376476576676776813 unmodified linessource: "hf"repo_id: "Comfy-Org/Lumina_Image_2.0_Repackaged"repository_file_path: "all_in_one/lumina_2.safetensors"# AuraFlow- filename: "aura_flow_0.3.safetensors"source: "hf"repo_id: "fal/AuraFlow-v0.3"repository_file_path: "aura_flow_0.3.safetensors"# SD3.5- filename: "sd3.5_large_fp8_scaled.safetensors"source: "hf"100 unmodified linessource: "hf"repo_id: "stabilityai/stable-diffusion-xl-base-1.0"repository_file_path: "sd_xl_base_1.0.safetensors"# SDXL-Turbo- filename: "sd_xl_turbo_1.0_fp16.safetensors"source: "hf"repo_id: "stabilityai/sdxl-turbo"repository_file_path: "sd_xl_turbo_1.0_fp16.safetensors"# SD1.5- filename: "v1-5-pruned-emaonly.safetensors"source: "hf"20 unmodified linesrepo_id: "Comfy-Org/sigclip_vision_384"repository_file_path: "sigclip_vision_patch14_384.safetensors"controlnet:# SD3.5- filename: "sd3.5_large_controlnet_blur.safetensors"source: "hf"580 unmodified linesrepo_id: "h94/IP-Adapter-FaceID"repository_file_path: "ip-adapter-faceid-plusv2_sdxl_lora.safetensors"model_patches:# Anima- filename: "anima-lllite-any-test-like-v2.safetensors"source: "hf"repo_id: "Comfy-Org/Anima-LLLite"repository_file_path: "model_patches/anima-lllite-any-test-like-v2.safetensors"- filename: "anima-lllite-lineart-1.safetensors"source: "hf"repo_id: "Comfy-Org/Anima-LLLite"repository_file_path: "model_patches/anima-lllite-lineart-1.safetensors"- filename: "anima-lllite-depth-1.safetensors"source: "hf"repo_id: "Comfy-Org/Anima-LLLite"repository_file_path: "model_patches/anima-lllite-depth-1.safetensors"- filename: "anima-lllite-pose-1.safetensors"source: "hf"repo_id: "Comfy-Org/Anima-LLLite"repository_file_path: "model_patches/anima-lllite-pose-1.safetensors"- filename: "anima-lllite-scribble-1.safetensors"source: "hf"repo_id: "Comfy-Org/Anima-LLLite"repository_file_path: "model_patches/anima-lllite-scribble-1.safetensors"# Z-Image- filename: "Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.safetensors"source: "hf"
161 unmodified lines162163164165166167161 unmodified lines- vae- pidsd35:enabled_chains:- lora161 unmodified lines162163164165166167168169170171172173161 unmodified lines- vae- pidauraflow:enabled_chains:- lora- conditioning- vaesd35:enabled_chains:- lora
22 unmodified lines23242526272859 unmodified lines88899091929322 unmodified lines- "HiDream-O1"- "HiDream-I1"- "FLUX.1"- "SD3.5"- "SDXL"- "SD1.5"59 unmodified lines"FLUX.1":model_type: "flux1"controlnet_key: "FLUX.1""SDXL":model_type: "sdxl"controlnet_key: "SDXL"22 unmodified lines2324252627282959 unmodified lines89909192939495969722 unmodified lines- "HiDream-O1"- "HiDream-I1"- "FLUX.1"- "AuraFlow"- "SD3.5"- "SDXL"- "SD1.5"59 unmodified lines"FLUX.1":model_type: "flux1"controlnet_key: "FLUX.1""AuraFlow":model_type: "auraflow"controlnet_key: "AuraFlow""SDXL":model_type: "sdxl"controlnet_key: "SDXL"
242 unmodified lines2432442452462472485 unmodified lines254255256257258259260261262263242 unmodified linessampler_name: "euler"scheduler: "simple"SD3.5:_defaults:steps: 205 unmodified lines_defaults:steps: 25cfg: 7.0sampler_name: "euler"scheduler: "simple"positive_prompt: ""negative_prompt: ""SD1.5:_defaults:242 unmodified lines2432442452462472482492502512522532542552562572582592602615 unmodified lines267268269270271272273274275276277278242 unmodified linessampler_name: "euler"scheduler: "simple"AuraFlow:_defaults:steps: 20cfg: 3.5sampler_name: "euler"scheduler: "sgm_uniform""PurpleSmartAI/Pony-V7-Base":steps: 40cfg: 3.5sampler_name: "euler"scheduler: "simple"positive_prompt: "special tags, factual description of image, stylistic description of image, additional content tags"SD3.5:_defaults:steps: 205 unmodified lines_defaults:steps: 25cfg: 7.0sampler_name: "euler_ancestral"scheduler: "simple""stabilityai/SDXL-Turbo-1.0":steps: 1cfg: 1.0positive_prompt: "NOTE: The model generates images of size 512x512 but higher image sizes work as well."SD1.5:_defaults:
323 unmodified lines32432532632732832975 unmodified lines405406407408409410411412413323 unmodified linesvae: "ae.safetensors"clip1: "clip_l.safetensors"clip2: "t5xxl_fp8_e4m3fn_scaled.safetensors"SD3.5:latent_type: sd3_latentmodels:75 unmodified linespath: "CyberRealisticPony_V17.0_FP16.safetensors"category: "Pony"# SDXL-Base- display_name: "stabilityai/stable-diffusion-xl-base-1.0"path: "sd_xl_base_1.0.safetensors"category: "Base"SD1.5:latent_type: latentmodels:323 unmodified lines32432532632732832933033133233333475 unmodified lines410411412413414415416417418419420421422323 unmodified linesvae: "ae.safetensors"clip1: "clip_l.safetensors"clip2: "t5xxl_fp8_e4m3fn_scaled.safetensors"AuraFlow:latent_type: latentmodels:- display_name: "fal/AuraFlow-v0.3"path: "aura_flow_0.3.safetensors"SD3.5:latent_type: sd3_latentmodels:75 unmodified linespath: "CyberRealisticPony_V17.0_FP16.safetensors"category: "Pony"# SDXL-Base- display_name: "stabilityai/SDXL-Base-1.0"path: "sd_xl_base_1.0.safetensors"category: "Base"# SDXL-Turbo- display_name: "stabilityai/SDXL-Turbo-1.0"path: "sd_xl_turbo_1.0_fp16.safetensors"category: "Turbo"SD1.5:latent_type: latentmodels:
.gitattributes+35-4
app.py+36-6
chain_injectors/anima_controlnet_lllite_injector.py+6-1
comfy_integration/setup.py+1-9
core/pipelines/base_pipeline.py+14-3
core/pipelines/workflow_recipes/_partials/conditioning/auraflow.yamlAdded+48
requirements.txt+2-2
ui/events/chain_handlers.py+19
ui/events/change_handlers.py+364-364
ui/layout.py+1-9
ui/shared/ui_components.py+1-2
yaml/anima_controlnet_lllite_models.yaml+5-2
yaml/constants.yaml+9
yaml/file_list.yaml+31-17
yaml/image_gen_features.yaml+6
yaml/model_architectures.yaml+4
yaml/model_defaults.yaml+18-3
yaml/model_list.yaml+10-1