Spaces:
Runtime error
Runtime error
Upgrade to Gradio 6
Browse filesFiles changed (24)
- .gitignoreAdded+15
- README.md-1
- app.py+5-6
- core/pipelines/pipeline_input_processor.py+28-21
- core/pipelines/sd_image_pipeline.py+8-5
- core/pipelines/workflow_recipes/_partials/conditioning/flux1.yaml+3-2
- core/settings.py+12-2
- mcp_tools/common.py+2-1
- mcp_tools/get_feature_list.py+27-5
- mcp_tools/mcp_gradio_integration.py+2
- requirements.txt+1-1
- ui/events/change_handlers.py+36-12
- ui/events/main.py+176-13
- ui/events/run_handlers.py+53-18
- ui/shared/inpaint_ui.py → ui/imagegen_ui.pyRenamed+197-125
- ui/layout.py+4-20
- ui/shared/hires_fix_ui.pyDeleted-111
- ui/shared/img2img_ui.pyDeleted-92
- ui/shared/outpaint_ui.pyDeleted-107
- ui/shared/txt2img_ui.pyDeleted-66
- ui/shared/ui_components.py+1-2
- yaml/chain_features.yaml-128
- yaml/image_gen_features.yaml → yaml/model_architecture_features.yamlRenamed+199-199
- yaml/task_features.yamlAdded+125
123456789101112131415__pycache__/*.py[cod]*$py.class
# Environments & IDE.env.venv/env/venv/.idea/.vscode/
# Temporary files*.tmp*.temp3 unmodified lines456789103 unmodified linescolorFrom: purplecolorTo: redsdk: gradiosdk_version: "5.50.0"app_file: app.pypython_version: 3.12short_description: Multi-task image generator with dynamic, chainable workflows3 unmodified lines4567893 unmodified linescolorFrom: purplecolorTo: redsdk: gradioapp_file: app.pypython_version: 3.12short_description: Multi-task image generator with dynamic, chainable workflows
48 unmodified lines4950515253545524 unmodified lines808182838485863 unmodified lines9091929394959697989948 unmodified linesreturn "Startup check passed."def main():from comfy_integration import setup as setup_comfyuifrom utils.app_utils import load_ipadapter_presets24 unmodified linesload_ipadapter_presets()print("--- ✅ IPAdapter setup complete. ---")print("--- Environment configured. Proceeding with module imports. ---")from ui.layout import build_uifrom ui.events import attach_event_handlers3 unmodified linesprint(f"✅ Working directory is stable: {os.getcwd()}")demo = build_ui(attach_event_handlers)print("--- Launching Gradio Interface ---")demo.queue().launch(mcp_server=True)if __name__ == "__main__":main()48 unmodified lines4950515253545524 unmodified lines8081828384853 unmodified lines8990919293949596979848 unmodified linesreturn "Startup check passed."def create_app():from comfy_integration import setup as setup_comfyuifrom utils.app_utils import load_ipadapter_presets24 unmodified linesload_ipadapter_presets()print("--- ✅ IPAdapter setup complete. ---")print("--- Environment configured. Proceeding with module imports. ---")from ui.layout import build_uifrom ui.events import attach_event_handlers3 unmodified linesprint(f"✅ Working directory is stable: {os.getcwd()}")demo = build_ui(attach_event_handlers)return demodemo = create_app()if __name__ == "__main__":print("--- Launching Gradio Interface ---")demo.queue().launch(mcp_server=True, footer_links=["api", "gradio", "settings"])
4 unmodified lines5678910119 unmodified lines21222324252626 unmodified lines5354555657585985 unmodified lines14514614714814915015113 unmodified lines1651661671681691701719 unmodified lines1811821831841851861879 unmodified lines1971981992002012022039 unmodified lines2132142152162172182199 unmodified lines22923023123223323423524 unmodified lines26026126226326426526622 unmodified lines28929029129229329429515 unmodified lines31131231331431531631713 unmodified lines3313323333343353363374 unmodified lines3423433443453463473484 unmodified lines3533543553563573583594 unmodified lines3643653663673683693704 unmodified lines3753763773783793803814 unmodified lines3863873883893903913924 unmodified lines3973983994004014024034 unmodified lines4084094104114124134145 unmodified lines4204214224234244254268 unmodified lines4354364374384394404414 unmodified linesfrom PIL import Image, ImageChopsfrom typing import Dict, Any, Listfrom core.settings import INPUT_DIR, MULTIPLIERS_MAP, LORA_DIR, EMBEDDING_DIR, VAE_DIRfrom utils.app_utils import (sanitize_filename,get_lora_path,9 unmodified linestask_type = ui_inputs['task_type']temp_files_to_clean = []multiplier = MULTIPLIERS_MAP.get(workflow_model_type, 8)img_w, img_h = 0, 0if task_type == 'txt2img':26 unmodified lineslora_data = ui_inputs.get('lora_data', [])active_loras_for_gpu, active_loras_for_meta = [], []if lora_data:sources, ids, scales, files = lora_data[0::4], lora_data[1::4], lora_data[2::4], lora_data[3::4]for i, (source, lora_id, scale, _) in enumerate(zip(sources, ids, scales, files)):if scale > 0 and lora_id and lora_id.strip():85 unmodified linesembedding_data = ui_inputs.get('embedding_data', [])embedding_filenames = []if embedding_data:emb_sources, emb_ids, emb_files = embedding_data[0::3], embedding_data[1::3], embedding_data[2::3]for i, (source, emb_id, _) in enumerate(zip(emb_sources, emb_ids, emb_files)):if emb_id and emb_id.strip():13 unmodified linescontrolnet_data = ui_inputs.get('controlnet_data', [])active_controlnets = []if controlnet_data:(cn_images, _, _, cn_strengths, cn_filepaths) = [controlnet_data[i::5] for i in range(5)]for i in range(len(cn_images)):if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":9 unmodified linesanima_controlnet_lllite_data = ui_inputs.get('anima_controlnet_lllite_data', [])active_anima_controlnets = []if anima_controlnet_lllite_data:(cn_images, _, _, cn_strengths, cn_filepaths, cn_starts, cn_ends) = [anima_controlnet_lllite_data[i::7] for i in range(7)]for i in range(len(cn_images)):if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":9 unmodified linesdiffsynth_controlnet_data = ui_inputs.get('diffsynth_controlnet_data', [])active_diffsynth_controlnets = []if diffsynth_controlnet_data:(cn_images, _, _, cn_strengths, cn_filepaths) = [diffsynth_controlnet_data[i::5] for i in range(5)]for i in range(len(cn_images)):if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":9 unmodified lineskrea2_controlnet_data = ui_inputs.get('krea2_controlnet_data', [])active_krea2_controlnets = []if krea2_controlnet_data:(cn_images, _, _, cn_strengths, cn_filepaths) = [krea2_controlnet_data[i::5] for i in range(5)]for i in range(len(cn_images)):if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":9 unmodified linesipadapter_data = ui_inputs.get('ipadapter_data', [])active_ipadapters = []if ipadapter_data:num_ipa_units = (len(ipadapter_data) - 5) // 3final_preset, final_weight, final_lora_strength, final_embeds_scaling, final_combine_method = ipadapter_data[-5:]ipa_images, ipa_weights, ipa_lora_strengths = [ipadapter_data[i*num_ipa_units:(i+1)*num_ipa_units] for i in range(3)]24 unmodified linesflux1_ipadapter_data = ui_inputs.get('flux1_ipadapter_data', [])active_flux1_ipadapters = []if flux1_ipadapter_data:num_units = len(flux1_ipadapter_data) // 4f_images = flux1_ipadapter_data[0*num_units : 1*num_units]f_weights = flux1_ipadapter_data[1*num_units : 2*num_units]22 unmodified linessd3_ipadapter_data = ui_inputs.get('sd3_ipadapter_chain', [])active_sd3_ipadapters = []if sd3_ipadapter_data:num_units = len(sd3_ipadapter_data) // 4s_images = sd3_ipadapter_data[0*num_units : 1*num_units]s_weights = sd3_ipadapter_data[1*num_units : 2*num_units]15 unmodified linesstyle_data = ui_inputs.get('style_data', [])active_styles = []if style_data:num_units = len(style_data) // 2st_images = style_data[0*num_units : 1*num_units]st_strengths = style_data[1*num_units : 2*num_units]13 unmodified linesreference_latent_data = ui_inputs.get('reference_latent_data', [])active_reference_latents = []if reference_latent_data:for img in reference_latent_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified lineshidream_o1_reference_data = ui_inputs.get('hidream_o1_reference_data', [])active_hidream_o1_reference = []if hidream_o1_reference_data:for img in hidream_o1_reference_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified linesjoyai_reference_data = ui_inputs.get('joyai_reference_data', [])active_joyai_reference = []if joyai_reference_data:for img in joyai_reference_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified lineskrea2_identity_edit_data = ui_inputs.get('krea2_identity_edit_data', [])active_krea2_identity_edit = []if krea2_identity_edit_data:for img in krea2_identity_edit_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified lineskrea2_reference_edit_data = ui_inputs.get('krea2_reference_edit_data', [])active_krea2_reference_edit = []if krea2_reference_edit_data:for img in krea2_reference_edit_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified linesqwen_image_edit_data = ui_inputs.get('qwen_image_edit_data', [])active_qwen_image_edit = []if qwen_image_edit_data:for img in qwen_image_edit_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified linesboogu_edit_data = ui_inputs.get('boogu_edit_data', [])active_boogu_edit = []if boogu_edit_data:for img in boogu_edit_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified linesreference_image_data = ui_inputs.get('reference_image_data', [])active_reference_images = []if reference_image_data:for img in reference_image_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)5 unmodified linesvae_source = ui_inputs.get('vae_source')vae_id = ui_inputs.get('vae_id')vae_name_override = Noneif vae_source and vae_source != "None":if vae_source == "File":vae_name_override = sanitize_filename(vae_id)local_path = os.path.join(VAE_DIR, vae_name_override)8 unmodified linesconditioning_data = ui_inputs.get('conditioning_data', [])active_conditioning = []if conditioning_data:num_units = len(conditioning_data) // 6prompts, widths, heights, xs, ys, strengths = [conditioning_data[i*num_units : (i+1)*num_units] for i in range(6)]for i in range(num_units):4 unmodified lines5678910111213149 unmodified lines2425262728293031323326 unmodified lines6061626364656685 unmodified lines15215315415515615715813 unmodified lines1721731741751761771789 unmodified lines1881891901911921931949 unmodified lines2042052062072082092109 unmodified lines2202212222232242252269 unmodified lines23623723823924024124224 unmodified lines26726826927027127227322 unmodified lines29629729829930030130215 unmodified lines31831932032132232332413 unmodified lines3383393403413423433444 unmodified lines3493503513523533543554 unmodified lines3603613623633643653664 unmodified lines3713723733743753763774 unmodified lines3823833843853863873884 unmodified lines3933943953963973983994 unmodified lines4044054064074084094104 unmodified lines4154164174184194204215 unmodified lines4274284294304314324338 unmodified lines4424434444454464474484 unmodified linesfrom PIL import Image, ImageChopsfrom typing import Dict, Any, Listfrom core.settings import (INPUT_DIR, MULTIPLIERS_MAP, LORA_DIR, EMBEDDING_DIR, VAE_DIR,FEATURES_CONFIG, TASK_FEATURES_CONFIG)from utils.app_utils import (sanitize_filename,get_lora_path,9 unmodified linestask_type = ui_inputs['task_type']temp_files_to_clean = []arch_enabled_chains = FEATURES_CONFIG.get(workflow_model_type, {}).get('enabled_chains', [])task_enabled_chains = TASK_FEATURES_CONFIG.get(task_type, {}).get('enabled_chains', [])enabled_chains = set([c for c in arch_enabled_chains if c in task_enabled_chains])multiplier = MULTIPLIERS_MAP.get(workflow_model_type, 8)img_w, img_h = 0, 0if task_type == 'txt2img':26 unmodified lineslora_data = ui_inputs.get('lora_data', [])active_loras_for_gpu, active_loras_for_meta = [], []if 'lora' in enabled_chains and lora_data:sources, ids, scales, files = lora_data[0::4], lora_data[1::4], lora_data[2::4], lora_data[3::4]for i, (source, lora_id, scale, _) in enumerate(zip(sources, ids, scales, files)):if scale > 0 and lora_id and lora_id.strip():85 unmodified linesembedding_data = ui_inputs.get('embedding_data', [])embedding_filenames = []if 'embedding' in enabled_chains and embedding_data:emb_sources, emb_ids, emb_files = embedding_data[0::3], embedding_data[1::3], embedding_data[2::3]for i, (source, emb_id, _) in enumerate(zip(emb_sources, emb_ids, emb_files)):if emb_id and emb_id.strip():13 unmodified linescontrolnet_data = ui_inputs.get('controlnet_data', [])active_controlnets = []if 'controlnet' in enabled_chains and controlnet_data:(cn_images, _, _, cn_strengths, cn_filepaths) = [controlnet_data[i::5] for i in range(5)]for i in range(len(cn_images)):if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":9 unmodified linesanima_controlnet_lllite_data = ui_inputs.get('anima_controlnet_lllite_data', [])active_anima_controlnets = []if 'anima_controlnet_lllite' in enabled_chains and anima_controlnet_lllite_data:(cn_images, _, _, cn_strengths, cn_filepaths, cn_starts, cn_ends) = [anima_controlnet_lllite_data[i::7] for i in range(7)]for i in range(len(cn_images)):if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":9 unmodified linesdiffsynth_controlnet_data = ui_inputs.get('diffsynth_controlnet_data', [])active_diffsynth_controlnets = []if 'diffsynth_controlnet' in enabled_chains and diffsynth_controlnet_data:(cn_images, _, _, cn_strengths, cn_filepaths) = [diffsynth_controlnet_data[i::5] for i in range(5)]for i in range(len(cn_images)):if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":9 unmodified lineskrea2_controlnet_data = ui_inputs.get('krea2_controlnet_data', [])active_krea2_controlnets = []if 'krea2_controlnet' in enabled_chains and krea2_controlnet_data:(cn_images, _, _, cn_strengths, cn_filepaths) = [krea2_controlnet_data[i::5] for i in range(5)]for i in range(len(cn_images)):if cn_images[i] and cn_strengths[i] > 0 and cn_filepaths[i] and cn_filepaths[i] != "None":9 unmodified linesipadapter_data = ui_inputs.get('ipadapter_data', [])active_ipadapters = []if 'ipadapter' in enabled_chains and ipadapter_data:num_ipa_units = (len(ipadapter_data) - 5) // 3final_preset, final_weight, final_lora_strength, final_embeds_scaling, final_combine_method = ipadapter_data[-5:]ipa_images, ipa_weights, ipa_lora_strengths = [ipadapter_data[i*num_ipa_units:(i+1)*num_ipa_units] for i in range(3)]24 unmodified linesflux1_ipadapter_data = ui_inputs.get('flux1_ipadapter_data', [])active_flux1_ipadapters = []if 'flux1_ipadapter' in enabled_chains and flux1_ipadapter_data:num_units = len(flux1_ipadapter_data) // 4f_images = flux1_ipadapter_data[0*num_units : 1*num_units]f_weights = flux1_ipadapter_data[1*num_units : 2*num_units]22 unmodified linessd3_ipadapter_data = ui_inputs.get('sd3_ipadapter_chain', [])active_sd3_ipadapters = []if 'sd3_ipadapter' in enabled_chains and sd3_ipadapter_data:num_units = len(sd3_ipadapter_data) // 4s_images = sd3_ipadapter_data[0*num_units : 1*num_units]s_weights = sd3_ipadapter_data[1*num_units : 2*num_units]15 unmodified linesstyle_data = ui_inputs.get('style_data', [])active_styles = []if 'style' in enabled_chains and style_data:num_units = len(style_data) // 2st_images = style_data[0*num_units : 1*num_units]st_strengths = style_data[1*num_units : 2*num_units]13 unmodified linesreference_latent_data = ui_inputs.get('reference_latent_data', [])active_reference_latents = []if 'reference_latent' in enabled_chains and reference_latent_data:for img in reference_latent_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified lineshidream_o1_reference_data = ui_inputs.get('hidream_o1_reference_data', [])active_hidream_o1_reference = []if 'hidream_o1_reference' in enabled_chains and hidream_o1_reference_data:for img in hidream_o1_reference_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified linesjoyai_reference_data = ui_inputs.get('joyai_reference_data', [])active_joyai_reference = []if 'joyai_image' in enabled_chains and joyai_reference_data:for img in joyai_reference_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified lineskrea2_identity_edit_data = ui_inputs.get('krea2_identity_edit_data', [])active_krea2_identity_edit = []if 'krea2_identity_edit' in enabled_chains and krea2_identity_edit_data:for img in krea2_identity_edit_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified lineskrea2_reference_edit_data = ui_inputs.get('krea2_reference_edit_data', [])active_krea2_reference_edit = []if 'krea2_style_reference' in enabled_chains and krea2_reference_edit_data:for img in krea2_reference_edit_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified linesqwen_image_edit_data = ui_inputs.get('qwen_image_edit_data', [])active_qwen_image_edit = []if 'qwen_image_edit' in enabled_chains and qwen_image_edit_data:for img in qwen_image_edit_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified linesboogu_edit_data = ui_inputs.get('boogu_edit_data', [])active_boogu_edit = []if 'boogu_image_edit' in enabled_chains and boogu_edit_data:for img in boogu_edit_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)4 unmodified linesreference_image_data = ui_inputs.get('reference_image_data', [])active_reference_images = []if 'reference_image' in enabled_chains and reference_image_data:for img in reference_image_data:if img:if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)5 unmodified linesvae_source = ui_inputs.get('vae_source')vae_id = ui_inputs.get('vae_id')vae_name_override = Noneif 'vae' in enabled_chains and vae_source and vae_source != "None":if vae_source == "File":vae_name_override = sanitize_filename(vae_id)local_path = os.path.join(VAE_DIR, vae_name_override)8 unmodified linesconditioning_data = ui_inputs.get('conditioning_data', [])active_conditioning = []if 'conditioning' in enabled_chains and conditioning_data:num_units = len(conditioning_data) // 6prompts, widths, heights, xs, ys, strengths = [conditioning_data[i*num_units : (i+1)*num_units] for i in range(6)]for i in range(num_units):
69 unmodified lines7071727374757672 unmodified lines1491501511521531541553 unmodified lines15916016116216316416516612 unmodified lines17918018118218318418569 unmodified linesrequired_models = self.get_required_models(model_display_name=model_display_name)is_pid_enabled = (ui_inputs.get('pid_settings', 'OFF') == 'ON' and task_type == 'txt2img')if is_pid_enabled:import yamlpid_config_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'yaml', 'pid.yaml')72 unmodified linesassembler = WorkflowAssembler(recipe_path, dynamic_values=dynamic_values)hidream_o1_smoothing_data = []if workflow_model_type == 'hidream-o1' and model_display_name == "HiDream-O1-Image":hidream_o1_smoothing_data.append({})workflow_inputs = {3 unmodified lines"sampler_name": ui_inputs['sampler'], "scheduler": ui_inputs['scheduler'],"batch_size": ui_inputs['batch_size'],"denoise": ui_inputs['denoise'],"vae_name": ui_inputs.get('vae_name'),"guidance": ui_inputs.get('guidance', 3.5),"lora_chain": active_loras_for_gpu,"controlnet_chain": active_controlnets if not active_anima_controlnets else [],"anima_controlnet_lllite_chain": active_anima_controlnets,12 unmodified lines"qwen_image_edit_chain": active_qwen_image_edit,"boogu_image_edit_chain": active_boogu_edit,"reference_image_chain": active_reference_images,"vae_chain": [ui_inputs.get('vae_name')] if ui_inputs.get('vae_name') else [],"hidream_o1_smoothing_chain": hidream_o1_smoothing_data,"pid_chain": [ui_inputs.get('pid_settings', 'OFF')] if is_pid_enabled else [],"scheduler_width": ui_inputs.get('width', 1024),69 unmodified lines707172737475767778798072 unmodified lines1531541551561571581593 unmodified lines16316416516616716816912 unmodified lines18218318418518618718869 unmodified linesrequired_models = self.get_required_models(model_display_name=model_display_name)arch_enabled_chains = FEATURES_CONFIG.get(workflow_model_type, {}).get('enabled_chains', [])task_enabled_chains = TASK_FEATURES_CONFIG.get(task_type, {}).get('enabled_chains', [])enabled_chains = set([c for c in arch_enabled_chains if c in task_enabled_chains])is_pid_enabled = (ui_inputs.get('pid_settings', 'OFF') == 'ON' and 'pid' in enabled_chains and task_type == 'txt2img')if is_pid_enabled:import yamlpid_config_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'yaml', 'pid.yaml')72 unmodified linesassembler = WorkflowAssembler(recipe_path, dynamic_values=dynamic_values)hidream_o1_smoothing_data = []if 'hidream_o1_smoothing' in enabled_chains and model_display_name == "HiDream-O1-Image":hidream_o1_smoothing_data.append({})workflow_inputs = {3 unmodified lines"sampler_name": ui_inputs['sampler'], "scheduler": ui_inputs['scheduler'],"batch_size": ui_inputs['batch_size'],"denoise": ui_inputs['denoise'],"vae_name": ui_inputs.get('vae_name') if 'vae' in enabled_chains else None,"lora_chain": active_loras_for_gpu,"controlnet_chain": active_controlnets if not active_anima_controlnets else [],"anima_controlnet_lllite_chain": active_anima_controlnets,12 unmodified lines"qwen_image_edit_chain": active_qwen_image_edit,"boogu_image_edit_chain": active_boogu_edit,"reference_image_chain": active_reference_images,"vae_chain": [ui_inputs.get('vae_name')] if (ui_inputs.get('vae_name') and 'vae' in enabled_chains) else [],"hidream_o1_smoothing_chain": hidream_o1_smoothing_data,"pid_chain": [ui_inputs.get('pid_settings', 'OFF')] if is_pid_enabled else [],"scheduler_width": ui_inputs.get('width', 1024),
21 unmodified lines22232425262744 unmodified lines727374757621 unmodified linesflux_guidance:class_type: FluxGuidancetitle: "FluxGuidance"connections:- from: "unet_loader:0"44 unmodified linesunet_name: "unet_loader:unet_name"vae_name: "vae_loader:vae_name"clip1_name: "clip_loader:clip_name1"clip2_name: "clip_loader:clip_name2"guidance: "flux_guidance:guidance"21 unmodified lines222324252627282944 unmodified lines7475767721 unmodified linesflux_guidance:class_type: FluxGuidancetitle: "FluxGuidance"params:guidance: 3.5connections:- from: "unet_loader:0"44 unmodified linesunet_name: "unet_loader:unet_name"vae_name: "vae_loader:vae_name"clip1_name: "clip_loader:clip_name1"clip2_name: "clip_loader:clip_name2"
37 unmodified lines3839404142434410 unmodified lines55565758596061626364656667127 unmodified lines1951961971981992003 unmodified lines20420520620737 unmodified lines_IPADAPTER_LIST_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'ipadapter.yaml')_CONSTANTS_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'constants.yaml')_MODEL_ARCHITECTURES_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'model_architectures.yaml')_IMAGE_GEN_FEATURES_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'image_gen_features.yaml')_MODEL_DEFAULTS_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'model_defaults.yaml')def load_constants_from_yaml(filepath=_CONSTANTS_PATH):10 unmodified lineswith open(filepath, 'r', encoding='utf-8') as f:return yaml.safe_load(f)def load_features_config(filepath=_IMAGE_GEN_FEATURES_PATH):if not os.path.exists(filepath):print(f"Warning: Features file not found at {filepath}.")return {}with open(filepath, 'r', encoding='utf-8') as f:return yaml.safe_load(f)def load_model_defaults(filepath=_MODEL_DEFAULTS_PATH):if not os.path.exists(filepath):print(f"Warning: Model defaults file not found at {filepath}.")127 unmodified linesMULTIPLIERS_MAP = _constants.get('MULTIPLIERS_MAP', {})ARCHITECTURES_CONFIG = load_architectures_config()FEATURES_CONFIG = load_features_config()MODEL_DEFAULTS_CONFIG = load_model_defaults()except Exception as e:print(f"FATAL: Could not load constants from YAML. Error: {e}")3 unmodified linesMULTIPLIERS_MAP = {}ARCHITECTURES_CONFIG = {}FEATURES_CONFIG = {}MODEL_DEFAULTS_CONFIG = {}37 unmodified lines383940414243444510 unmodified lines5657585960616263646566676869707172737475127 unmodified lines2032042052062072082093 unmodified lines21321421521621737 unmodified lines_IPADAPTER_LIST_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'ipadapter.yaml')_CONSTANTS_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'constants.yaml')_MODEL_ARCHITECTURES_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'model_architectures.yaml')_MODEL_ARCH_FEATURES_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'model_architecture_features.yaml')_TASK_FEATURES_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'task_features.yaml')_MODEL_DEFAULTS_PATH = os.path.join(_PROJECT_ROOT, 'yaml', 'model_defaults.yaml')def load_constants_from_yaml(filepath=_CONSTANTS_PATH):10 unmodified lineswith open(filepath, 'r', encoding='utf-8') as f:return yaml.safe_load(f)def load_features_config(filepath=_MODEL_ARCH_FEATURES_PATH):if not os.path.exists(filepath):print(f"Warning: Features file not found at {filepath}.")return {}with open(filepath, 'r', encoding='utf-8') as f:return yaml.safe_load(f)def load_task_features_config(filepath=_TASK_FEATURES_PATH):if not os.path.exists(filepath):print(f"Warning: Task features file not found at {filepath}.")return {}with open(filepath, 'r', encoding='utf-8') as f:return yaml.safe_load(f)def load_model_defaults(filepath=_MODEL_DEFAULTS_PATH):if not os.path.exists(filepath):print(f"Warning: Model defaults file not found at {filepath}.")127 unmodified linesMULTIPLIERS_MAP = _constants.get('MULTIPLIERS_MAP', {})ARCHITECTURES_CONFIG = load_architectures_config()FEATURES_CONFIG = load_features_config()TASK_FEATURES_CONFIG = load_task_features_config()MODEL_DEFAULTS_CONFIG = load_model_defaults()except Exception as e:print(f"FATAL: Could not load constants from YAML. Error: {e}")3 unmodified linesMULTIPLIERS_MAP = {}ARCHITECTURES_CONFIG = {}FEATURES_CONFIG = {}TASK_FEATURES_CONFIG = {}MODEL_DEFAULTS_CONFIG = {}
19 unmodified lines202122232425262719 unmodified lines_MODEL_ARCHITECTURES_PATH = os.path.join(_YAML_DIR, "model_architectures.yaml")_MODEL_LIST_PATH = os.path.join(_YAML_DIR, "model_list.yaml")_MODEL_DEFAULTS_PATH = os.path.join(_YAML_DIR, "model_defaults.yaml")_IMAGE_GEN_FEATURES_PATH = os.path.join(_YAML_DIR, "image_gen_features.yaml")_CHAIN_FEATURES_PATH = os.path.join(_YAML_DIR, "chain_features.yaml")_CONSTANTS_PATH = os.path.join(_YAML_DIR, "constants.yaml")19 unmodified lines20212223242526272819 unmodified lines_MODEL_ARCHITECTURES_PATH = os.path.join(_YAML_DIR, "model_architectures.yaml")_MODEL_LIST_PATH = os.path.join(_YAML_DIR, "model_list.yaml")_MODEL_DEFAULTS_PATH = os.path.join(_YAML_DIR, "model_defaults.yaml")_IMAGE_GEN_FEATURES_PATH = os.path.join(_YAML_DIR, "model_architecture_features.yaml")_CHAIN_FEATURES_PATH = os.path.join(_YAML_DIR, "chain_features.yaml")_TASK_FEATURES_PATH = os.path.join(_YAML_DIR, "task_features.yaml")_CONSTANTS_PATH = os.path.join(_YAML_DIR, "constants.yaml")
12345672 unmodified lines798081828384858687888990919265 unmodified lines15815916016116216310 unmodified lines17417517617717817918019 unmodified lines200201202203204205206import osfrom copy import deepcopyfrom .common import _load_yaml, _CHAIN_FEATURES_PATH, _YAML_DIRfrom .error_schema import make_not_found_error72 unmodified linesreturn itemdef _build_feature_entry(chain_name: str, chain_data: dict, include_schema: bool = False) -> dict:example_item = _get_default_example_chain_item(chain_name, chain_data)entry = {"feature_name": chain_name,"chains": chain_data.get("chains", chain_name),"display_name": chain_data.get("display_name", chain_name),"description": chain_data.get("description", ""),"supported_tasks": chain_data.get("supported_tasks", []),"max_count": chain_data.get("max_count", 1),"usage_guideline": chain_data.get("usage_guideline", ""),"example_chain_item": example_item,65 unmodified linesreturns complete feature details INCLUDING parameters_schema for the requested feature(s)."""chain_features = _load_yaml(_CHAIN_FEATURES_PATH)targets = []is_single_string_query = False10 unmodified lines# Case 1: Empty input -> return summary list of all features (without parameters_schema)if not targets:return [_build_feature_entry(name, data, include_schema=False)for name, data in chain_features.items()]19 unmodified lines# Case 3: Return full info including parameters_schemaresults = [_build_feature_entry(target, chain_features[target], include_schema=True)for target in resolved_targets]12345672 unmodified lines79808182838485868788899091929394959697989910010110210310410510610710810911011111211365 unmodified lines17918018118218318418510 unmodified lines19619719819920020120219 unmodified lines222223224225226227228import osfrom copy import deepcopyfrom .common import _load_yaml, _CHAIN_FEATURES_PATH, _TASK_FEATURES_PATH, _YAML_DIRfrom .error_schema import make_not_found_error72 unmodified linesreturn itemdef _get_supported_tasks_for_feature(chain_name: str, chain_data: dict, task_features: dict) -> list:feat_chains = chain_data.get("chains", chain_name)if isinstance(feat_chains, str):target_chains = {feat_chains, chain_name}elif isinstance(feat_chains, (list, tuple, set)):target_chains = set(feat_chains) | {chain_name}else:target_chains = {chain_name}supported = []for task_name, task_data in task_features.items():if not isinstance(task_data, dict):continueenabled_chains = task_data.get("enabled_chains", [])if any(c in enabled_chains for c in target_chains):supported.append(task_name)return supporteddef _build_feature_entry(chain_name: str, chain_data: dict, task_features: dict = None, include_schema: bool = False) -> dict:if task_features is None:task_features = _load_yaml(_TASK_FEATURES_PATH)example_item = _get_default_example_chain_item(chain_name, chain_data)entry = {"feature_name": chain_name,"chains": chain_data.get("chains", chain_name),"display_name": chain_data.get("display_name", chain_name),"description": chain_data.get("description", ""),"supported_tasks": _get_supported_tasks_for_feature(chain_name, chain_data, task_features),"max_count": chain_data.get("max_count", 1),"usage_guideline": chain_data.get("usage_guideline", ""),"example_chain_item": example_item,65 unmodified linesreturns complete feature details INCLUDING parameters_schema for the requested feature(s)."""chain_features = _load_yaml(_CHAIN_FEATURES_PATH)task_features = _load_yaml(_TASK_FEATURES_PATH)targets = []is_single_string_query = False10 unmodified lines# Case 1: Empty input -> return summary list of all features (without parameters_schema)if not targets:return [_build_feature_entry(name, data, task_features, include_schema=False)for name, data in chain_features.items()]19 unmodified lines# Case 3: Return full info including parameters_schemaresults = [_build_feature_entry(target, chain_features[target], task_features, include_schema=True)for target in resolved_targets]
55 unmodified lines5657585960615 unmodified lines67686970717255 unmodified linesapi_name = getattr(fn, "api_name", None)if api_name not in HIGH_LEVEL_MCP_API_NAMES:fn.show_api = Falsedeps = getattr(demo, "dependencies", None)if deps is None and hasattr(demo, "config") and isinstance(demo.config, dict):5 unmodified linesapi_name = dep.get("api_name")if api_name not in HIGH_LEVEL_MCP_API_NAMES:dep["show_api"] = Falseprint("[MCP Protection] Cleaned up demo dependencies. Suppressed atomic API endpoints.")55 unmodified lines565758596061625 unmodified lines6869707172737455 unmodified linesapi_name = getattr(fn, "api_name", None)if api_name not in HIGH_LEVEL_MCP_API_NAMES:fn.show_api = Falsefn.api_name = Falsedeps = getattr(demo, "dependencies", None)if deps is None and hasattr(demo, "config") and isinstance(demo.config, dict):5 unmodified linesapi_name = dep.get("api_name")if api_name not in HIGH_LEVEL_MCP_API_NAMES:dep["show_api"] = Falsedep["api_name"] = Falseprint("[MCP Protection] Cleaned up demo dependencies. Suppressed atomic API endpoints.")
12345comfyui-frontend-package==1.49.6comfyui-workflow-templates==0.11.41comfyui-embedded-docs==0.5.10torchtorchsde12345comfyui-frontend-package==1.49.6comfyui-workflow-templates==0.11.44comfyui-embedded-docs==0.5.10torchtorchsde
2 unmodified lines3456788 unmodified lines1718192021222329 unmodified lines5354555657585916 unmodified lines76777879808182838461 unmodified lines14614714814915015115234 unmodified lines18718818919019119219316 unmodified lines21021121221321421521621721873 unmodified lines29229329429529629729849 unmodified lines3483493503513523533542 unmodified linesMODEL_TYPE_MAP,MODEL_MAP_CHECKPOINT,FEATURES_CONFIG,ARCHITECTURES_CONFIG,MODEL_DEFAULTS_CONFIG,ARCH_CATEGORIES_MAP8 unmodified linesload_ipadapter_config)def make_update_fn(m_comp, cat_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, krea2_reference_edit_acc=None, qwen_image_edit_acc=None, boogu_edit_acc=None, ref_img_acc=None):def update_fn(*args):arch = args[0]category = args[1]29 unmodified linesarch_model_type = architectures_dict.get(m_type, {}).get("model_type", m_type.lower().replace(" ", "").replace(".", ""))arch_features = FEATURES_CONFIG.get(arch_model_type, {})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))16 unmodified linesif ref_img_acc: updates[ref_img_acc] = gr.update(visible=('reference_image' 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 guidance_comp:updates[guidance_comp] = gr.update(visible=(arch_model_type == "flux1"))if ar_comp:res_key = arch_model_type61 unmodified linesreturn update_fndef make_model_change_fn(cat_comp_ref, 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, krea2_reference_edit_acc=None, qwen_image_edit_acc=None, boogu_edit_acc=None, ref_img_acc=None):def change_fn(*args):model_name = args[0]idx = 134 unmodified linesarch_model_type = architectures_dict.get(m_type, {}).get("model_type", m_type.lower().replace(" ", "").replace(".", ""))arch_features = FEATURES_CONFIG.get(arch_model_type, {})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))16 unmodified linesif ref_img_acc: updates[ref_img_acc] = gr.update(visible=('reference_image' 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 guidance_comp:updates[guidance_comp] = gr.update(visible=(arch_model_type == "flux1"))if ar_comp:res_key = arch_model_type73 unmodified lineskrea2_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)49 unmodified lineslora_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_update2 unmodified lines34567898 unmodified lines1819202122232429 unmodified lines545556575859606162636465666768697071727316 unmodified lines90919293949561 unmodified lines15715815916016116216334 unmodified lines19819920020120220320420520620720820921021121221321421521621721821922016 unmodified lines23723823924024124273 unmodified lines31631731831932032132249 unmodified lines3723733743753763773782 unmodified linesMODEL_TYPE_MAP,MODEL_MAP_CHECKPOINT,FEATURES_CONFIG,TASK_FEATURES_CONFIG,ARCHITECTURES_CONFIG,MODEL_DEFAULTS_CONFIG,ARCH_CATEGORIES_MAP8 unmodified linesload_ipadapter_config)def make_update_fn(m_comp, cat_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, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp, pid_acc=None, vae_acc=None, joyai_ref_acc=None, krea2_identity_edit_acc=None, krea2_reference_edit_acc=None, qwen_image_edit_acc=None, boogu_edit_acc=None, ref_img_acc=None, task_type=None, type_comp=None):def update_fn(*args):arch = args[0]category = args[1]29 unmodified linesarch_model_type = architectures_dict.get(m_type, {}).get("model_type", m_type.lower().replace(" ", "").replace(".", ""))arch_features = FEATURES_CONFIG.get(arch_model_type, {})arch_enabled_chains = arch_features.get('enabled_chains', [])# Determine current task type for task-level feature filteringcurrent_task = task_type # static task_type for standalone prefixesif type_comp is not None:# unified imagegen: task type comes from extra argtype_arg_idx = 3 if ar_comp else 2if len(args) > type_arg_idx:type_val = args[type_arg_idx]type_map = {'Txt2Img': 'txt2img', 'Img2Img': 'img2img', 'Inpaint': 'inpaint', 'Outpaint': 'outpaint', 'Hires. Fix': 'hires_fix'}current_task = type_map.get(type_val, 'txt2img')task_enabled_chains = TASK_FEATURES_CONFIG.get(current_task, {}).get('enabled_chains', []) if current_task else arch_enabled_chainsenabled_chains = [c for c in arch_enabled_chains if c in task_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))16 unmodified linesif ref_img_acc: updates[ref_img_acc] = gr.update(visible=('reference_image' 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 ar_comp:res_key = arch_model_type61 unmodified linesreturn update_fndef make_model_change_fn(cat_comp_ref, 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, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp, pid_acc=None, vae_acc=None, joyai_ref_acc=None, krea2_identity_edit_acc=None, krea2_reference_edit_acc=None, qwen_image_edit_acc=None, boogu_edit_acc=None, ref_img_acc=None, task_type=None, type_comp=None):def change_fn(*args):model_name = args[0]idx = 134 unmodified linesarch_model_type = architectures_dict.get(m_type, {}).get("model_type", m_type.lower().replace(" ", "").replace(".", ""))arch_features = FEATURES_CONFIG.get(arch_model_type, {})arch_enabled_chains = arch_features.get('enabled_chains', [])# Determine current task type for task-level feature filteringcurrent_task = task_type # static task_type for standalone prefixesif type_comp is not None:# unified imagegen: task type comes from extra arg after model, arch, cat, artype_arg_idx = 1if arch_comp_ref: type_arg_idx += 1if cat_comp_ref: type_arg_idx += 1if ar_comp: type_arg_idx += 1if len(args) > type_arg_idx:type_val = args[type_arg_idx]type_map = {'Txt2Img': 'txt2img', 'Img2Img': 'img2img', 'Inpaint': 'inpaint', 'Outpaint': 'outpaint', 'Hires. Fix': 'hires_fix'}current_task = type_map.get(type_val, 'txt2img')task_enabled_chains = TASK_FEATURES_CONFIG.get(current_task, {}).get('enabled_chains', []) if current_task else arch_enabled_chainsenabled_chains = [c for c in arch_enabled_chains if c in task_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))16 unmodified linesif ref_img_acc: updates[ref_img_acc] = gr.update(visible=('reference_image' 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 ar_comp:res_key = arch_model_type73 unmodified lineskrea2_all_types, krea2_default_type, krea2_series_choices, krea2_default_series, krea2_filepath = get_krea2_cn_defaults()updates = {}for prefix in ["imagegen", "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)49 unmodified lineslora_strength_update = gr.update(visible=is_faceid_default)updates = {}for prefix in ["imagegen", "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_update
28 unmodified lines29303132333435363738394041424350 unmodified lines94959697989910031 unmodified lines1321331341351361371381391401411421431 unmodified line14514614714814915015136 unmodified lines18818919019119219319419519617 unmodified lines21421521621721821935 unmodified lines25525625725825926026121 unmodified lines28328428528628728828928 unmodified linesfrom .run_handlers import create_run_eventdef attach_event_handlers(ui_components, demo):for prefix, task_type in [("txt2img", "txt2img"), ("img2img", "img2img"), ("inpaint", "inpaint"),("outpaint", "outpaint"), ("hires_fix", "hires_fix"),]:arch_comp = ui_components.get(f'model_arch_{prefix}')cat_comp = ui_components.get(f'model_cat_{prefix}')model_comp = ui_components.get(f'base_model_{prefix}')guidance_comp = ui_components.get(f'guidance_{prefix}') or ui_components.get(f'{prefix}_guidance')aspect_ratio_comp = ui_components.get(f'aspect_ratio_{prefix}') or ui_components.get(f'{prefix}_aspect_ratio_dropdown')width_comp = ui_components.get(f'width_{prefix}') or ui_components.get(f'{prefix}_width')height_comp = ui_components.get(f'height_{prefix}') or ui_components.get(f'{prefix}_height')50 unmodified linesif arch_comp and cat_comp and model_comp:outputs = [model_comp, cat_comp]if guidance_comp: outputs.append(guidance_comp)if aspect_ratio_comp: outputs.append(aspect_ratio_comp)outputs.extend(cn_types_list + cn_series_list + cn_filepaths_list)outputs.extend(anima_cn_types_list + anima_cn_series_list + anima_cn_filepaths_list)31 unmodified linesdiffsynth_cn_types_list, diffsynth_cn_series_list, diffsynth_cn_filepaths_list,krea2_cn_types_list, krea2_cn_series_list, krea2_cn_filepaths_list,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,ref_latent_accordion, hidream_o1_ref_accordion, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, krea2_identity_edit_acc=krea2_identity_edit_accordion, krea2_reference_edit_acc=krea2_reference_edit_accordion, qwen_image_edit_acc=qwen_image_edit_accordion, boogu_edit_acc=boogu_edit_accordion, ref_img_acc=ref_img_accordion)inputs = [arch_comp, cat_comp]if aspect_ratio_comp:inputs.append(aspect_ratio_comp)arch_comp.change(fn=update_fn, inputs=inputs, outputs=outputs)cat_comp.change(fn=update_fn, inputs=inputs, outputs=outputs)1 unmodified lineoutputs2 = []if arch_comp: outputs2.append(arch_comp)if cat_comp: outputs2.append(cat_comp)if guidance_comp: outputs2.append(guidance_comp)if aspect_ratio_comp: outputs2.append(aspect_ratio_comp)outputs2.extend(cn_types_list + cn_series_list + cn_filepaths_list)outputs2.extend(anima_cn_types_list + anima_cn_series_list + anima_cn_filepaths_list)36 unmodified linesdiffsynth_cn_types_list, diffsynth_cn_series_list, diffsynth_cn_filepaths_list,krea2_cn_types_list, krea2_cn_series_list, krea2_cn_filepaths_list,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,ref_latent_accordion, hidream_o1_ref_accordion, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, krea2_identity_edit_acc=krea2_identity_edit_accordion, krea2_reference_edit_acc=krea2_reference_edit_accordion, qwen_image_edit_acc=qwen_image_edit_accordion, boogu_edit_acc=boogu_edit_accordion, ref_img_acc=ref_img_accordion)model_comp.change(fn=change_fn, inputs=inputs2, outputs=outputs2)create_lora_event_handlers(prefix, ui_components)17 unmodified linescreate_reference_image_event_handlers(prefix, ui_components)create_run_event(prefix, task_type, ui_components)if 'view_mode_inpaint' in ui_components:def toggle_inpaint_fullscreen_view(view_mode):is_fullscreen = (view_mode == "Fullscreen View")35 unmodified lines)all_load_outputs = []for prefix in ["txt2img", "img2img", "inpaint", "outpaint", "hires_fix"]:if f'controlnet_types_{prefix}' in ui_components:all_load_outputs.extend(ui_components[f'controlnet_types_{prefix}'])all_load_outputs.extend(ui_components[f'controlnet_series_{prefix}'])21 unmodified linesoutputs=all_load_outputs)for prefix in ["txt2img", "img2img", "inpaint", "outpaint", "hires_fix"]:aspect_ratio_dropdown = ui_components.get(f'aspect_ratio_{prefix}') or ui_components.get(f'{prefix}_aspect_ratio_dropdown')width_component = ui_components.get(f'width_{prefix}') or ui_components.get(f'{prefix}_width')height_component = ui_components.get(f'height_{prefix}') or ui_components.get(f'{prefix}_height')28 unmodified lines2930313233343536373839404142434450 unmodified lines959697989910031 unmodified lines1321331341351361371381391401411421431441451461 unmodified line14814915015115215336 unmodified lines19019119219319419519619719819920020117 unmodified lines21922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138235 unmodified lines41841942042142242342421 unmodified lines44644744844945045145228 unmodified linesfrom .run_handlers import create_run_eventdef attach_event_handlers(ui_components, demo):prefixes = ["imagegen", "txt2img", "img2img", "inpaint", "outpaint", "hires_fix"]active_prefixes = [p for p in prefixes if f'base_model_{p}' in ui_components]for prefix in active_prefixes:task_type = prefix if prefix != "imagegen" else Nonetype_comp = ui_components.get(f'type_{prefix}') # for unified imagegen UIarch_comp = ui_components.get(f'model_arch_{prefix}')cat_comp = ui_components.get(f'model_cat_{prefix}')model_comp = ui_components.get(f'base_model_{prefix}')aspect_ratio_comp = ui_components.get(f'aspect_ratio_{prefix}') or ui_components.get(f'{prefix}_aspect_ratio_dropdown')width_comp = ui_components.get(f'width_{prefix}') or ui_components.get(f'{prefix}_width')height_comp = ui_components.get(f'height_{prefix}') or ui_components.get(f'{prefix}_height')50 unmodified linesif arch_comp and cat_comp and model_comp:outputs = [model_comp, cat_comp]if aspect_ratio_comp: outputs.append(aspect_ratio_comp)outputs.extend(cn_types_list + cn_series_list + cn_filepaths_list)outputs.extend(anima_cn_types_list + anima_cn_series_list + anima_cn_filepaths_list)31 unmodified linesdiffsynth_cn_types_list, diffsynth_cn_series_list, diffsynth_cn_filepaths_list,krea2_cn_types_list, krea2_cn_series_list, krea2_cn_filepaths_list,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,ref_latent_accordion, hidream_o1_ref_accordion, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, krea2_identity_edit_acc=krea2_identity_edit_accordion, krea2_reference_edit_acc=krea2_reference_edit_accordion, qwen_image_edit_acc=qwen_image_edit_accordion, boogu_edit_acc=boogu_edit_accordion, ref_img_acc=ref_img_accordion,task_type=task_type, type_comp=type_comp)inputs = [arch_comp, cat_comp]if aspect_ratio_comp:inputs.append(aspect_ratio_comp)if type_comp:inputs.append(type_comp)arch_comp.change(fn=update_fn, inputs=inputs, outputs=outputs)cat_comp.change(fn=update_fn, inputs=inputs, outputs=outputs)1 unmodified lineoutputs2 = []if arch_comp: outputs2.append(arch_comp)if cat_comp: outputs2.append(cat_comp)if aspect_ratio_comp: outputs2.append(aspect_ratio_comp)outputs2.extend(cn_types_list + cn_series_list + cn_filepaths_list)outputs2.extend(anima_cn_types_list + anima_cn_series_list + anima_cn_filepaths_list)36 unmodified linesdiffsynth_cn_types_list, diffsynth_cn_series_list, diffsynth_cn_filepaths_list,krea2_cn_types_list, krea2_cn_series_list, krea2_cn_filepaths_list,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,ref_latent_accordion, hidream_o1_ref_accordion, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,pid_acc=pid_accordion, vae_acc=vae_accordion, joyai_ref_acc=joyai_ref_accordion, krea2_identity_edit_acc=krea2_identity_edit_accordion, krea2_reference_edit_acc=krea2_reference_edit_accordion, qwen_image_edit_acc=qwen_image_edit_accordion, boogu_edit_acc=boogu_edit_accordion, ref_img_acc=ref_img_accordion,task_type=task_type, type_comp=type_comp)if type_comp:inputs2.append(type_comp)model_comp.change(fn=change_fn, inputs=inputs2, outputs=outputs2)create_lora_event_handlers(prefix, ui_components)17 unmodified linescreate_reference_image_event_handlers(prefix, ui_components)create_run_event(prefix, task_type, ui_components)# Dynamic Type toggle event for unified imagegen UIif 'type_imagegen' in ui_components:def on_type_change(type_val, model_name):from core.settings import MODEL_TYPE_MAP, FEATURES_CONFIG, TASK_FEATURES_CONFIG, ARCHITECTURES_CONFIGis_txt2img = (type_val == "Txt2Img")is_img2img = (type_val == "Img2Img")is_inpaint = (type_val == "Inpaint")is_outpaint = (type_val == "Outpaint")is_hires_fix = (type_val == "Hires. Fix")denoise_val = 0.7 if is_img2img else (1.0 if is_inpaint else (0.55 if is_hires_fix else 0.7))run_text = "Run Inpaint" if is_inpaint else ("Run Outpaint" if is_outpaint else ("Run Hires. Fix" if is_hires_fix else "Run"))prompt_lines = 6 if is_inpaint else 3gallery_cols = 2 if is_txt2img else 1gallery_height = 627 if is_txt2img else (505 if is_img2img else (510 if is_inpaint else (685 if is_outpaint else 610)))updates = {ui_components['image_input_col_imagegen']: gr.update(visible=not is_txt2img),ui_components['input_image_imagegen']: gr.update(visible=(is_img2img or is_outpaint or is_hires_fix)),ui_components['inpaint_box_imagegen']: gr.update(visible=is_inpaint),ui_components['prompt_imagegen']: gr.update(lines=prompt_lines),ui_components['neg_prompt_imagegen']: gr.update(lines=prompt_lines),ui_components['aspect_ratio_row_imagegen']: gr.update(visible=is_txt2img),ui_components['width_height_row_imagegen']: gr.update(visible=is_txt2img),ui_components['denoise_row_imagegen']: gr.update(visible=(is_img2img or is_inpaint or is_hires_fix)),ui_components['denoise_imagegen']: gr.update(value=denoise_val),ui_components['grow_mask_by_imagegen']: gr.update(visible=is_inpaint),ui_components['outpaint_pads_col_imagegen']: gr.update(visible=is_outpaint),ui_components['hires_upscaler_row_imagegen']: gr.update(visible=is_hires_fix),ui_components['run_imagegen']: gr.update(value=run_text),ui_components['result_imagegen']: gr.update(columns=gallery_cols, height=gallery_height),}# Re-evaluate feature accordion visibility based on task + architecture intersectiontype_map = {'Txt2Img': 'txt2img', 'Img2Img': 'img2img', 'Inpaint': 'inpaint', 'Outpaint': 'outpaint', 'Hires. Fix': 'hires_fix'}current_task = type_map.get(type_val, 'txt2img')m_type = MODEL_TYPE_MAP.get(model_name, "SDXL") if model_name 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_enabled_chains = FEATURES_CONFIG.get(arch_model_type, {}).get('enabled_chains', [])task_enabled_chains = TASK_FEATURES_CONFIG.get(current_task, {}).get('enabled_chains', [])enabled_chains = [c for c in arch_enabled_chains if c in task_enabled_chains]prefix = 'imagegen'accordion_chain_map = {f'lora_accordion_{prefix}': 'lora',f'controlnet_accordion_{prefix}': 'controlnet',f'anima_controlnet_lllite_accordion_{prefix}': 'anima_controlnet_lllite',f'diffsynth_controlnet_accordion_{prefix}': 'diffsynth_controlnet',f'krea2_controlnet_accordion_{prefix}': 'krea2_controlnet',f'ipadapter_accordion_{prefix}': 'ipadapter',f'sd3_ipadapter_accordion_{prefix}': 'sd3_ipadapter',f'flux1_ipadapter_accordion_{prefix}': 'flux1_ipadapter',f'style_accordion_{prefix}': 'style',f'embedding_accordion_{prefix}': 'embedding',f'conditioning_accordion_{prefix}': 'conditioning',f'reference_latent_accordion_{prefix}': 'reference_latent',f'hidream_o1_reference_accordion_{prefix}': 'hidream_o1_reference',f'joyai_reference_accordion_{prefix}': 'joyai_image',f'krea2_identity_edit_accordion_{prefix}': 'krea2_identity_edit',f'krea2_reference_edit_accordion_{prefix}': 'krea2_style_reference',f'qwen_image_edit_accordion_{prefix}': 'qwen_image_edit',f'boogu_edit_accordion_{prefix}': 'boogu_image_edit',f'reference_image_accordion_{prefix}': 'reference_image',f'pid_accordion_{prefix}': 'pid',f'vae_accordion_{prefix}': 'vae',}for comp_key, chain_name in accordion_chain_map.items():comp = ui_components.get(comp_key)if comp:updates[comp] = gr.update(visible=(chain_name in enabled_chains))return updatestype_change_outputs = [ui_components['image_input_col_imagegen'],ui_components['input_image_imagegen'],ui_components['inpaint_box_imagegen'],ui_components['prompt_imagegen'],ui_components['neg_prompt_imagegen'],ui_components['aspect_ratio_row_imagegen'],ui_components['width_height_row_imagegen'],ui_components['denoise_row_imagegen'],ui_components['denoise_imagegen'],ui_components['grow_mask_by_imagegen'],ui_components['outpaint_pads_col_imagegen'],ui_components['hires_upscaler_row_imagegen'],ui_components['run_imagegen'],ui_components['result_imagegen'],]# Add feature accordion outputs for task-based visibilityaccordion_keys = ['lora_accordion_imagegen', 'controlnet_accordion_imagegen','anima_controlnet_lllite_accordion_imagegen', 'diffsynth_controlnet_accordion_imagegen','krea2_controlnet_accordion_imagegen', 'ipadapter_accordion_imagegen','sd3_ipadapter_accordion_imagegen', 'flux1_ipadapter_accordion_imagegen','style_accordion_imagegen', 'embedding_accordion_imagegen','conditioning_accordion_imagegen', 'reference_latent_accordion_imagegen','hidream_o1_reference_accordion_imagegen', 'joyai_reference_accordion_imagegen','krea2_identity_edit_accordion_imagegen', 'krea2_reference_edit_accordion_imagegen','qwen_image_edit_accordion_imagegen', 'boogu_edit_accordion_imagegen','reference_image_accordion_imagegen', 'pid_accordion_imagegen', 'vae_accordion_imagegen',]for key in accordion_keys:if key in ui_components:type_change_outputs.append(ui_components[key])ui_components['type_imagegen'].change(fn=on_type_change,inputs=[ui_components['type_imagegen'], ui_components['base_model_imagegen']],outputs=type_change_outputs,show_progress=False)# Fullscreen view toggle for imagegenif 'view_mode_imagegen' in ui_components:def toggle_imagegen_fullscreen_view(view_mode):is_fullscreen = (view_mode == "Fullscreen View")other_elements_visible = not is_fullscreeneditor_height = 800 if is_fullscreen else 272updates = {ui_components['type_imagegen']: gr.update(visible=other_elements_visible),ui_components['prompts_col_imagegen']: gr.update(visible=other_elements_visible),ui_components['params_and_gallery_row_imagegen']: gr.update(visible=other_elements_visible),ui_components['accordion_wrapper_imagegen']: gr.update(visible=other_elements_visible),ui_components['input_image_dict_imagegen']: gr.update(height=editor_height),}model_and_run_rows = ui_components.get('model_and_run_row_imagegen', [])for row in model_and_run_rows:updates[row] = gr.update(visible=other_elements_visible)return updatesoutput_components = [ui_components['type_imagegen']]model_and_run_rows = ui_components.get('model_and_run_row_imagegen', [])if isinstance(model_and_run_rows, list):output_components.extend(model_and_run_rows)else:output_components.append(model_and_run_rows)output_components.extend([ui_components['prompts_col_imagegen'],ui_components['params_and_gallery_row_imagegen'],ui_components['accordion_wrapper_imagegen'],ui_components['input_image_dict_imagegen']])ui_components['view_mode_imagegen'].change(fn=toggle_imagegen_fullscreen_view,inputs=[ui_components['view_mode_imagegen']],outputs=output_components,show_progress=False)if 'view_mode_inpaint' in ui_components:def toggle_inpaint_fullscreen_view(view_mode):is_fullscreen = (view_mode == "Fullscreen View")35 unmodified lines)all_load_outputs = []for prefix in prefixes:if f'controlnet_types_{prefix}' in ui_components:all_load_outputs.extend(ui_components[f'controlnet_types_{prefix}'])all_load_outputs.extend(ui_components[f'controlnet_series_{prefix}'])21 unmodified linesoutputs=all_load_outputs)for prefix in prefixes:aspect_ratio_dropdown = ui_components.get(f'aspect_ratio_{prefix}') or ui_components.get(f'{prefix}_aspect_ratio_dropdown')width_component = ui_components.get(f'width_{prefix}') or ui_components.get(f'{prefix}_width')height_component = ui_components.get(f'height_{prefix}') or ui_components.get(f'{prefix}_height')
12345675 unmodified lines131415161718192021222324252627282930313233343536373839404161 unmodified lines103104105106107108import gradio as grfrom core.generation_logic import generate_image_wrapperdef create_run_event(prefix: str, task_type: str, ui_components: dict):run_inputs_map = {'model_display_name': ui_components[f'base_model_{prefix}'],'positive_prompt': ui_components.get(f'prompt_{prefix}') or ui_components.get(f'{prefix}_positive_prompt'),5 unmodified lines'sampler': ui_components.get(f'sampler_{prefix}') or ui_components.get(f'{prefix}_sampler_name'),'scheduler': ui_components.get(f'scheduler_{prefix}') or ui_components.get(f'{prefix}_scheduler'),'zero_gpu_duration': ui_components.get(f'zero_gpu_{prefix}'),'guidance': ui_components.get(f'guidance_{prefix}'),'task_type': gr.State(task_type)}if ui_components.get(f'pid_settings_{prefix}'):run_inputs_map['pid_settings'] = ui_components[f'pid_settings_{prefix}']if task_type not in ['img2img', 'inpaint']:run_inputs_map.update({'width': ui_components.get(f'width_{prefix}') or ui_components.get(f'{prefix}_width'),'height': ui_components.get(f'height_{prefix}') or ui_components.get(f'{prefix}_height')})task_specific_map = {'img2img': {'img2img_image': f'input_image_{prefix}', 'img2img_denoise': f'denoise_{prefix}'},'inpaint': {'inpaint_image_dict': f'input_image_dict_{prefix}', 'grow_mask_by': f'grow_mask_by_{prefix}', 'inpaint_denoise': f'denoise_{prefix}'},'outpaint': {'outpaint_image': f'input_image_{prefix}', 'left': f'left_{prefix}', 'top': f'top_{prefix}', 'right': f'right_{prefix}', 'bottom': f'bottom_{prefix}', 'feathering': f'feathering_{prefix}'},'hires_fix': {'hires_image': f'input_image_{prefix}', 'hires_upscaler': f'hires_upscaler_{prefix}', 'hires_scale_by': f'hires_scale_by_{prefix}', 'hires_denoise': f'denoise_{prefix}'}}if task_type in task_specific_map:for key, comp_name in task_specific_map[task_type].items():if comp_name in ui_components:run_inputs_map[key] = ui_components[comp_name]lora_data_components = ui_components.get(f'all_lora_components_flat_{prefix}', [])controlnet_data_components = ui_components.get(f'all_controlnet_components_flat_{prefix}', [])61 unmodified linesassign_chain_data('boogu_edit_data', boogu_edit_data_components)assign_chain_data('reference_image_data', reference_image_data_components)return ui_dictrun_btn = ui_components.get(f'run_{prefix}') or ui_components.get(f'{prefix}_run_button')1234567891011121314151617181920215 unmodified lines272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727361 unmodified lines135136137138139140141142143import gradio as grfrom core.generation_logic import generate_image_wrapperTYPE_TASK_MAP = {'Txt2Img': 'txt2img','Img2Img': 'img2img','Inpaint': 'inpaint','Outpaint': 'outpaint','Hires. Fix': 'hires_fix'}def create_run_event(prefix: str, task_type: str = None, ui_components: dict = None):if ui_components is None and isinstance(task_type, dict):ui_components = task_typetask_type = Nonetype_comp = ui_components.get(f'type_{prefix}')run_inputs_map = {'model_display_name': ui_components[f'base_model_{prefix}'],'positive_prompt': ui_components.get(f'prompt_{prefix}') or ui_components.get(f'{prefix}_positive_prompt'),5 unmodified lines'sampler': ui_components.get(f'sampler_{prefix}') or ui_components.get(f'{prefix}_sampler_name'),'scheduler': ui_components.get(f'scheduler_{prefix}') or ui_components.get(f'{prefix}_scheduler'),'zero_gpu_duration': ui_components.get(f'zero_gpu_{prefix}'),}if type_comp:run_inputs_map['ui_type'] = type_compelif task_type:run_inputs_map['task_type'] = gr.State(task_type)if ui_components.get(f'pid_settings_{prefix}'):run_inputs_map['pid_settings'] = ui_components[f'pid_settings_{prefix}']# Generic / Txt2Img inputsif ui_components.get(f'width_{prefix}') or ui_components.get(f'{prefix}_width'):run_inputs_map['width'] = ui_components.get(f'width_{prefix}') or ui_components.get(f'{prefix}_width')if ui_components.get(f'height_{prefix}') or ui_components.get(f'{prefix}_height'):run_inputs_map['height'] = ui_components.get(f'height_{prefix}') or ui_components.get(f'{prefix}_height')# Task specific inputsif ui_components.get(f'input_image_{prefix}'):run_inputs_map['img2img_image'] = ui_components[f'input_image_{prefix}']run_inputs_map['outpaint_image'] = ui_components[f'input_image_{prefix}']run_inputs_map['hires_image'] = ui_components[f'input_image_{prefix}']if ui_components.get(f'denoise_{prefix}'):run_inputs_map['denoise'] = ui_components[f'denoise_{prefix}']run_inputs_map['img2img_denoise'] = ui_components[f'denoise_{prefix}']run_inputs_map['inpaint_denoise'] = ui_components[f'denoise_{prefix}']run_inputs_map['hires_denoise'] = ui_components[f'denoise_{prefix}']if ui_components.get(f'input_image_dict_{prefix}'):run_inputs_map['inpaint_image_dict'] = ui_components[f'input_image_dict_{prefix}']if ui_components.get(f'grow_mask_by_{prefix}'):run_inputs_map['grow_mask_by'] = ui_components[f'grow_mask_by_{prefix}']if ui_components.get(f'left_{prefix}'): run_inputs_map['left'] = ui_components[f'left_{prefix}']if ui_components.get(f'right_{prefix}'): run_inputs_map['right'] = ui_components[f'right_{prefix}']if ui_components.get(f'top_{prefix}'): run_inputs_map['top'] = ui_components[f'top_{prefix}']if ui_components.get(f'bottom_{prefix}'): run_inputs_map['bottom'] = ui_components[f'bottom_{prefix}']if ui_components.get(f'feathering_{prefix}'): run_inputs_map['feathering'] = ui_components[f'feathering_{prefix}']if ui_components.get(f'hires_upscaler_{prefix}'): run_inputs_map['hires_upscaler'] = ui_components[f'hires_upscaler_{prefix}']if ui_components.get(f'hires_scale_by_{prefix}'): run_inputs_map['hires_scale_by'] = ui_components[f'hires_scale_by_{prefix}']lora_data_components = ui_components.get(f'all_lora_components_flat_{prefix}', [])controlnet_data_components = ui_components.get(f'all_controlnet_components_flat_{prefix}', [])61 unmodified linesassign_chain_data('boogu_edit_data', boogu_edit_data_components)assign_chain_data('reference_image_data', reference_image_data_components)if 'ui_type' in ui_dict:ui_dict['task_type'] = TYPE_TASK_MAP.get(ui_dict['ui_type'], 'txt2img')return ui_dictrun_btn = ui_components.get(f'run_{prefix}') or ui_components.get(f'{prefix}_run_button')
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125import gradio as grfrom core.settings import MODEL_MAP_CHECKPOINT, MODEL_DEFAULTS_CONFIGfrom .ui_components import (create_base_parameter_ui, create_lora_settings_ui,create_controlnet_ui, create_anima_controlnet_lllite_ui, create_diffsynth_controlnet_ui, create_krea2_controlnet_ui, create_ipadapter_ui, create_embedding_ui,create_conditioning_ui, create_vae_override_ui,create_model_architecture_filter_ui, create_category_filter_ui,create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui, create_krea2_reference_edit_ui, create_qwen_image_edit_ui, create_boogu_edit_ui)default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})DEFAULT_STEPS = default_vals.get('steps', 20)DEFAULT_CFG = default_vals.get('cfg', 5.0)DEFAULT_SAMPLER = default_vals.get('sampler_name', 'euler')DEFAULT_SCHEDULER = default_vals.get('scheduler', 'simple')DEFAULT_POS_PROMPT = default_vals.get('positive_prompt', '')DEFAULT_NEG_PROMPT = default_vals.get('negative_prompt', '')def create_ui():prefix = "inpaint"components = {}with gr.Column():with gr.Row() as arch_row:components.update(create_model_architecture_filter_ui(prefix))with gr.Row() as model_and_run_row:components.update(create_category_filter_ui(prefix))components[f'base_model_{prefix}'] = gr.Dropdown(label="Base Model",choices=list(MODEL_MAP_CHECKPOINT.keys()),value=list(MODEL_MAP_CHECKPOINT.keys())[0],scale=3,allow_custom_value=True)with gr.Column(scale=1):components[f'run_{prefix}'] = gr.Button("Run Inpaint", variant="primary")components[f'model_and_run_row_{prefix}'] = [arch_row, model_and_run_row]with gr.Row() as main_content_row:with gr.Column(scale=1) as editor_column:components[f'view_mode_{prefix}'] = gr.Radio(["Normal View", "Fullscreen View"],label="Editor View",value="Normal View",interactive=True)components[f'input_image_dict_{prefix}'] = gr.ImageEditor(type="pil",label="Image & Mask (No Scaling)",height=272)components[f'editor_column_{prefix}'] = editor_columnwith gr.Column(scale=2) as prompts_column:components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=6, value=DEFAULT_POS_PROMPT)components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=6, value=DEFAULT_NEG_PROMPT)components[f'prompts_column_{prefix}'] = prompts_columnwith gr.Row() as params_and_gallery_row:with gr.Column(scale=1):from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICESwith gr.Row():components[f'denoise_{prefix}'] = gr.Slider(label="Denoise", minimum=0.0, maximum=1.0, step=0.05, value=1.0)components[f'grow_mask_by_{prefix}'] = gr.Slider(label="Grow Mask By", minimum=0, maximum=64, step=1, value=6)with gr.Row():components[f'sampler_{prefix}'] = gr.Dropdown(label="Sampler",choices=SAMPLER_CHOICES,value=DEFAULT_SAMPLER if DEFAULT_SAMPLER in SAMPLER_CHOICES else (SAMPLER_CHOICES[0] if SAMPLER_CHOICES else 'euler'))components[f'scheduler_{prefix}'] = gr.Dropdown(label="Scheduler",choices=SCHEDULER_CHOICES,value=DEFAULT_SCHEDULER if DEFAULT_SCHEDULER in SCHEDULER_CHOICES else (SCHEDULER_CHOICES[0] if SCHEDULER_CHOICES else 'simple'))with gr.Row():components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=DEFAULT_STEPS)components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=DEFAULT_CFG)with gr.Row():components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)with gr.Row():components[f'guidance_{prefix}'] = gr.Slider(label="Guidance (FLUX)", minimum=1.0, maximum=10.0, step=0.1, value=3.5, visible=False, interactive=True)components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=None, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU.")components[f'width_{prefix}'] = gr.State(value=512)components[f'height_{prefix}'] = gr.State(value=512)with gr.Column(scale=1):components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=510)components[f'params_and_gallery_row_{prefix}'] = params_and_gallery_rowwith gr.Column() as accordion_wrapper:components.update(create_lora_settings_ui(prefix))components.update(create_controlnet_ui(prefix))components.update(create_anima_controlnet_lllite_ui(prefix))components.update(create_diffsynth_controlnet_ui(prefix))components.update(create_krea2_controlnet_ui(prefix))components.update(create_ipadapter_ui(prefix))components.update(create_flux1_ipadapter_ui(prefix))components.update(create_sd3_ipadapter_ui(prefix))components.update(create_style_ui(prefix))components.update(create_embedding_ui(prefix))components.update(create_conditioning_ui(prefix))components.update(create_reference_latent_ui(prefix))components.update(create_hidream_o1_reference_ui(prefix))components.update(create_joyai_reference_ui(prefix))components.update(create_krea2_identity_edit_ui(prefix))components.update(create_krea2_reference_edit_ui(prefix))components.update(create_qwen_image_edit_ui(prefix))components.update(create_boogu_edit_ui(prefix))components.update(create_reference_image_ui(prefix))components.update(create_vae_override_ui(prefix))components[f'accordion_wrapper_{prefix}'] = accordion_wrapperreturn components123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197import gradio as grfrom core.settings import MODEL_MAP_CHECKPOINT, MODEL_DEFAULTS_CONFIGfrom comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICESfrom .shared.ui_components import (RESOLUTION_MAP,create_lora_settings_ui,create_controlnet_ui, create_anima_controlnet_lllite_ui, create_diffsynth_controlnet_ui, create_krea2_controlnet_ui, create_ipadapter_ui, create_embedding_ui,create_conditioning_ui, create_vae_override_ui,create_model_architecture_filter_ui, create_category_filter_ui,create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui, create_krea2_reference_edit_ui, create_qwen_image_edit_ui, create_boogu_edit_ui,create_pid_ui)default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})DEFAULT_STEPS = default_vals.get('steps', 20)DEFAULT_CFG = default_vals.get('cfg', 5.0)DEFAULT_SAMPLER = default_vals.get('sampler_name', 'euler')DEFAULT_SCHEDULER = default_vals.get('scheduler', 'simple')DEFAULT_POS_PROMPT = default_vals.get('positive_prompt', '')DEFAULT_NEG_PROMPT = default_vals.get('negative_prompt', '')TYPE_CHOICES = ["Txt2Img", "Img2Img", "Inpaint", "Outpaint", "Hires. Fix"]def create_ui():"""Creates the unified UI components for ImageGen."""prefix = "imagegen"components = {}with gr.Column():components[f'type_{prefix}'] = gr.Radio(choices=TYPE_CHOICES,value="Txt2Img",label="Task",interactive=True)with gr.Row() as arch_row:components.update(create_model_architecture_filter_ui(prefix))components[f'arch_row_{prefix}'] = arch_rowwith gr.Row() as model_and_run_row:components.update(create_category_filter_ui(prefix))components[f'base_model_{prefix}'] = gr.Dropdown(label="Base Model",choices=list(MODEL_MAP_CHECKPOINT.keys()),value=list(MODEL_MAP_CHECKPOINT.keys())[0],scale=3,allow_custom_value=True)with gr.Column(scale=1):components[f'run_{prefix}'] = gr.Button("Run", variant="primary")components[f'model_and_run_row_{prefix}'] = [arch_row, model_and_run_row]with gr.Row() as inputs_prompts_row:with gr.Column(scale=1, visible=False) as image_input_col:components[f'input_image_{prefix}'] = gr.Image(type="pil",label="Input Image (No Scaling)",height=255,visible=False)with gr.Column(visible=False) as inpaint_box:components[f'view_mode_{prefix}'] = gr.Radio(["Normal View", "Fullscreen View"],label="Editor View",value="Normal View",interactive=True)components[f'input_image_dict_{prefix}'] = gr.ImageEditor(type="pil",label="Image & Mask (No Scaling)",height=272)components[f'inpaint_box_{prefix}'] = inpaint_boxcomponents[f'image_input_col_{prefix}'] = image_input_colwith gr.Column(scale=2) as prompts_col:components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3, value=DEFAULT_POS_PROMPT)components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3, value=DEFAULT_NEG_PROMPT)components[f'prompts_col_{prefix}'] = prompts_colcomponents[f'inputs_prompts_row_{prefix}'] = inputs_prompts_rowwith gr.Row() as params_and_gallery_row:with gr.Column(scale=1) as params_col:# Txt2Img parameterswith gr.Row(visible=True) as aspect_ratio_row:components[f'aspect_ratio_{prefix}'] = gr.Dropdown(label="Aspect Ratio",choices=list(RESOLUTION_MAP.get('sdxl', {}).keys()),value="1:1 (Square)",interactive=True,allow_custom_value=True)components[f'aspect_ratio_row_{prefix}'] = aspect_ratio_rowwith gr.Row(visible=True) as width_height_row:components[f'width_{prefix}'] = gr.Number(label="Width", value=1024, interactive=True)components[f'height_{prefix}'] = gr.Number(label="Height", value=1024, interactive=True)components[f'width_height_row_{prefix}'] = width_height_row# Img2Img / Inpaint / Hires. Fix Denoise parameter & Inpaint Grow Mask By parameterwith gr.Row(visible=False) as denoise_row:components[f'denoise_{prefix}'] = gr.Slider(label="Denoise Strength",minimum=0.0,maximum=1.0,step=0.01,value=0.7)components[f'grow_mask_by_{prefix}'] = gr.Slider(label="Grow Mask By",minimum=0,maximum=64,step=1,value=6,visible=False)components[f'denoise_row_{prefix}'] = denoise_row# Outpaint Pad & Feathering parameterswith gr.Column(visible=False) as outpaint_pads_col:with gr.Row():components[f'left_{prefix}'] = gr.Slider(label="Pad Left", minimum=0, maximum=512, step=64, value=64)components[f'right_{prefix}'] = gr.Slider(label="Pad Right", minimum=0, maximum=512, step=64, value=64)with gr.Row():components[f'top_{prefix}'] = gr.Slider(label="Pad Top", minimum=0, maximum=512, step=64, value=64)components[f'bottom_{prefix}'] = gr.Slider(label="Pad Bottom", minimum=0, maximum=512, step=64, value=64)components[f'feathering_{prefix}'] = gr.Slider(label="Feathering / Grow Mask", minimum=0, maximum=100, step=1, value=10)components[f'outpaint_pads_col_{prefix}'] = outpaint_pads_col# Hires. Fix Upscaler parameterswith gr.Row(visible=False) as hires_upscaler_row:components[f'hires_upscaler_{prefix}'] = gr.Dropdown(label="Upscaler",choices=["nearest-exact", "bilinear", "area", "bicubic", "bislerp"],value="nearest-exact")components[f'hires_scale_by_{prefix}'] = gr.Slider(label="Upscale by",minimum=1.0,maximum=4.0,step=0.1,value=1.5)components[f'hires_upscaler_row_{prefix}'] = hires_upscaler_row# Common parameterswith gr.Row():components[f'sampler_{prefix}'] = gr.Dropdown(label="Sampler",choices=SAMPLER_CHOICES,value=DEFAULT_SAMPLER if DEFAULT_SAMPLER in SAMPLER_CHOICES else (SAMPLER_CHOICES[0] if SAMPLER_CHOICES else 'euler'))components[f'scheduler_{prefix}'] = gr.Dropdown(label="Scheduler",choices=SCHEDULER_CHOICES,value=DEFAULT_SCHEDULER if DEFAULT_SCHEDULER in SCHEDULER_CHOICES else (SCHEDULER_CHOICES[0] if SCHEDULER_CHOICES else 'simple'))with gr.Row():components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=DEFAULT_STEPS)components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=DEFAULT_CFG)with gr.Row():components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)with gr.Row():components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=60, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU. Longer jobs may need more time.")with gr.Column(scale=1):components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=2, object_fit="contain", height=627)components[f'params_and_gallery_row_{prefix}'] = params_and_gallery_rowwith gr.Column() as accordion_wrapper:components.update(create_lora_settings_ui(prefix))components.update(create_controlnet_ui(prefix))components.update(create_anima_controlnet_lllite_ui(prefix))components.update(create_diffsynth_controlnet_ui(prefix))components.update(create_krea2_controlnet_ui(prefix))components.update(create_ipadapter_ui(prefix))components.update(create_flux1_ipadapter_ui(prefix))components.update(create_sd3_ipadapter_ui(prefix))components.update(create_embedding_ui(prefix))components.update(create_style_ui(prefix))components.update(create_conditioning_ui(prefix))components.update(create_reference_latent_ui(prefix))components.update(create_hidream_o1_reference_ui(prefix))components.update(create_joyai_reference_ui(prefix))components.update(create_krea2_identity_edit_ui(prefix))components.update(create_krea2_reference_edit_ui(prefix))components.update(create_qwen_image_edit_ui(prefix))components.update(create_boogu_edit_ui(prefix))components.update(create_reference_image_ui(prefix))components.update(create_vae_override_ui(prefix))components.update(create_pid_ui(prefix))components[f'accordion_wrapper_{prefix}'] = accordion_wrapperreturn components
1 unmodified line23456785 unmodified lines141516171819202122232425262728293031323334353637383914 unmodified lines54555657581 unmodified lineimport gradio as grfrom core.settings import *from .shared import txt2img_ui, img2img_ui, inpaint_ui, outpaint_ui, hires_fix_uiMAX_DYNAMIC_CONTROLS = 105 unmodified linesgr.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. Support [High-Level MCP](https://rioshiina-imagegen.hf.space/gradio_api/mcp/) 🤖")with gr.Tabs(elem_id="tabs_container") as tabs:with gr.TabItem("Txt2Img", id=0):ui_components.update(txt2img_ui.create_ui())with gr.TabItem("Img2Img", id=1):ui_components.update(img2img_ui.create_ui())with gr.TabItem("Inpaint", id=2):ui_components.update(inpaint_ui.create_ui())with gr.TabItem("Outpaint", id=3):ui_components.update(outpaint_ui.create_ui())with gr.TabItem("Hires. Fix", id=4):ui_components.update(hires_fix_ui.create_ui())ui_components["tabs"] = tabsui_components["image_gen_tabs"] = tabsgr.Markdown("<div style='text-align: center; margin-top: 20px;'>Made by RioShiina with ❤️<br><a href='https://github.com/RioShiina47' target='_blank'>GitHub</a> | <a href='https://huggingface.co/RioShiina' target='_blank'>Hugging Face</a> | <a href='https://civitai.com/user/RioShiina' target='_blank'>Civitai</a></div>")event_handler_function(ui_components, demo)14 unmodified linesfor fn in demo.fns.values():if getattr(fn, "api_name", None) not in high_level_names:fn.show_api = Falsereturn demo1 unmodified line23456785 unmodified lines14151617181920212214 unmodified lines3738394041421 unmodified lineimport gradio as grfrom core.settings import *from .imagegen_ui import create_ui as create_imagegen_uiMAX_DYNAMIC_CONTROLS = 105 unmodified linesgr.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. Support [High-Level MCP](https://rioshiina-imagegen.hf.space/gradio_api/mcp/) 🤖")ui_components.update(create_imagegen_ui())gr.Markdown("<div style='text-align: left; margin-top: 20px;'>Made by RioShiina with ❤️<br><a href='https://github.com/RioShiina47' target='_blank'>GitHub</a> | <a href='https://huggingface.co/RioShiina' target='_blank'>Hugging Face</a> | <a href='https://civitai.com/user/RioShiina' target='_blank'>Civitai</a></div>")event_handler_function(ui_components, demo)14 unmodified linesfor fn in demo.fns.values():if getattr(fn, "api_name", None) not in high_level_names:fn.show_api = Falsefn.api_name = Falsereturn demo
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111import gradio as gr
from core.settings import MODEL_MAP_CHECKPOINT, MODEL_DEFAULTS_CONFIG
from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICES
from .ui_components import (
create_lora_settings_ui,
create_controlnet_ui, create_anima_controlnet_lllite_ui, create_diffsynth_controlnet_ui, create_krea2_controlnet_ui, create_ipadapter_ui, create_embedding_ui,
create_conditioning_ui, create_vae_override_ui,
create_model_architecture_filter_ui, create_category_filter_ui,
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui, create_krea2_reference_edit_ui, create_qwen_image_edit_ui, create_boogu_edit_ui
)
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
DEFAULT_STEPS = default_vals.get('steps', 20)
DEFAULT_CFG = default_vals.get('cfg', 5.0)
DEFAULT_SAMPLER = default_vals.get('sampler_name', 'euler')
DEFAULT_SCHEDULER = default_vals.get('scheduler', 'simple')
DEFAULT_POS_PROMPT = default_vals.get('positive_prompt', '')
DEFAULT_NEG_PROMPT = default_vals.get('negative_prompt', '')
def create_ui():
prefix = "hires_fix"
components = {}
with gr.Column():
components.update(create_model_architecture_filter_ui(prefix))
with gr.Row():
components.update(create_category_filter_ui(prefix))
components[f'base_model_{prefix}'] = gr.Dropdown(
label="Base Model",
choices=list(MODEL_MAP_CHECKPOINT.keys()),
value=list(MODEL_MAP_CHECKPOINT.keys())[0],
scale=3,
allow_custom_value=True
)
with gr.Column(scale=1):
components[f'run_{prefix}'] = gr.Button("Run Hires. Fix", variant="primary")
with gr.Row():
with gr.Column(scale=1):
components[f'input_image_{prefix}'] = gr.Image(type="pil", label="Input Image (No Scaling)", height=255)
with gr.Column(scale=2):
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3, value=DEFAULT_POS_PROMPT)
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3, value=DEFAULT_NEG_PROMPT)
with gr.Row():
with gr.Column(scale=1):
with gr.Row():
components[f'hires_upscaler_{prefix}'] = gr.Dropdown(
label="Upscaler",
choices=["nearest-exact", "bilinear", "area", "bicubic", "bislerp"],
value="nearest-exact"
)
components[f'hires_scale_by_{prefix}'] = gr.Slider(
label="Upscale by", minimum=1.0, maximum=4.0, step=0.1, value=1.5
)
with gr.Row():
components[f'denoise_{prefix}'] = gr.Slider(label="Denoise Strength", minimum=0.0, maximum=1.0, step=0.01, value=0.55)
with gr.Row():
components[f'sampler_{prefix}'] = gr.Dropdown(
label="Sampler",
choices=SAMPLER_CHOICES,
value=DEFAULT_SAMPLER if DEFAULT_SAMPLER in SAMPLER_CHOICES else (SAMPLER_CHOICES[0] if SAMPLER_CHOICES else 'euler')
)
components[f'scheduler_{prefix}'] = gr.Dropdown(
label="Scheduler",
choices=SCHEDULER_CHOICES,
value=DEFAULT_SCHEDULER if DEFAULT_SCHEDULER in SCHEDULER_CHOICES else (SCHEDULER_CHOICES[0] if SCHEDULER_CHOICES else 'simple')
)
with gr.Row():
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=DEFAULT_STEPS)
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=DEFAULT_CFG)
with gr.Row():
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
with gr.Row():
components[f'guidance_{prefix}'] = gr.Slider(label="Guidance (FLUX)", minimum=1.0, maximum=10.0, step=0.1, value=3.5, visible=False, interactive=True)
components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=None, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU.")
components[f'width_{prefix}'] = gr.State(value=512)
components[f'height_{prefix}'] = gr.State(value=512)
with gr.Column(scale=1):
components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=610)
components.update(create_lora_settings_ui(prefix))
components.update(create_controlnet_ui(prefix))
components.update(create_anima_controlnet_lllite_ui(prefix))
components.update(create_diffsynth_controlnet_ui(prefix))
components.update(create_krea2_controlnet_ui(prefix))
components.update(create_ipadapter_ui(prefix))
components.update(create_flux1_ipadapter_ui(prefix))
components.update(create_sd3_ipadapter_ui(prefix))
components.update(create_style_ui(prefix))
components.update(create_embedding_ui(prefix))
components.update(create_conditioning_ui(prefix))
components.update(create_reference_latent_ui(prefix))
components.update(create_hidream_o1_reference_ui(prefix))
components.update(create_joyai_reference_ui(prefix))
components.update(create_krea2_identity_edit_ui(prefix))
components.update(create_krea2_reference_edit_ui(prefix))
components.update(create_qwen_image_edit_ui(prefix))
components.update(create_boogu_edit_ui(prefix))
components.update(create_reference_image_ui(prefix))
components.update(create_vae_override_ui(prefix))
return components1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192import gradio as gr
from core.settings import MODEL_MAP_CHECKPOINT, MODEL_DEFAULTS_CONFIG
from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICES
from .ui_components import (
create_lora_settings_ui,
create_controlnet_ui, create_anima_controlnet_lllite_ui, create_diffsynth_controlnet_ui, create_krea2_controlnet_ui, create_ipadapter_ui, create_embedding_ui,
create_conditioning_ui, create_vae_override_ui,
create_model_architecture_filter_ui, create_category_filter_ui,
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui, create_krea2_reference_edit_ui, create_qwen_image_edit_ui, create_boogu_edit_ui
)
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
DEFAULT_STEPS = default_vals.get('steps', 20)
DEFAULT_CFG = default_vals.get('cfg', 5.0)
DEFAULT_SAMPLER = default_vals.get('sampler_name', 'euler')
DEFAULT_SCHEDULER = default_vals.get('scheduler', 'simple')
DEFAULT_POS_PROMPT = default_vals.get('positive_prompt', '')
DEFAULT_NEG_PROMPT = default_vals.get('negative_prompt', '')
def create_ui():
prefix = "img2img"
components = {}
with gr.Column():
components.update(create_model_architecture_filter_ui(prefix))
with gr.Row():
components.update(create_category_filter_ui(prefix))
components[f'base_model_{prefix}'] = gr.Dropdown(label="Base Model", choices=list(MODEL_MAP_CHECKPOINT.keys()), value=list(MODEL_MAP_CHECKPOINT.keys())[0], scale=3, allow_custom_value=True)
with gr.Column(scale=1):
components[f'run_{prefix}'] = gr.Button("Run", variant="primary")
with gr.Row():
with gr.Column(scale=1):
components[f'input_image_{prefix}'] = gr.Image(type="pil", label="Input Image (No Scaling)", height=255)
with gr.Column(scale=2):
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3, value=DEFAULT_POS_PROMPT)
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3, value=DEFAULT_NEG_PROMPT)
with gr.Row():
with gr.Column(scale=1):
components[f'denoise_{prefix}'] = gr.Slider(label="Denoise Strength", minimum=0.0, maximum=1.0, step=0.01, value=0.7)
with gr.Row():
components[f'sampler_{prefix}'] = gr.Dropdown(
label="Sampler",
choices=SAMPLER_CHOICES,
value=DEFAULT_SAMPLER if DEFAULT_SAMPLER in SAMPLER_CHOICES else (SAMPLER_CHOICES[0] if SAMPLER_CHOICES else 'euler')
)
components[f'scheduler_{prefix}'] = gr.Dropdown(
label="Scheduler",
choices=SCHEDULER_CHOICES,
value=DEFAULT_SCHEDULER if DEFAULT_SCHEDULER in SCHEDULER_CHOICES else (SCHEDULER_CHOICES[0] if SCHEDULER_CHOICES else 'simple')
)
with gr.Row():
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=DEFAULT_STEPS)
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=DEFAULT_CFG)
with gr.Row():
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
with gr.Row():
components[f'guidance_{prefix}'] = gr.Slider(label="Guidance (FLUX)", minimum=1.0, maximum=10.0, step=0.1, value=3.5, visible=False, interactive=True)
components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=None, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU. Longer jobs may need more time.")
with gr.Column(scale=1):
components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=505)
components.update(create_lora_settings_ui(prefix))
components.update(create_controlnet_ui(prefix))
components.update(create_anima_controlnet_lllite_ui(prefix))
components.update(create_diffsynth_controlnet_ui(prefix))
components.update(create_krea2_controlnet_ui(prefix))
components.update(create_ipadapter_ui(prefix))
components.update(create_flux1_ipadapter_ui(prefix))
components.update(create_sd3_ipadapter_ui(prefix))
components.update(create_embedding_ui(prefix))
components.update(create_style_ui(prefix))
components.update(create_conditioning_ui(prefix))
components.update(create_reference_latent_ui(prefix))
components.update(create_hidream_o1_reference_ui(prefix))
components.update(create_joyai_reference_ui(prefix))
components.update(create_krea2_identity_edit_ui(prefix))
components.update(create_krea2_reference_edit_ui(prefix))
components.update(create_qwen_image_edit_ui(prefix))
components.update(create_boogu_edit_ui(prefix))
components.update(create_reference_image_ui(prefix))
components.update(create_vae_override_ui(prefix))
return components123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107import gradio as gr
from core.settings import MODEL_MAP_CHECKPOINT, MODEL_DEFAULTS_CONFIG
from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICES
from .ui_components import (
create_lora_settings_ui,
create_controlnet_ui, create_anima_controlnet_lllite_ui, create_diffsynth_controlnet_ui, create_krea2_controlnet_ui, create_ipadapter_ui, create_embedding_ui,
create_conditioning_ui, create_vae_override_ui,
create_model_architecture_filter_ui, create_category_filter_ui,
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui, create_krea2_reference_edit_ui, create_qwen_image_edit_ui, create_boogu_edit_ui
)
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
DEFAULT_STEPS = default_vals.get('steps', 20)
DEFAULT_CFG = default_vals.get('cfg', 5.0)
DEFAULT_SAMPLER = default_vals.get('sampler_name', 'euler')
DEFAULT_SCHEDULER = default_vals.get('scheduler', 'simple')
DEFAULT_POS_PROMPT = default_vals.get('positive_prompt', '')
DEFAULT_NEG_PROMPT = default_vals.get('negative_prompt', '')
def create_ui():
prefix = "outpaint"
components = {}
with gr.Column():
components.update(create_model_architecture_filter_ui(prefix))
with gr.Row():
components.update(create_category_filter_ui(prefix))
components[f'base_model_{prefix}'] = gr.Dropdown(
label="Base Model",
choices=list(MODEL_MAP_CHECKPOINT.keys()),
value=list(MODEL_MAP_CHECKPOINT.keys())[0],
scale=3,
allow_custom_value=True
)
with gr.Column(scale=1):
components[f'run_{prefix}'] = gr.Button("Run Outpaint", variant="primary")
with gr.Row():
with gr.Column(scale=1):
components[f'input_image_{prefix}'] = gr.Image(type="pil", label="Input Image (No Scaling)", height=255)
with gr.Column(scale=2):
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3, value=DEFAULT_POS_PROMPT)
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3, value=DEFAULT_NEG_PROMPT)
with gr.Row():
with gr.Column(scale=1):
with gr.Row():
components[f'left_{prefix}'] = gr.Slider(label="Pad Left", minimum=0, maximum=512, step=64, value=64)
components[f'right_{prefix}'] = gr.Slider(label="Pad Right", minimum=0, maximum=512, step=64, value=64)
with gr.Row():
components[f'top_{prefix}'] = gr.Slider(label="Pad Top", minimum=0, maximum=512, step=64, value=64)
components[f'bottom_{prefix}'] = gr.Slider(label="Pad Bottom", minimum=0, maximum=512, step=64, value=64)
components[f'feathering_{prefix}'] = gr.Slider(label="Feathering / Grow Mask", minimum=0, maximum=100, step=1, value=10)
with gr.Row():
components[f'sampler_{prefix}'] = gr.Dropdown(
label="Sampler",
choices=SAMPLER_CHOICES,
value=DEFAULT_SAMPLER if DEFAULT_SAMPLER in SAMPLER_CHOICES else (SAMPLER_CHOICES[0] if SAMPLER_CHOICES else 'euler')
)
components[f'scheduler_{prefix}'] = gr.Dropdown(
label="Scheduler",
choices=SCHEDULER_CHOICES,
value=DEFAULT_SCHEDULER if DEFAULT_SCHEDULER in SCHEDULER_CHOICES else (SCHEDULER_CHOICES[0] if SCHEDULER_CHOICES else 'simple')
)
with gr.Row():
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=DEFAULT_STEPS)
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=DEFAULT_CFG)
with gr.Row():
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
with gr.Row():
components[f'guidance_{prefix}'] = gr.Slider(label="Guidance (FLUX)", minimum=1.0, maximum=10.0, step=0.1, value=3.5, visible=False, interactive=True)
components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=None, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU.")
components[f'width_{prefix}'] = gr.State(value=512)
components[f'height_{prefix}'] = gr.State(value=512)
with gr.Column(scale=1):
components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=685)
components.update(create_lora_settings_ui(prefix))
components.update(create_controlnet_ui(prefix))
components.update(create_anima_controlnet_lllite_ui(prefix))
components.update(create_diffsynth_controlnet_ui(prefix))
components.update(create_krea2_controlnet_ui(prefix))
components.update(create_ipadapter_ui(prefix))
components.update(create_flux1_ipadapter_ui(prefix))
components.update(create_sd3_ipadapter_ui(prefix))
components.update(create_style_ui(prefix))
components.update(create_embedding_ui(prefix))
components.update(create_conditioning_ui(prefix))
components.update(create_reference_latent_ui(prefix))
components.update(create_hidream_o1_reference_ui(prefix))
components.update(create_joyai_reference_ui(prefix))
components.update(create_krea2_identity_edit_ui(prefix))
components.update(create_krea2_reference_edit_ui(prefix))
components.update(create_qwen_image_edit_ui(prefix))
components.update(create_boogu_edit_ui(prefix))
components.update(create_reference_image_ui(prefix))
components.update(create_vae_override_ui(prefix))
return components123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566import gradio as gr
from core.settings import MODEL_MAP_CHECKPOINT
from .ui_components import (
create_base_parameter_ui, create_lora_settings_ui,
create_controlnet_ui, create_anima_controlnet_lllite_ui, create_diffsynth_controlnet_ui, create_krea2_controlnet_ui, create_ipadapter_ui, create_embedding_ui,
create_conditioning_ui, create_vae_override_ui,
create_model_architecture_filter_ui, create_category_filter_ui,
create_sd3_ipadapter_ui, create_flux1_ipadapter_ui, create_style_ui,
create_reference_latent_ui, create_hidream_o1_reference_ui, create_joyai_reference_ui, create_reference_image_ui, create_krea2_identity_edit_ui, create_krea2_reference_edit_ui, create_qwen_image_edit_ui, create_boogu_edit_ui,
create_pid_ui
)
def create_ui():
"""Creates the UI components for the Txt2Img tab."""
prefix = "txt2img"
components = {}
with gr.Column():
components.update(create_model_architecture_filter_ui(prefix))
with gr.Row():
components.update(create_category_filter_ui(prefix))
components[f'base_model_{prefix}'] = gr.Dropdown(
label="Base Model",
choices=list(MODEL_MAP_CHECKPOINT.keys()),
value=list(MODEL_MAP_CHECKPOINT.keys())[0],
scale=3,
allow_custom_value=True
)
with gr.Column(scale=1):
components[f'run_{prefix}'] = gr.Button("Run", variant="primary")
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3)
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3)
with gr.Row():
with gr.Column(scale=1):
param_defaults = {'w': 1024, 'h': 1024, 'cs_vis': False, 'cs_val': 1}
components.update(create_base_parameter_ui(prefix, param_defaults))
with gr.Column(scale=1):
components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=2, object_fit="contain", height=627)
components.update(create_lora_settings_ui(prefix))
components.update(create_controlnet_ui(prefix))
components.update(create_anima_controlnet_lllite_ui(prefix))
components.update(create_diffsynth_controlnet_ui(prefix))
components.update(create_krea2_controlnet_ui(prefix))
components.update(create_ipadapter_ui(prefix))
components.update(create_flux1_ipadapter_ui(prefix))
components.update(create_sd3_ipadapter_ui(prefix))
components.update(create_embedding_ui(prefix))
components.update(create_style_ui(prefix))
components.update(create_conditioning_ui(prefix))
components.update(create_reference_latent_ui(prefix))
components.update(create_hidream_o1_reference_ui(prefix))
components.update(create_joyai_reference_ui(prefix))
components.update(create_krea2_identity_edit_ui(prefix))
components.update(create_krea2_reference_edit_ui(prefix))
components.update(create_qwen_image_edit_ui(prefix))
components.update(create_boogu_edit_ui(prefix))
components.update(create_reference_image_ui(prefix))
components.update(create_vae_override_ui(prefix))
components.update(create_pid_ui(prefix))
return components113 unmodified lines114115116117118119120121113 unmodified linescomponents[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)with gr.Row():components[f'guidance_{prefix}'] = gr.Slider(label="Guidance (FLUX)", minimum=1.0, maximum=10.0, step=0.1, value=3.5, visible=False, interactive=True)components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=None, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU.")return components113 unmodified lines114115116117118119120113 unmodified linescomponents[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)with gr.Row():components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=60, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU.")return components
4 unmodified lines567891011121314151620 unmodified lines37383940414243444546474850 unmodified lines9910010110210310410510610710810911023 unmodified lines13413513613713813914014114214314414531 unmodified lines17717817918018118218318418518618718814 unmodified lines20320420520620720820921010 unmodified lines22122222322422522622722822923023123215 unmodified lines2482492502512522532542552562572582599 unmodified lines2692702712722732742752762772782792809 unmodified lines2902912922932942952962972982993003019 unmodified lines3113123133143153163173183193203213229 unmodified lines33233333433533633733833934034134234321 unmodified lines3653663673683693703713723733743753769 unmodified lines3863873883893903913923933943953963979 unmodified lines4074084094104114124134144154164174189 unmodified lines4284294304314324334344354364374384399 unmodified lines44945045145245345445545645745845946028 unmodified lines48949049149249349449549649749849950023 unmodified lines5245255265275285295305315325335345359 unmodified lines54554654754854955055155255355455555629 unmodified lines58658758858959059159259359459559659729 unmodified lines6276286296306316326336346356366376384 unmodified lineschains: loradisplay_name: "LoRA Fine-tuning Injector"description: "Injects LoRA weights into UNet/DiT model and CLIP text encoder for custom style, character, or domain adaptation. Note: For Civitai, specify the Version ID (modelVersionId) instead of the main Model ID."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 5usage_guideline: "Specify source ('Civitai' or 'Hugging Face'). For Civitai, provide lora_value as the Version ID (modelVersionId). For Hugging Face, provide HF repo file path. Scale (0.0~2.0) controls weight strength."parameters_schema:20 unmodified lineschains: ipadapterdisplay_name: "IP-Adapter Image Prompt"description: "Uses reference images to guide generation style, composition, structure, or face appearance without prompt text restrictions (SD1.5 & SDXL)."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 5usage_guideline: "Supply global settings (preset, embeds_scaling, combine_method, final_weight) and up to 5 reference images with individual weights. Preset must match the target model architecture (SD1.5 or SDXL)."parameters_schema:50 unmodified lineschains: controlnetdisplay_name: "ControlNet Spatial Guidance"description: "Applies structural and spatial conditioning (depth, pose, lineart, tile, scribble, canny) to guide output composition."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 5usage_guideline: "Specify ControlNet type and series (must match requested model architecture e.g., SD1.5, SDXL, SD3.5, FLUX.1, Qwen-Image), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and guidance strength."parameters_schema:23 unmodified lineschains: conditioningdisplay_name: "Regional Conditioning / Area Prompt"description: "Defines rectangular areas (X, Y, Width, Height) and assigns specific text prompts and conditioning strengths to them."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 10usage_guideline: "Define rectangular spatial areas (X, Y, width, height) and assign specific prompts and strengths to them. Supports up to 10 area prompts."parameters_schema:31 unmodified lineschains: vaedisplay_name: "Custom VAE Loader"description: "Overrides default VAE model used for latent space encoding and final image decoding."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 1usage_guideline: "Specify source ('Civitai' or 'Hugging Face'), then provide the vae_value (Civitai Version ID or HF file path)."parameters_schema:14 unmodified lineschains: piddisplay_name: "PiD High-Resolution Refinement"description: "Progressive Detail (PiD) upscale injector for fine detail enhancement and resolution upscaling."supported_tasks:- txt2imgmax_count: 1usage_guideline: "Enables PiD detail refinement pipeline using a boolean switch ('enabled': true/false)."parameters_schema:10 unmodified lineschains: styledisplay_name: "FLUX.1 Style Reference"description: "Applies artistic style conditioning from reference images onto FLUX.1 model generated outputs."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 5usage_guideline: "Supply style reference image(s) (up to 5) encoded as Base64 Data URI or HTTP/HTTPS URL and optional strength."parameters_schema:15 unmodified lineschains: reference_latentdisplay_name: "Reference Edit"description: "For multimodal models, this feature enables powerful editing and combining capabilities. In txt2img mode, adding a single reference image performs an Image Edit, while adding multiple images performs an Image Combine."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 10usage_guideline: "Supply reference image(s) encoded as Base64 Data URI or HTTP/HTTPS URL. Passing a single reference image performs an Image Edit, while passing multiple images (up to 10) performs an Image Combine."parameters_schema:9 unmodified lineschains: reference_imagedisplay_name: "Mage-Flow Reference Edit"description: " (Mage-Flow-Edit-Turbo/Mage-Flow-Edit recommended) For multimodal models, this feature enables powerful editing and combining capabilities. In txt2img mode, adding a single reference image performs an Image Edit, while adding multiple images performs an Image Combine."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 10usage_guideline: "Supply reference image as Base64 Data URI or HTTP/HTTPS URL."parameters_schema:9 unmodified lineschains: krea2_identity_editdisplay_name: "KREA2 Identity Edit"description: "Processed using the 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."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 2usage_guideline: "Supply reference image as Base64 Data URI or HTTP/HTTPS URL."parameters_schema:9 unmodified lineschains: krea2_style_referencedisplay_name: "KREA2 Style Reference"description: "(Krea-2-Turbo recommended) Add style reference images to perform style reference editing."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 3usage_guideline: "Supply style reference image as Base64 Data URI or HTTP/HTTPS URL."parameters_schema:9 unmodified lineschains: diffsynth_controlnetdisplay_name: "DiffSynth ControlNet"description: "DiffSynth optimized ControlNet injector for Z-Image models."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 5usage_guideline: "Supply ControlNet type (e.g., 'Canny'), series (e.g., 'alibaba-pai Controlnet Union 2.1 8steps'), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and optional strength."parameters_schema:21 unmodified lineschains: boogu_image_editdisplay_name: "Boogu-Image Edit"description: " (Boogu-Image-Edit-Turbo/Boogu-Image-Edit recommended, Boogu-Image-Edit 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."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 2usage_guideline: "Supply reference image as Base64 Data URI or HTTP/HTTPS URL."parameters_schema:9 unmodified lineschains: joyai_imagedisplay_name: "JoyAI Reference Edit"description: " (JoyAI-Image-Edit recommended) For multimodal models, this feature enables powerful editing and combining capabilities. In txt2img mode, adding a single reference image performs an Image Edit (JoyAI-Image-Edit recommended), while adding multiple images performs an Image Combine (JoyAI-Image-Edit-Plus recommended with ZeroGPU Duration (s) set to 120)."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 2usage_guideline: "Supply JoyAI reference image as Base64 Data URI or HTTP/HTTPS URL."parameters_schema:9 unmodified lineschains: qwen_image_editdisplay_name: "Qwen-Image Edit"description: " (lightx2v/Qwen-Image-Edit-2511-Lightning recommended) In txt2img mode, adding a single reference image performs an Image Edit, while adding multiple images performs an Image Combine."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 3usage_guideline: "Supply reference image(s) (up to 3) encoded as Base64 Data URI or HTTP/HTTPS URL. Passing a single reference image performs an Image Edit, while passing multiple images performs an Image Combine."parameters_schema:9 unmodified lineschains: hidream_o1_smoothingdisplay_name: "HiDream O1 Smoothing Injector"description: "HiDream O1 detail smoothing and artifact reduction injector."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 1usage_guideline: "Configures smoothing factor for HiDream models."parameters_schema:9 unmodified lineschains: krea2_controlnetdisplay_name: "KREA2 ControlNet"description: "Processed using the facok/comfyui-krea2-controlnet node."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 5usage_guideline: "Supply ControlNet type (e.g., 'Depth'), series (e.g., 'Patil'), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and optional strength."parameters_schema:28 unmodified lineschains: anima_controlnet_lllitedisplay_name: "Anima ControlNet LLLite"description: "Anima model-specific lightweight ControlNet."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 5usage_guideline: "Supply Anima ControlNet LLLite type (e.g., 'Depth'), series (e.g., 'kohya-ss'), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and optional strength."parameters_schema:23 unmodified lineschains: hidream_o1_referencedisplay_name: "HiDream-O1 Reference Edit"description: " (HiDream-O1-Image-Dev recommended with resolution set to 4.0MP, e.g., 2048x2048) For HiDream-O1 models, this feature enables reference image editing and combining capabilities. In txt2img mode, adding a single reference image performs an Image Edit, while adding multiple images performs an Image Combine."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 9usage_guideline: "Supply reference image(s) (up to 9) encoded as Base64 Data URI or HTTP/HTTPS URL. Passing a single reference image performs an Image Edit, while passing multiple images performs an Image Combine."parameters_schema:9 unmodified lineschains: flux1_ipadapterdisplay_name: "Flux1 IP-Adapter"description: "FLUX.1 model-specific IP-Adapter implementation."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 5usage_guideline: "Supply reference image (Base64 Data URI or HTTP/HTTPS URL), optional weight (default 1.0), start_at (default 0.0), and end_at (default 1.0). Up to 5 images supported."parameters_schema:29 unmodified lineschains: sd3_ipadapterdisplay_name: "SD3 IP-Adapter"description: "SD3/SD3.5 model-specific IP-Adapter implementation."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 5usage_guideline: "Supply reference image (Base64 Data URI or HTTP/HTTPS URL), optional weight (default 1.0), start_at (default 0.0), and end_at (default 1.0). Up to 5 images supported."parameters_schema:29 unmodified lineschains: embeddingdisplay_name: "Textual Inversion Embedding Injector"description: "Downloads Textual Inversion embedding files from Civitai or Hugging Face to the server. Note: This feature ONLY handles file downloading/preparation. To activate the embedding, manually add 'embedding:<filename>' (e.g. 'embedding:civitai_456' for Civitai ID 456, or 'embedding:filename' for Hugging Face) into your prompt or negative_prompt."supported_tasks:- txt2img- img2img- inpaint- outpaint- hires_fixmax_count: 5usage_guideline: "Specify source ('Civitai' or 'Hugging Face'), and embedding_value (Civitai Version ID or HF repo file path). The file is downloaded to server; manually enter 'embedding:<filename>' in prompt or negative_prompt to activate."parameters_schema:4 unmodified lines567891020 unmodified lines31323334353650 unmodified lines87888990919223 unmodified lines11611711811912012131 unmodified lines15315415515615715814 unmodified lines17317417517617717810 unmodified lines18919019119219319415 unmodified lines2102112122132142159 unmodified lines2252262272282292309 unmodified lines2402412422432442459 unmodified lines2552562572582592609 unmodified lines27027127227327427521 unmodified lines2972982993003013029 unmodified lines3123133143153163179 unmodified lines3273283293303313329 unmodified lines3423433443453463479 unmodified lines35735835936036136228 unmodified lines39139239339439539623 unmodified lines4204214224234244259 unmodified lines43543643743843944029 unmodified lines47047147247347447529 unmodified lines5055065075085095104 unmodified lineschains: loradisplay_name: "LoRA Fine-tuning Injector"description: "Injects LoRA weights into UNet/DiT model and CLIP text encoder for custom style, character, or domain adaptation. Note: For Civitai, specify the Version ID (modelVersionId) instead of the main Model ID."max_count: 5usage_guideline: "Specify source ('Civitai' or 'Hugging Face'). For Civitai, provide lora_value as the Version ID (modelVersionId). For Hugging Face, provide HF repo file path. Scale (0.0~2.0) controls weight strength."parameters_schema:20 unmodified lineschains: ipadapterdisplay_name: "IP-Adapter Image Prompt"description: "Uses reference images to guide generation style, composition, structure, or face appearance without prompt text restrictions (SD1.5 & SDXL)."max_count: 5usage_guideline: "Supply global settings (preset, embeds_scaling, combine_method, final_weight) and up to 5 reference images with individual weights. Preset must match the target model architecture (SD1.5 or SDXL)."parameters_schema:50 unmodified lineschains: controlnetdisplay_name: "ControlNet Spatial Guidance"description: "Applies structural and spatial conditioning (depth, pose, lineart, tile, scribble, canny) to guide output composition."max_count: 5usage_guideline: "Specify ControlNet type and series (must match requested model architecture e.g., SD1.5, SDXL, SD3.5, FLUX.1, Qwen-Image), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and guidance strength."parameters_schema:23 unmodified lineschains: conditioningdisplay_name: "Regional Conditioning / Area Prompt"description: "Defines rectangular areas (X, Y, Width, Height) and assigns specific text prompts and conditioning strengths to them."max_count: 10usage_guideline: "Define rectangular spatial areas (X, Y, width, height) and assign specific prompts and strengths to them. Supports up to 10 area prompts."parameters_schema:31 unmodified lineschains: vaedisplay_name: "Custom VAE Loader"description: "Overrides default VAE model used for latent space encoding and final image decoding."max_count: 1usage_guideline: "Specify source ('Civitai' or 'Hugging Face'), then provide the vae_value (Civitai Version ID or HF file path)."parameters_schema:14 unmodified lineschains: piddisplay_name: "PiD High-Resolution Refinement"description: "Progressive Detail (PiD) upscale injector for fine detail enhancement and resolution upscaling."max_count: 1usage_guideline: "Enables PiD detail refinement pipeline using a boolean switch ('enabled': true/false)."parameters_schema:10 unmodified lineschains: styledisplay_name: "FLUX.1 Style Reference"description: "Applies artistic style conditioning from reference images onto FLUX.1 model generated outputs."max_count: 5usage_guideline: "Supply style reference image(s) (up to 5) encoded as Base64 Data URI or HTTP/HTTPS URL and optional strength."parameters_schema:15 unmodified lineschains: reference_latentdisplay_name: "Reference Edit"description: "For multimodal models, this feature enables powerful editing and combining capabilities. In txt2img mode, adding a single reference image performs an Image Edit, while adding multiple images performs an Image Combine."max_count: 10usage_guideline: "Supply reference image(s) encoded as Base64 Data URI or HTTP/HTTPS URL. Passing a single reference image performs an Image Edit, while passing multiple images (up to 10) performs an Image Combine."parameters_schema:9 unmodified lineschains: reference_imagedisplay_name: "Mage-Flow Reference Edit"description: " (Mage-Flow-Edit-Turbo/Mage-Flow-Edit recommended) For multimodal models, this feature enables powerful editing and combining capabilities. In txt2img mode, adding a single reference image performs an Image Edit, while adding multiple images performs an Image Combine."max_count: 10usage_guideline: "Supply reference image as Base64 Data URI or HTTP/HTTPS URL."parameters_schema:9 unmodified lineschains: krea2_identity_editdisplay_name: "KREA2 Identity Edit"description: "Processed using the 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."max_count: 2usage_guideline: "Supply reference image as Base64 Data URI or HTTP/HTTPS URL."parameters_schema:9 unmodified lineschains: krea2_style_referencedisplay_name: "KREA2 Style Reference"description: "(Krea-2-Turbo recommended) Add style reference images to perform style reference editing."max_count: 3usage_guideline: "Supply style reference image as Base64 Data URI or HTTP/HTTPS URL."parameters_schema:9 unmodified lineschains: diffsynth_controlnetdisplay_name: "DiffSynth ControlNet"description: "DiffSynth optimized ControlNet injector for Z-Image models."max_count: 5usage_guideline: "Supply ControlNet type (e.g., 'Canny'), series (e.g., 'alibaba-pai Controlnet Union 2.1 8steps'), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and optional strength."parameters_schema:21 unmodified lineschains: boogu_image_editdisplay_name: "Boogu-Image Edit"description: " (Boogu-Image-Edit-Turbo/Boogu-Image-Edit recommended, Boogu-Image-Edit 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."max_count: 2usage_guideline: "Supply reference image as Base64 Data URI or HTTP/HTTPS URL."parameters_schema:9 unmodified lineschains: joyai_imagedisplay_name: "JoyAI Reference Edit"description: " (JoyAI-Image-Edit recommended) For multimodal models, this feature enables powerful editing and combining capabilities. In txt2img mode, adding a single reference image performs an Image Edit (JoyAI-Image-Edit recommended), while adding multiple images performs an Image Combine (JoyAI-Image-Edit-Plus recommended with ZeroGPU Duration (s) set to 120)."max_count: 2usage_guideline: "Supply JoyAI reference image as Base64 Data URI or HTTP/HTTPS URL."parameters_schema:9 unmodified lineschains: qwen_image_editdisplay_name: "Qwen-Image Edit"description: " (lightx2v/Qwen-Image-Edit-2511-Lightning recommended) In txt2img mode, adding a single reference image performs an Image Edit, while adding multiple images performs an Image Combine."max_count: 3usage_guideline: "Supply reference image(s) (up to 3) encoded as Base64 Data URI or HTTP/HTTPS URL. Passing a single reference image performs an Image Edit, while passing multiple images performs an Image Combine."parameters_schema:9 unmodified lineschains: hidream_o1_smoothingdisplay_name: "HiDream O1 Smoothing Injector"description: "HiDream O1 detail smoothing and artifact reduction injector."max_count: 1usage_guideline: "Configures smoothing factor for HiDream models."parameters_schema:9 unmodified lineschains: krea2_controlnetdisplay_name: "KREA2 ControlNet"description: "Processed using the facok/comfyui-krea2-controlnet node."max_count: 5usage_guideline: "Supply ControlNet type (e.g., 'Depth'), series (e.g., 'Patil'), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and optional strength."parameters_schema:28 unmodified lineschains: anima_controlnet_lllitedisplay_name: "Anima ControlNet LLLite"description: "Anima model-specific lightweight ControlNet."max_count: 5usage_guideline: "Supply Anima ControlNet LLLite type (e.g., 'Depth'), series (e.g., 'kohya-ss'), pre-processed control image (Base64 Data URI or HTTP/HTTPS URL; system does NOT pre-process raw RGB images), and optional strength."parameters_schema:23 unmodified lineschains: hidream_o1_referencedisplay_name: "HiDream-O1 Reference Edit"description: " (HiDream-O1-Image-Dev recommended with resolution set to 4.0MP, e.g., 2048x2048) For HiDream-O1 models, this feature enables reference image editing and combining capabilities. In txt2img mode, adding a single reference image performs an Image Edit, while adding multiple images performs an Image Combine."max_count: 9usage_guideline: "Supply reference image(s) (up to 9) encoded as Base64 Data URI or HTTP/HTTPS URL. Passing a single reference image performs an Image Edit, while passing multiple images performs an Image Combine."parameters_schema:9 unmodified lineschains: flux1_ipadapterdisplay_name: "Flux1 IP-Adapter"description: "FLUX.1 model-specific IP-Adapter implementation."max_count: 5usage_guideline: "Supply reference image (Base64 Data URI or HTTP/HTTPS URL), optional weight (default 1.0), start_at (default 0.0), and end_at (default 1.0). Up to 5 images supported."parameters_schema:29 unmodified lineschains: sd3_ipadapterdisplay_name: "SD3 IP-Adapter"description: "SD3/SD3.5 model-specific IP-Adapter implementation."max_count: 5usage_guideline: "Supply reference image (Base64 Data URI or HTTP/HTTPS URL), optional weight (default 1.0), start_at (default 0.0), and end_at (default 1.0). Up to 5 images supported."parameters_schema:29 unmodified lineschains: embeddingdisplay_name: "Textual Inversion Embedding Injector"description: "Downloads Textual Inversion embedding files from Civitai or Hugging Face to the server. Note: This feature ONLY handles file downloading/preparation. To activate the embedding, manually add 'embedding:<filename>' (e.g. 'embedding:civitai_456' for Civitai ID 456, or 'embedding:filename' for Hugging Face) into your prompt or negative_prompt."max_count: 5usage_guideline: "Specify source ('Civitai' or 'Hugging Face'), and embedding_value (Civitai Version ID or HF repo file path). The file is downloaded to server; manually enter 'embedding:<filename>' in prompt or negative_prompt to activate."parameters_schema:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200# Feature names in enabled_chains correspond 1-to-1 with chain_injectors/<name>_injector.pykrea-2:enabled_chains:- lora- krea2_controlnet- krea2_identity_edit- krea2_style_reference- pidmage-flow:enabled_chains:- reference_imagejoyai-image:enabled_chains:- joyai_imageboogu-image:enabled_chains:- lora- boogu_image_edit- pidpixeldit:enabled_chains:- conditioningideogram-4:enabled_chains:- vae- pidlens:enabled_chains:- conditioning- pidflux2-kv:enabled_chains:- lora- reference_latent- conditioning- vae- pidflux2:enabled_chains:- lora- reference_latent- conditioning- vae- pidernie-image:enabled_chains:- conditioning- pidz-image:enabled_chains:- lora- diffsynth_controlnet- conditioning- vae- pidqwen-image:enabled_chains:- lora- conditioning- controlnet- qwen_image_edit- vae- pidlongcat-image:enabled_chains:- lora- conditioning- pidcosmos-predict2:enabled_chains:- conditioning- vaeanima:enabled_chains:- lora- conditioning- anima_controlnet_lllite- vae- pidnewbie-image:enabled_chains:- lora- embedding- conditioning- vae- pidkandinsky-5:enabled_chains:- conditioning- vae- pidovis-image:enabled_chains:- conditioning- vae- pidhunyuanimage:enabled_chains:- conditioning- vaechroma1-radiance:enabled_chains:- conditioningchroma1:enabled_chains:- conditioning- vae- pidomnigen2:enabled_chains:- reference_latent- conditioning- pidlumina:enabled_chains:- lora- embedding- conditioning- vae- pidhidream-o1:enabled_chains:- lora- conditioning- hidream_o1_smoothing- hidream_o1_referencehidream-i1:enabled_chains:- lora- conditioning- pidflux1:enabled_chains:- lora- flux1_ipadapter- conditioning- style- controlnet- vae- pidauraflow:enabled_chains:- lora- conditioning- vaesd35:enabled_chains:- lora- sd3_ipadapter- embedding- conditioning- controlnet- vae- pidsdxl:enabled_chains:- lora- ipadapter- embedding- conditioning- controlnet- vae- pidsd15:enabled_chains:- lora- ipadapter- embedding- conditioning- controlnet- vae123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200# Feature names in enabled_chains correspond 1-to-1 with chain_injectors/<name>_injector.pykrea-2:enabled_chains:- lora- krea2_controlnet- krea2_identity_edit- krea2_style_reference- pidmage-flow:enabled_chains:- reference_imagejoyai-image:enabled_chains:- joyai_imageboogu-image:enabled_chains:- lora- boogu_image_edit- pidpixeldit:enabled_chains:- conditioningideogram-4:enabled_chains:- vae- pidlens:enabled_chains:- conditioning- pidflux2-kv:enabled_chains:- lora- reference_latent- conditioning- vae- pidflux2:enabled_chains:- lora- reference_latent- conditioning- vae- pidernie-image:enabled_chains:- conditioning- pidz-image:enabled_chains:- lora- diffsynth_controlnet- conditioning- vae- pidqwen-image:enabled_chains:- lora- conditioning- controlnet- qwen_image_edit- vae- pidlongcat-image:enabled_chains:- lora- conditioning- pidcosmos-predict2:enabled_chains:- conditioning- vaeanima:enabled_chains:- lora- conditioning- anima_controlnet_lllite- vae- pidnewbie-image:enabled_chains:- lora- embedding- conditioning- vae- pidkandinsky-5:enabled_chains:- conditioning- vae- pidovis-image:enabled_chains:- conditioning- vae- pidhunyuanimage:enabled_chains:- conditioning- vaechroma1-radiance:enabled_chains:- conditioningchroma1:enabled_chains:- conditioning- vae- pidomnigen2:enabled_chains:- reference_latent- conditioning- pidlumina:enabled_chains:- lora- embedding- conditioning- vae- pidhidream-o1:enabled_chains:- lora- conditioning- hidream_o1_smoothing- hidream_o1_referencehidream-i1:enabled_chains:- lora- conditioning- pidflux1:enabled_chains:- lora- flux1_ipadapter- conditioning- style- controlnet- vae- pidauraflow:enabled_chains:- lora- conditioning- vaesd35:enabled_chains:- lora- sd3_ipadapter- embedding- conditioning- controlnet- vae- pidsdxl:enabled_chains:- lora- ipadapter- embedding- conditioning- controlnet- vae- pidsd15:enabled_chains:- lora- ipadapter- embedding- conditioning- controlnet- vae
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125# Task-level feature support configuration# Defines which chains (features) are available for each task type.# A feature is visible in the UI only when BOTH the task AND the model architecture support it.# pid only supports txt2img; all other features support all 5 tasks.
txt2img: enabled_chains: - lora - controlnet - anima_controlnet_lllite - diffsynth_controlnet - krea2_controlnet - ipadapter - flux1_ipadapter - sd3_ipadapter - style - embedding - conditioning - reference_latent - hidream_o1_reference - hidream_o1_smoothing - joyai_image - krea2_identity_edit - krea2_style_reference - qwen_image_edit - boogu_image_edit - reference_image - pid - vae
img2img: enabled_chains: - lora - controlnet - anima_controlnet_lllite - diffsynth_controlnet - krea2_controlnet - ipadapter - flux1_ipadapter - sd3_ipadapter - style - embedding - conditioning - reference_latent - hidream_o1_reference - hidream_o1_smoothing - joyai_image - krea2_identity_edit - krea2_style_reference - qwen_image_edit - boogu_image_edit - reference_image - vae
inpaint: enabled_chains: - lora - controlnet - anima_controlnet_lllite - diffsynth_controlnet - krea2_controlnet - ipadapter - flux1_ipadapter - sd3_ipadapter - style - embedding - conditioning - reference_latent - hidream_o1_reference - hidream_o1_smoothing - joyai_image - krea2_identity_edit - krea2_style_reference - qwen_image_edit - boogu_image_edit - reference_image - vae
outpaint: enabled_chains: - lora - controlnet - anima_controlnet_lllite - diffsynth_controlnet - krea2_controlnet - ipadapter - flux1_ipadapter - sd3_ipadapter - style - embedding - conditioning - reference_latent - hidream_o1_reference - hidream_o1_smoothing - joyai_image - krea2_identity_edit - krea2_style_reference - qwen_image_edit - boogu_image_edit - reference_image - vae
hires_fix: enabled_chains: - lora - controlnet - anima_controlnet_lllite - diffsynth_controlnet - krea2_controlnet - ipadapter - flux1_ipadapter - sd3_ipadapter - style - embedding - conditioning - reference_latent - hidream_o1_reference - hidream_o1_smoothing - joyai_image - krea2_identity_edit - krea2_style_reference - qwen_image_edit - boogu_image_edit - reference_image - vae.gitignoreAdded+15
README.md-1
app.py+5-6
core/pipelines/pipeline_input_processor.py+28-21
core/pipelines/sd_image_pipeline.py+8-5
core/pipelines/workflow_recipes/_partials/conditioning/flux1.yaml+3-2
core/settings.py+12-2
mcp_tools/common.py+2-1
mcp_tools/get_feature_list.py+27-5
mcp_tools/mcp_gradio_integration.py+2
requirements.txt+1-1
ui/events/change_handlers.py+36-12
ui/events/main.py+176-13
ui/events/run_handlers.py+53-18
ui/shared/inpaint_ui.py → ui/imagegen_ui.pyRenamed+197-125
ui/layout.py+4-20
ui/shared/hires_fix_ui.pyDeleted-111
ui/shared/img2img_ui.pyDeleted-92
ui/shared/outpaint_ui.pyDeleted-107
ui/shared/txt2img_ui.pyDeleted-66
ui/shared/ui_components.py+1-2
yaml/chain_features.yaml-128
yaml/image_gen_features.yaml → yaml/model_architecture_features.yamlRenamed+199-199
yaml/task_features.yamlAdded+125