Upload folder using huggingface_hub
Browse files- core/pipelines/pipeline_input_processor.py +2 -1
- core/pipelines/workflow_recipes/_partials/conditioning/qwen-image.yaml +2 -11
- ui/events/change_handlers.py +4 -2
- ui/events/main.py +5 -2
- ui/events/run_handlers.py +1 -1
- ui/shared/hires_fix_ui.py +23 -7
- ui/shared/img2img_ui.py +23 -7
- ui/shared/inpaint_ui.py +23 -7
- ui/shared/outpaint_ui.py +23 -7
- ui/shared/ui_components.py +21 -6
- yaml/file_list.yaml +0 -9
- yaml/model_defaults.yaml +4 -4
- yaml/model_list.yaml +2 -4
core/pipelines/pipeline_input_processor.py
CHANGED
|
@@ -42,6 +42,7 @@ def process_pipeline_inputs(ui_inputs: Dict[str, Any], progress: gr.Progress, wo
|
|
| 42 |
ui_inputs['denoise'] = 1.0
|
| 43 |
if task_type == 'img2img': ui_inputs['denoise'] = ui_inputs.get('img2img_denoise', 0.7)
|
| 44 |
elif task_type == 'hires_fix': ui_inputs['denoise'] = ui_inputs.get('hires_denoise', 0.55)
|
|
|
|
| 45 |
|
| 46 |
if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)
|
| 47 |
|
|
@@ -331,4 +332,4 @@ def process_pipeline_inputs(ui_inputs: Dict[str, Any], progress: gr.Progress, wo
|
|
| 331 |
"active_hidream_o1_reference": active_hidream_o1_reference,
|
| 332 |
"active_conditioning": active_conditioning,
|
| 333 |
"temp_files_to_clean": temp_files_to_clean
|
| 334 |
-
}
|
|
|
|
| 42 |
ui_inputs['denoise'] = 1.0
|
| 43 |
if task_type == 'img2img': ui_inputs['denoise'] = ui_inputs.get('img2img_denoise', 0.7)
|
| 44 |
elif task_type == 'hires_fix': ui_inputs['denoise'] = ui_inputs.get('hires_denoise', 0.55)
|
| 45 |
+
elif task_type == 'inpaint': ui_inputs['denoise'] = ui_inputs.get('inpaint_denoise', 1.0)
|
| 46 |
|
| 47 |
if not os.path.exists(INPUT_DIR): os.makedirs(INPUT_DIR)
|
| 48 |
|
|
|
|
| 332 |
"active_hidream_o1_reference": active_hidream_o1_reference,
|
| 333 |
"active_conditioning": active_conditioning,
|
| 334 |
"temp_files_to_clean": temp_files_to_clean
|
| 335 |
+
}
|
core/pipelines/workflow_recipes/_partials/conditioning/qwen-image.yaml
CHANGED
|
@@ -13,12 +13,6 @@ nodes:
|
|
| 13 |
params:
|
| 14 |
type: "qwen_image"
|
| 15 |
device: "default"
|
| 16 |
-
|
| 17 |
-
lora_loader:
|
| 18 |
-
class_type: LoraLoaderModelOnly
|
| 19 |
-
title: "Load Qwen Lightning LoRA"
|
| 20 |
-
params:
|
| 21 |
-
strength_model: 1.0
|
| 22 |
model_sampler:
|
| 23 |
class_type: ModelSamplingAuraFlow
|
| 24 |
title: "ModelSamplingAuraFlow"
|
|
@@ -27,8 +21,6 @@ nodes:
|
|
| 27 |
|
| 28 |
connections:
|
| 29 |
- from: "unet_loader:0"
|
| 30 |
-
to: "lora_loader:model"
|
| 31 |
-
- from: "lora_loader:0"
|
| 32 |
to: "model_sampler:model"
|
| 33 |
|
| 34 |
- from: "model_sampler:0"
|
|
@@ -53,7 +45,7 @@ dynamic_lora_chains:
|
|
| 53 |
lora_chain:
|
| 54 |
template: "LoraLoader"
|
| 55 |
output_map:
|
| 56 |
-
"
|
| 57 |
"clip_loader:0": "clip"
|
| 58 |
input_map:
|
| 59 |
"model": "model"
|
|
@@ -80,5 +72,4 @@ dynamic_pid_chains:
|
|
| 80 |
ui_map:
|
| 81 |
unet_name: "unet_loader:unet_name"
|
| 82 |
vae_name: "vae_loader:vae_name"
|
| 83 |
-
clip_name: "clip_loader:clip_name"
|
| 84 |
-
lora_name: "lora_loader:lora_name"
|
|
|
|
| 13 |
params:
|
| 14 |
type: "qwen_image"
|
| 15 |
device: "default"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
model_sampler:
|
| 17 |
class_type: ModelSamplingAuraFlow
|
| 18 |
title: "ModelSamplingAuraFlow"
|
|
|
|
| 21 |
|
| 22 |
connections:
|
| 23 |
- from: "unet_loader:0"
|
|
|
|
|
|
|
| 24 |
to: "model_sampler:model"
|
| 25 |
|
| 26 |
- from: "model_sampler:0"
|
|
|
|
| 45 |
lora_chain:
|
| 46 |
template: "LoraLoader"
|
| 47 |
output_map:
|
| 48 |
+
"unet_loader:0": "model"
|
| 49 |
"clip_loader:0": "clip"
|
| 50 |
input_map:
|
| 51 |
"model": "model"
|
|
|
|
| 72 |
ui_map:
|
| 73 |
unet_name: "unet_loader:unet_name"
|
| 74 |
vae_name: "vae_loader:vae_name"
|
| 75 |
+
clip_name: "clip_loader:clip_name"
|
|
|
ui/events/change_handlers.py
CHANGED
|
@@ -16,7 +16,7 @@ from .config_loaders import (
|
|
| 16 |
load_ipadapter_config
|
| 17 |
)
|
| 18 |
|
| 19 |
-
def make_update_fn(m_comp, cat_comp, cs_comp, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths, anima_cn_types, anima_cn_series, anima_cn_filepaths, diffsynth_cn_types, diffsynth_cn_series, diffsynth_cn_filepaths, ipa_preset, lora_acc, cn_acc, anima_cn_acc, diffsynth_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):
|
| 20 |
def update_fn(*args):
|
| 21 |
arch = args[0]
|
| 22 |
category = args[1]
|
|
@@ -67,6 +67,7 @@ def make_update_fn(m_comp, cat_comp, cs_comp, ar_comp, width_comp, height_comp,
|
|
| 67 |
if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))
|
| 68 |
if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))
|
| 69 |
if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))
|
|
|
|
| 70 |
|
| 71 |
if cs_comp:
|
| 72 |
updates[cs_comp] = gr.update(visible=(arch_model_type == "sd15"))
|
|
@@ -131,7 +132,7 @@ def make_update_fn(m_comp, cat_comp, cs_comp, ar_comp, width_comp, height_comp,
|
|
| 131 |
return update_fn
|
| 132 |
|
| 133 |
|
| 134 |
-
def make_model_change_fn(cat_comp_ref, cs_comp, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths, anima_cn_types, anima_cn_series, anima_cn_filepaths, diffsynth_cn_types, diffsynth_cn_series, diffsynth_cn_filepaths, arch_comp_ref, ipa_preset, lora_acc, cn_acc, anima_cn_acc, diffsynth_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):
|
| 135 |
def change_fn(*args):
|
| 136 |
model_name = args[0]
|
| 137 |
idx = 1
|
|
@@ -187,6 +188,7 @@ def make_model_change_fn(cat_comp_ref, cs_comp, ar_comp, width_comp, height_comp
|
|
| 187 |
if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))
|
| 188 |
if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))
|
| 189 |
if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))
|
|
|
|
| 190 |
|
| 191 |
if cs_comp:
|
| 192 |
updates[cs_comp] = gr.update(visible=(arch_model_type == "sd15"))
|
|
|
|
| 16 |
load_ipadapter_config
|
| 17 |
)
|
| 18 |
|
| 19 |
+
def make_update_fn(m_comp, cat_comp, cs_comp, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths, anima_cn_types, anima_cn_series, anima_cn_filepaths, diffsynth_cn_types, diffsynth_cn_series, diffsynth_cn_filepaths, ipa_preset, lora_acc, cn_acc, anima_cn_acc, diffsynth_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):
|
| 20 |
def update_fn(*args):
|
| 21 |
arch = args[0]
|
| 22 |
category = args[1]
|
|
|
|
| 67 |
if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))
|
| 68 |
if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))
|
| 69 |
if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))
|
| 70 |
+
if vae_acc: updates[vae_acc] = gr.update(visible=('vae' in enabled_chains))
|
| 71 |
|
| 72 |
if cs_comp:
|
| 73 |
updates[cs_comp] = gr.update(visible=(arch_model_type == "sd15"))
|
|
|
|
| 132 |
return update_fn
|
| 133 |
|
| 134 |
|
| 135 |
+
def make_model_change_fn(cat_comp_ref, cs_comp, ar_comp, width_comp, height_comp, cn_types, cn_series, cn_filepaths, anima_cn_types, anima_cn_series, anima_cn_filepaths, diffsynth_cn_types, diffsynth_cn_series, diffsynth_cn_filepaths, arch_comp_ref, ipa_preset, lora_acc, cn_acc, anima_cn_acc, diffsynth_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):
|
| 136 |
def change_fn(*args):
|
| 137 |
model_name = args[0]
|
| 138 |
idx = 1
|
|
|
|
| 188 |
if ref_latent_acc: updates[ref_latent_acc] = gr.update(visible=('reference_latent' in enabled_chains))
|
| 189 |
if hidream_o1_ref_acc: updates[hidream_o1_ref_acc] = gr.update(visible=('hidream_o1_reference' in enabled_chains))
|
| 190 |
if pid_acc: updates[pid_acc] = gr.update(visible=('pid' in enabled_chains))
|
| 191 |
+
if vae_acc: updates[vae_acc] = gr.update(visible=('vae' in enabled_chains))
|
| 192 |
|
| 193 |
if cs_comp:
|
| 194 |
updates[cs_comp] = gr.update(visible=(arch_model_type == "sd15"))
|
ui/events/main.py
CHANGED
|
@@ -61,6 +61,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 61 |
ref_latent_accordion = ui_components.get(f'reference_latent_accordion_{prefix}')
|
| 62 |
hidream_o1_ref_accordion = ui_components.get(f'hidream_o1_reference_accordion_{prefix}')
|
| 63 |
pid_accordion = ui_components.get(f'pid_accordion_{prefix}')
|
|
|
|
| 64 |
|
| 65 |
ipa_preset_list = ui_components.get(f'ipadapter_final_preset_{prefix}')
|
| 66 |
|
|
@@ -95,6 +96,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 95 |
if ref_latent_accordion: outputs.append(ref_latent_accordion)
|
| 96 |
if hidream_o1_ref_accordion: outputs.append(hidream_o1_ref_accordion)
|
| 97 |
if pid_accordion: outputs.append(pid_accordion)
|
|
|
|
| 98 |
if ipa_preset_list: outputs.append(ipa_preset_list)
|
| 99 |
|
| 100 |
outputs.extend(valid_extra_comps)
|
|
@@ -106,7 +108,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 106 |
diffsynth_cn_types_list, diffsynth_cn_series_list, diffsynth_cn_filepaths_list,
|
| 107 |
ipa_preset_list, lora_accordion, cn_accordion, anima_cn_accordion, diffsynth_cn_accordion, ipa_accordion, sd3_ipa_accordion, flux1_ipa_accordion, style_accordion, embedding_accordion, conditioning_accordion,
|
| 108 |
ref_latent_accordion, hidream_o1_ref_accordion, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 109 |
-
pid_acc=pid_accordion
|
| 110 |
)
|
| 111 |
inputs = [arch_comp, cat_comp]
|
| 112 |
if aspect_ratio_comp:
|
|
@@ -137,6 +139,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 137 |
if ref_latent_accordion: outputs2.append(ref_latent_accordion)
|
| 138 |
if hidream_o1_ref_accordion: outputs2.append(hidream_o1_ref_accordion)
|
| 139 |
if pid_accordion: outputs2.append(pid_accordion)
|
|
|
|
| 140 |
if ipa_preset_list: outputs2.append(ipa_preset_list)
|
| 141 |
|
| 142 |
outputs2.extend(valid_extra_comps)
|
|
@@ -153,7 +156,7 @@ def attach_event_handlers(ui_components, demo):
|
|
| 153 |
diffsynth_cn_types_list, diffsynth_cn_series_list, diffsynth_cn_filepaths_list,
|
| 154 |
arch_comp, ipa_preset_list, lora_accordion, cn_accordion, anima_cn_accordion, diffsynth_cn_accordion, ipa_accordion, sd3_ipa_accordion, flux1_ipa_accordion, style_accordion, embedding_accordion, conditioning_accordion,
|
| 155 |
ref_latent_accordion, hidream_o1_ref_accordion, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 156 |
-
pid_acc=pid_accordion
|
| 157 |
)
|
| 158 |
model_comp.change(fn=change_fn, inputs=inputs2, outputs=outputs2)
|
| 159 |
|
|
|
|
| 61 |
ref_latent_accordion = ui_components.get(f'reference_latent_accordion_{prefix}')
|
| 62 |
hidream_o1_ref_accordion = ui_components.get(f'hidream_o1_reference_accordion_{prefix}')
|
| 63 |
pid_accordion = ui_components.get(f'pid_accordion_{prefix}')
|
| 64 |
+
vae_accordion = ui_components.get(f'vae_accordion_{prefix}')
|
| 65 |
|
| 66 |
ipa_preset_list = ui_components.get(f'ipadapter_final_preset_{prefix}')
|
| 67 |
|
|
|
|
| 96 |
if ref_latent_accordion: outputs.append(ref_latent_accordion)
|
| 97 |
if hidream_o1_ref_accordion: outputs.append(hidream_o1_ref_accordion)
|
| 98 |
if pid_accordion: outputs.append(pid_accordion)
|
| 99 |
+
if vae_accordion: outputs.append(vae_accordion)
|
| 100 |
if ipa_preset_list: outputs.append(ipa_preset_list)
|
| 101 |
|
| 102 |
outputs.extend(valid_extra_comps)
|
|
|
|
| 108 |
diffsynth_cn_types_list, diffsynth_cn_series_list, diffsynth_cn_filepaths_list,
|
| 109 |
ipa_preset_list, lora_accordion, cn_accordion, anima_cn_accordion, diffsynth_cn_accordion, ipa_accordion, sd3_ipa_accordion, flux1_ipa_accordion, style_accordion, embedding_accordion, conditioning_accordion,
|
| 110 |
ref_latent_accordion, hidream_o1_ref_accordion, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 111 |
+
pid_acc=pid_accordion, vae_acc=vae_accordion
|
| 112 |
)
|
| 113 |
inputs = [arch_comp, cat_comp]
|
| 114 |
if aspect_ratio_comp:
|
|
|
|
| 139 |
if ref_latent_accordion: outputs2.append(ref_latent_accordion)
|
| 140 |
if hidream_o1_ref_accordion: outputs2.append(hidream_o1_ref_accordion)
|
| 141 |
if pid_accordion: outputs2.append(pid_accordion)
|
| 142 |
+
if vae_accordion: outputs2.append(vae_accordion)
|
| 143 |
if ipa_preset_list: outputs2.append(ipa_preset_list)
|
| 144 |
|
| 145 |
outputs2.extend(valid_extra_comps)
|
|
|
|
| 156 |
diffsynth_cn_types_list, diffsynth_cn_series_list, diffsynth_cn_filepaths_list,
|
| 157 |
arch_comp, ipa_preset_list, lora_accordion, cn_accordion, anima_cn_accordion, diffsynth_cn_accordion, ipa_accordion, sd3_ipa_accordion, flux1_ipa_accordion, style_accordion, embedding_accordion, conditioning_accordion,
|
| 158 |
ref_latent_accordion, hidream_o1_ref_accordion, guidance_comp, prompt_comp, neg_prompt_comp, steps_comp, cfg_comp, sampler_comp, scheduler_comp,
|
| 159 |
+
pid_acc=pid_accordion, vae_acc=vae_accordion
|
| 160 |
)
|
| 161 |
model_comp.change(fn=change_fn, inputs=inputs2, outputs=outputs2)
|
| 162 |
|
ui/events/run_handlers.py
CHANGED
|
@@ -30,7 +30,7 @@ def create_run_event(prefix: str, task_type: str, ui_components: dict):
|
|
| 30 |
|
| 31 |
task_specific_map = {
|
| 32 |
'img2img': {'img2img_image': f'input_image_{prefix}', 'img2img_denoise': f'denoise_{prefix}'},
|
| 33 |
-
'inpaint': {'inpaint_image_dict': f'input_image_dict_{prefix}', 'grow_mask_by': f'grow_mask_by_{prefix}'},
|
| 34 |
'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}'},
|
| 35 |
'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}'}
|
| 36 |
}
|
|
|
|
| 30 |
|
| 31 |
task_specific_map = {
|
| 32 |
'img2img': {'img2img_image': f'input_image_{prefix}', 'img2img_denoise': f'denoise_{prefix}'},
|
| 33 |
+
'inpaint': {'inpaint_image_dict': f'input_image_dict_{prefix}', 'grow_mask_by': f'grow_mask_by_{prefix}', 'inpaint_denoise': f'denoise_{prefix}'},
|
| 34 |
'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}'},
|
| 35 |
'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}'}
|
| 36 |
}
|
ui/shared/hires_fix_ui.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from core.settings import MODEL_MAP_CHECKPOINT
|
| 3 |
from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICES
|
| 4 |
from .ui_components import (
|
| 5 |
create_lora_settings_ui,
|
|
@@ -10,6 +10,14 @@ from .ui_components import (
|
|
| 10 |
create_reference_latent_ui, create_hidream_o1_reference_ui
|
| 11 |
)
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
def create_ui():
|
| 14 |
prefix = "hires_fix"
|
| 15 |
components = {}
|
|
@@ -33,8 +41,8 @@ def create_ui():
|
|
| 33 |
with gr.Column(scale=1):
|
| 34 |
components[f'input_image_{prefix}'] = gr.Image(type="pil", label="Input Image", height=255)
|
| 35 |
with gr.Column(scale=2):
|
| 36 |
-
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3)
|
| 37 |
-
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3)
|
| 38 |
|
| 39 |
with gr.Row():
|
| 40 |
with gr.Column(scale=1):
|
|
@@ -52,11 +60,19 @@ def create_ui():
|
|
| 52 |
components[f'denoise_{prefix}'] = gr.Slider(label="Denoise Strength", minimum=0.0, maximum=1.0, step=0.01, value=0.55)
|
| 53 |
|
| 54 |
with gr.Row():
|
| 55 |
-
components[f'sampler_{prefix}'] = gr.Dropdown(
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
with gr.Row():
|
| 58 |
-
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=
|
| 59 |
-
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=
|
| 60 |
with gr.Row():
|
| 61 |
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
|
| 62 |
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from core.settings import MODEL_MAP_CHECKPOINT, MODEL_DEFAULTS_CONFIG
|
| 3 |
from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICES
|
| 4 |
from .ui_components import (
|
| 5 |
create_lora_settings_ui,
|
|
|
|
| 10 |
create_reference_latent_ui, create_hidream_o1_reference_ui
|
| 11 |
)
|
| 12 |
|
| 13 |
+
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
| 14 |
+
DEFAULT_STEPS = default_vals.get('steps', 20)
|
| 15 |
+
DEFAULT_CFG = default_vals.get('cfg', 5.0)
|
| 16 |
+
DEFAULT_SAMPLER = default_vals.get('sampler_name', 'euler')
|
| 17 |
+
DEFAULT_SCHEDULER = default_vals.get('scheduler', 'simple')
|
| 18 |
+
DEFAULT_POS_PROMPT = default_vals.get('positive_prompt', '')
|
| 19 |
+
DEFAULT_NEG_PROMPT = default_vals.get('negative_prompt', '')
|
| 20 |
+
|
| 21 |
def create_ui():
|
| 22 |
prefix = "hires_fix"
|
| 23 |
components = {}
|
|
|
|
| 41 |
with gr.Column(scale=1):
|
| 42 |
components[f'input_image_{prefix}'] = gr.Image(type="pil", label="Input Image", height=255)
|
| 43 |
with gr.Column(scale=2):
|
| 44 |
+
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3, value=DEFAULT_POS_PROMPT)
|
| 45 |
+
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3, value=DEFAULT_NEG_PROMPT)
|
| 46 |
|
| 47 |
with gr.Row():
|
| 48 |
with gr.Column(scale=1):
|
|
|
|
| 60 |
components[f'denoise_{prefix}'] = gr.Slider(label="Denoise Strength", minimum=0.0, maximum=1.0, step=0.01, value=0.55)
|
| 61 |
|
| 62 |
with gr.Row():
|
| 63 |
+
components[f'sampler_{prefix}'] = gr.Dropdown(
|
| 64 |
+
label="Sampler",
|
| 65 |
+
choices=SAMPLER_CHOICES,
|
| 66 |
+
value=DEFAULT_SAMPLER if DEFAULT_SAMPLER in SAMPLER_CHOICES else (SAMPLER_CHOICES[0] if SAMPLER_CHOICES else 'euler')
|
| 67 |
+
)
|
| 68 |
+
components[f'scheduler_{prefix}'] = gr.Dropdown(
|
| 69 |
+
label="Scheduler",
|
| 70 |
+
choices=SCHEDULER_CHOICES,
|
| 71 |
+
value=DEFAULT_SCHEDULER if DEFAULT_SCHEDULER in SCHEDULER_CHOICES else (SCHEDULER_CHOICES[0] if SCHEDULER_CHOICES else 'simple')
|
| 72 |
+
)
|
| 73 |
with gr.Row():
|
| 74 |
+
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=DEFAULT_STEPS)
|
| 75 |
+
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=DEFAULT_CFG)
|
| 76 |
with gr.Row():
|
| 77 |
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
|
| 78 |
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
|
ui/shared/img2img_ui.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from core.settings import MODEL_MAP_CHECKPOINT
|
| 3 |
from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICES
|
| 4 |
from .ui_components import (
|
| 5 |
create_lora_settings_ui,
|
|
@@ -10,6 +10,14 @@ from .ui_components import (
|
|
| 10 |
create_reference_latent_ui, create_hidream_o1_reference_ui
|
| 11 |
)
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
def create_ui():
|
| 14 |
prefix = "img2img"
|
| 15 |
components = {}
|
|
@@ -28,19 +36,27 @@ def create_ui():
|
|
| 28 |
components[f'input_image_{prefix}'] = gr.Image(type="pil", label="Input Image", height=255)
|
| 29 |
|
| 30 |
with gr.Column(scale=2):
|
| 31 |
-
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3)
|
| 32 |
-
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3)
|
| 33 |
|
| 34 |
with gr.Row():
|
| 35 |
with gr.Column(scale=1):
|
| 36 |
components[f'denoise_{prefix}'] = gr.Slider(label="Denoise Strength", minimum=0.0, maximum=1.0, step=0.01, value=0.7)
|
| 37 |
|
| 38 |
with gr.Row():
|
| 39 |
-
components[f'sampler_{prefix}'] = gr.Dropdown(
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
with gr.Row():
|
| 42 |
-
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=
|
| 43 |
-
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=
|
| 44 |
with gr.Row():
|
| 45 |
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
|
| 46 |
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from core.settings import MODEL_MAP_CHECKPOINT, MODEL_DEFAULTS_CONFIG
|
| 3 |
from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICES
|
| 4 |
from .ui_components import (
|
| 5 |
create_lora_settings_ui,
|
|
|
|
| 10 |
create_reference_latent_ui, create_hidream_o1_reference_ui
|
| 11 |
)
|
| 12 |
|
| 13 |
+
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
| 14 |
+
DEFAULT_STEPS = default_vals.get('steps', 20)
|
| 15 |
+
DEFAULT_CFG = default_vals.get('cfg', 5.0)
|
| 16 |
+
DEFAULT_SAMPLER = default_vals.get('sampler_name', 'euler')
|
| 17 |
+
DEFAULT_SCHEDULER = default_vals.get('scheduler', 'simple')
|
| 18 |
+
DEFAULT_POS_PROMPT = default_vals.get('positive_prompt', '')
|
| 19 |
+
DEFAULT_NEG_PROMPT = default_vals.get('negative_prompt', '')
|
| 20 |
+
|
| 21 |
def create_ui():
|
| 22 |
prefix = "img2img"
|
| 23 |
components = {}
|
|
|
|
| 36 |
components[f'input_image_{prefix}'] = gr.Image(type="pil", label="Input Image", height=255)
|
| 37 |
|
| 38 |
with gr.Column(scale=2):
|
| 39 |
+
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3, value=DEFAULT_POS_PROMPT)
|
| 40 |
+
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3, value=DEFAULT_NEG_PROMPT)
|
| 41 |
|
| 42 |
with gr.Row():
|
| 43 |
with gr.Column(scale=1):
|
| 44 |
components[f'denoise_{prefix}'] = gr.Slider(label="Denoise Strength", minimum=0.0, maximum=1.0, step=0.01, value=0.7)
|
| 45 |
|
| 46 |
with gr.Row():
|
| 47 |
+
components[f'sampler_{prefix}'] = gr.Dropdown(
|
| 48 |
+
label="Sampler",
|
| 49 |
+
choices=SAMPLER_CHOICES,
|
| 50 |
+
value=DEFAULT_SAMPLER if DEFAULT_SAMPLER in SAMPLER_CHOICES else (SAMPLER_CHOICES[0] if SAMPLER_CHOICES else 'euler')
|
| 51 |
+
)
|
| 52 |
+
components[f'scheduler_{prefix}'] = gr.Dropdown(
|
| 53 |
+
label="Scheduler",
|
| 54 |
+
choices=SCHEDULER_CHOICES,
|
| 55 |
+
value=DEFAULT_SCHEDULER if DEFAULT_SCHEDULER in SCHEDULER_CHOICES else (SCHEDULER_CHOICES[0] if SCHEDULER_CHOICES else 'simple')
|
| 56 |
+
)
|
| 57 |
with gr.Row():
|
| 58 |
+
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=DEFAULT_STEPS)
|
| 59 |
+
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=DEFAULT_CFG)
|
| 60 |
with gr.Row():
|
| 61 |
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
|
| 62 |
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
|
ui/shared/inpaint_ui.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from core.settings import MODEL_MAP_CHECKPOINT
|
| 3 |
from .ui_components import (
|
| 4 |
create_base_parameter_ui, create_lora_settings_ui,
|
| 5 |
create_controlnet_ui, create_anima_controlnet_lllite_ui, create_diffsynth_controlnet_ui, create_ipadapter_ui, create_embedding_ui,
|
|
@@ -9,6 +9,14 @@ from .ui_components import (
|
|
| 9 |
create_reference_latent_ui, create_hidream_o1_reference_ui
|
| 10 |
)
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
def create_ui():
|
| 13 |
prefix = "inpaint"
|
| 14 |
components = {}
|
|
@@ -47,8 +55,8 @@ def create_ui():
|
|
| 47 |
components[f'editor_column_{prefix}'] = editor_column
|
| 48 |
|
| 49 |
with gr.Column(scale=2) as prompts_column:
|
| 50 |
-
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=6)
|
| 51 |
-
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=6)
|
| 52 |
components[f'prompts_column_{prefix}'] = prompts_column
|
| 53 |
|
| 54 |
with gr.Row() as params_and_gallery_row:
|
|
@@ -62,11 +70,19 @@ def create_ui():
|
|
| 62 |
label="Grow Mask By", minimum=0, maximum=64, step=1, value=6
|
| 63 |
)
|
| 64 |
with gr.Row():
|
| 65 |
-
components[f'sampler_{prefix}'] = gr.Dropdown(
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
with gr.Row():
|
| 68 |
-
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=
|
| 69 |
-
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=
|
| 70 |
with gr.Row():
|
| 71 |
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
|
| 72 |
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from core.settings import MODEL_MAP_CHECKPOINT, MODEL_DEFAULTS_CONFIG
|
| 3 |
from .ui_components import (
|
| 4 |
create_base_parameter_ui, create_lora_settings_ui,
|
| 5 |
create_controlnet_ui, create_anima_controlnet_lllite_ui, create_diffsynth_controlnet_ui, create_ipadapter_ui, create_embedding_ui,
|
|
|
|
| 9 |
create_reference_latent_ui, create_hidream_o1_reference_ui
|
| 10 |
)
|
| 11 |
|
| 12 |
+
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
| 13 |
+
DEFAULT_STEPS = default_vals.get('steps', 20)
|
| 14 |
+
DEFAULT_CFG = default_vals.get('cfg', 5.0)
|
| 15 |
+
DEFAULT_SAMPLER = default_vals.get('sampler_name', 'euler')
|
| 16 |
+
DEFAULT_SCHEDULER = default_vals.get('scheduler', 'simple')
|
| 17 |
+
DEFAULT_POS_PROMPT = default_vals.get('positive_prompt', '')
|
| 18 |
+
DEFAULT_NEG_PROMPT = default_vals.get('negative_prompt', '')
|
| 19 |
+
|
| 20 |
def create_ui():
|
| 21 |
prefix = "inpaint"
|
| 22 |
components = {}
|
|
|
|
| 55 |
components[f'editor_column_{prefix}'] = editor_column
|
| 56 |
|
| 57 |
with gr.Column(scale=2) as prompts_column:
|
| 58 |
+
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=6, value=DEFAULT_POS_PROMPT)
|
| 59 |
+
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=6, value=DEFAULT_NEG_PROMPT)
|
| 60 |
components[f'prompts_column_{prefix}'] = prompts_column
|
| 61 |
|
| 62 |
with gr.Row() as params_and_gallery_row:
|
|
|
|
| 70 |
label="Grow Mask By", minimum=0, maximum=64, step=1, value=6
|
| 71 |
)
|
| 72 |
with gr.Row():
|
| 73 |
+
components[f'sampler_{prefix}'] = gr.Dropdown(
|
| 74 |
+
label="Sampler",
|
| 75 |
+
choices=SAMPLER_CHOICES,
|
| 76 |
+
value=DEFAULT_SAMPLER if DEFAULT_SAMPLER in SAMPLER_CHOICES else (SAMPLER_CHOICES[0] if SAMPLER_CHOICES else 'euler')
|
| 77 |
+
)
|
| 78 |
+
components[f'scheduler_{prefix}'] = gr.Dropdown(
|
| 79 |
+
label="Scheduler",
|
| 80 |
+
choices=SCHEDULER_CHOICES,
|
| 81 |
+
value=DEFAULT_SCHEDULER if DEFAULT_SCHEDULER in SCHEDULER_CHOICES else (SCHEDULER_CHOICES[0] if SCHEDULER_CHOICES else 'simple')
|
| 82 |
+
)
|
| 83 |
with gr.Row():
|
| 84 |
+
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=DEFAULT_STEPS)
|
| 85 |
+
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=DEFAULT_CFG)
|
| 86 |
with gr.Row():
|
| 87 |
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
|
| 88 |
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
|
ui/shared/outpaint_ui.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from core.settings import MODEL_MAP_CHECKPOINT
|
| 3 |
from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICES
|
| 4 |
from .ui_components import (
|
| 5 |
create_lora_settings_ui,
|
|
@@ -10,6 +10,14 @@ from .ui_components import (
|
|
| 10 |
create_reference_latent_ui, create_hidream_o1_reference_ui
|
| 11 |
)
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
def create_ui():
|
| 14 |
prefix = "outpaint"
|
| 15 |
components = {}
|
|
@@ -33,8 +41,8 @@ def create_ui():
|
|
| 33 |
with gr.Column(scale=1):
|
| 34 |
components[f'input_image_{prefix}'] = gr.Image(type="pil", label="Input Image", height=255)
|
| 35 |
with gr.Column(scale=2):
|
| 36 |
-
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3)
|
| 37 |
-
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3)
|
| 38 |
|
| 39 |
with gr.Row():
|
| 40 |
with gr.Column(scale=1):
|
|
@@ -48,11 +56,19 @@ def create_ui():
|
|
| 48 |
components[f'feathering_{prefix}'] = gr.Slider(label="Feathering / Grow Mask", minimum=0, maximum=100, step=1, value=10)
|
| 49 |
|
| 50 |
with gr.Row():
|
| 51 |
-
components[f'sampler_{prefix}'] = gr.Dropdown(
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
with gr.Row():
|
| 54 |
-
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=
|
| 55 |
-
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=
|
| 56 |
with gr.Row():
|
| 57 |
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
|
| 58 |
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from core.settings import MODEL_MAP_CHECKPOINT, MODEL_DEFAULTS_CONFIG
|
| 3 |
from comfy_integration.nodes import SAMPLER_CHOICES, SCHEDULER_CHOICES
|
| 4 |
from .ui_components import (
|
| 5 |
create_lora_settings_ui,
|
|
|
|
| 10 |
create_reference_latent_ui, create_hidream_o1_reference_ui
|
| 11 |
)
|
| 12 |
|
| 13 |
+
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
| 14 |
+
DEFAULT_STEPS = default_vals.get('steps', 20)
|
| 15 |
+
DEFAULT_CFG = default_vals.get('cfg', 5.0)
|
| 16 |
+
DEFAULT_SAMPLER = default_vals.get('sampler_name', 'euler')
|
| 17 |
+
DEFAULT_SCHEDULER = default_vals.get('scheduler', 'simple')
|
| 18 |
+
DEFAULT_POS_PROMPT = default_vals.get('positive_prompt', '')
|
| 19 |
+
DEFAULT_NEG_PROMPT = default_vals.get('negative_prompt', '')
|
| 20 |
+
|
| 21 |
def create_ui():
|
| 22 |
prefix = "outpaint"
|
| 23 |
components = {}
|
|
|
|
| 41 |
with gr.Column(scale=1):
|
| 42 |
components[f'input_image_{prefix}'] = gr.Image(type="pil", label="Input Image", height=255)
|
| 43 |
with gr.Column(scale=2):
|
| 44 |
+
components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3, value=DEFAULT_POS_PROMPT)
|
| 45 |
+
components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3, value=DEFAULT_NEG_PROMPT)
|
| 46 |
|
| 47 |
with gr.Row():
|
| 48 |
with gr.Column(scale=1):
|
|
|
|
| 56 |
components[f'feathering_{prefix}'] = gr.Slider(label="Feathering / Grow Mask", minimum=0, maximum=100, step=1, value=10)
|
| 57 |
|
| 58 |
with gr.Row():
|
| 59 |
+
components[f'sampler_{prefix}'] = gr.Dropdown(
|
| 60 |
+
label="Sampler",
|
| 61 |
+
choices=SAMPLER_CHOICES,
|
| 62 |
+
value=DEFAULT_SAMPLER if DEFAULT_SAMPLER in SAMPLER_CHOICES else (SAMPLER_CHOICES[0] if SAMPLER_CHOICES else 'euler')
|
| 63 |
+
)
|
| 64 |
+
components[f'scheduler_{prefix}'] = gr.Dropdown(
|
| 65 |
+
label="Scheduler",
|
| 66 |
+
choices=SCHEDULER_CHOICES,
|
| 67 |
+
value=DEFAULT_SCHEDULER if DEFAULT_SCHEDULER in SCHEDULER_CHOICES else (SCHEDULER_CHOICES[0] if SCHEDULER_CHOICES else 'simple')
|
| 68 |
+
)
|
| 69 |
with gr.Row():
|
| 70 |
+
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=DEFAULT_STEPS)
|
| 71 |
+
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=DEFAULT_CFG)
|
| 72 |
with gr.Row():
|
| 73 |
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
|
| 74 |
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
|
ui/shared/ui_components.py
CHANGED
|
@@ -4,7 +4,7 @@ from core.settings import (
|
|
| 4 |
MAX_LORAS, LORA_SOURCE_CHOICES, MAX_EMBEDDINGS, MAX_CONDITIONINGS,
|
| 5 |
MAX_CONTROLNETS, MAX_IPADAPTERS, RESOLUTION_MAP, ARCHITECTURES_CONFIG,
|
| 6 |
MODEL_MAP_CHECKPOINT, MODEL_TYPE_MAP, FEATURES_CONFIG, ARCH_CATEGORIES_MAP,
|
| 7 |
-
VAE_DIR
|
| 8 |
)
|
| 9 |
import yaml
|
| 10 |
import os
|
|
@@ -18,6 +18,13 @@ default_arch_model_type = default_architectures_dict.get(default_m_type, {}).get
|
|
| 18 |
default_arch_features = FEATURES_CONFIG.get(default_arch_model_type, FEATURES_CONFIG.get('default', {}))
|
| 19 |
default_enabled_chains = default_arch_features.get('enabled_chains', [])
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
@lru_cache(maxsize=1)
|
| 23 |
def get_ipadapter_config_from_yaml():
|
|
@@ -90,11 +97,19 @@ def create_base_parameter_ui(prefix, defaults=None):
|
|
| 90 |
components[f'width_{prefix}'] = gr.Number(label="Width", value=defaults.get('w', 1024), interactive=True)
|
| 91 |
components[f'height_{prefix}'] = gr.Number(label="Height", value=defaults.get('h', 1024), interactive=True)
|
| 92 |
with gr.Row():
|
| 93 |
-
components[f'sampler_{prefix}'] = gr.Dropdown(
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
with gr.Row():
|
| 96 |
-
|
| 97 |
-
|
| 98 |
with gr.Row():
|
| 99 |
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
|
| 100 |
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
|
|
@@ -548,7 +563,7 @@ def create_vae_override_ui(prefix: str):
|
|
| 548 |
key = lambda name: f"{name}_{prefix}"
|
| 549 |
source_choices = ["None"] + LORA_SOURCE_CHOICES
|
| 550 |
|
| 551 |
-
with gr.Accordion("VAE Settings (Override)", open=False) as vae_accordion:
|
| 552 |
components[key('vae_accordion')] = vae_accordion
|
| 553 |
gr.Markdown("💡 **Tip:** When downloading from Civitai, please use the **Version ID**, not the Model ID. You can find the Version ID in the URL (e.g., `civitai.com/models/123?modelVersionId=456`) or under the model's download button.")
|
| 554 |
with gr.Row():
|
|
|
|
| 4 |
MAX_LORAS, LORA_SOURCE_CHOICES, MAX_EMBEDDINGS, MAX_CONDITIONINGS,
|
| 5 |
MAX_CONTROLNETS, MAX_IPADAPTERS, RESOLUTION_MAP, ARCHITECTURES_CONFIG,
|
| 6 |
MODEL_MAP_CHECKPOINT, MODEL_TYPE_MAP, FEATURES_CONFIG, ARCH_CATEGORIES_MAP,
|
| 7 |
+
VAE_DIR, MODEL_DEFAULTS_CONFIG
|
| 8 |
)
|
| 9 |
import yaml
|
| 10 |
import os
|
|
|
|
| 18 |
default_arch_features = FEATURES_CONFIG.get(default_arch_model_type, FEATURES_CONFIG.get('default', {}))
|
| 19 |
default_enabled_chains = default_arch_features.get('enabled_chains', [])
|
| 20 |
|
| 21 |
+
default_vals = MODEL_DEFAULTS_CONFIG.get('Default', {})
|
| 22 |
+
DEFAULT_STEPS = default_vals.get('steps', 20)
|
| 23 |
+
DEFAULT_CFG = default_vals.get('cfg', 5.0)
|
| 24 |
+
DEFAULT_SAMPLER = default_vals.get('sampler_name', 'euler')
|
| 25 |
+
DEFAULT_SCHEDULER = default_vals.get('scheduler', 'simple')
|
| 26 |
+
DEFAULT_POS_PROMPT = default_vals.get('positive_prompt', '')
|
| 27 |
+
DEFAULT_NEG_PROMPT = default_vals.get('negative_prompt', '')
|
| 28 |
|
| 29 |
@lru_cache(maxsize=1)
|
| 30 |
def get_ipadapter_config_from_yaml():
|
|
|
|
| 97 |
components[f'width_{prefix}'] = gr.Number(label="Width", value=defaults.get('w', 1024), interactive=True)
|
| 98 |
components[f'height_{prefix}'] = gr.Number(label="Height", value=defaults.get('h', 1024), interactive=True)
|
| 99 |
with gr.Row():
|
| 100 |
+
components[f'sampler_{prefix}'] = gr.Dropdown(
|
| 101 |
+
label="Sampler",
|
| 102 |
+
choices=SAMPLER_CHOICES,
|
| 103 |
+
value=DEFAULT_SAMPLER if DEFAULT_SAMPLER in SAMPLER_CHOICES else (SAMPLER_CHOICES[0] if SAMPLER_CHOICES else 'euler')
|
| 104 |
+
)
|
| 105 |
+
components[f'scheduler_{prefix}'] = gr.Dropdown(
|
| 106 |
+
label="Scheduler",
|
| 107 |
+
choices=SCHEDULER_CHOICES,
|
| 108 |
+
value=DEFAULT_SCHEDULER if DEFAULT_SCHEDULER in SCHEDULER_CHOICES else (SCHEDULER_CHOICES[0] if SCHEDULER_CHOICES else 'simple')
|
| 109 |
+
)
|
| 110 |
with gr.Row():
|
| 111 |
+
components[f'steps_{prefix}'] = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=DEFAULT_STEPS)
|
| 112 |
+
components[f'cfg_{prefix}'] = gr.Slider(label="CFG Scale", minimum=1.0, maximum=20.0, step=0.1, value=DEFAULT_CFG)
|
| 113 |
with gr.Row():
|
| 114 |
components[f'seed_{prefix}'] = gr.Number(label="Seed (-1 for random)", value=-1, precision=0)
|
| 115 |
components[f'batch_size_{prefix}'] = gr.Slider(label="Batch Size", minimum=1, maximum=16, step=1, value=1)
|
|
|
|
| 563 |
key = lambda name: f"{name}_{prefix}"
|
| 564 |
source_choices = ["None"] + LORA_SOURCE_CHOICES
|
| 565 |
|
| 566 |
+
with gr.Accordion("VAE Settings (Override)", open=False, visible=('vae' in default_enabled_chains)) as vae_accordion:
|
| 567 |
components[key('vae_accordion')] = vae_accordion
|
| 568 |
gr.Markdown("💡 **Tip:** When downloading from Civitai, please use the **Version ID**, not the Model ID. You can find the Version ID in the URL (e.g., `civitai.com/models/123?modelVersionId=456`) or under the model's download button.")
|
| 569 |
with gr.Row():
|
yaml/file_list.yaml
CHANGED
|
@@ -685,15 +685,6 @@ file:
|
|
| 685 |
repo_id: "black-forest-labs/FLUX.1-Redux-dev"
|
| 686 |
repository_file_path: "flux1-redux-dev.safetensors"
|
| 687 |
loras:
|
| 688 |
-
# Qwen-Image
|
| 689 |
-
- filename: "Qwen-Image-2512-Lightning-4steps-V1.0-bf16.safetensors"
|
| 690 |
-
source: "hf"
|
| 691 |
-
repo_id: "lightx2v/Qwen-Image-2512-Lightning"
|
| 692 |
-
repository_file_path: "Qwen-Image-2512-Lightning-4steps-V1.0-bf16.safetensors"
|
| 693 |
-
- filename: "Qwen-Image-fp8-e4m3fn-Lightning-4steps-V1.0-bf16.safetensors"
|
| 694 |
-
source: "hf"
|
| 695 |
-
repo_id: "lightx2v/Qwen-Image-Lightning"
|
| 696 |
-
repository_file_path: "Qwen-Image-fp8-e4m3fn-Lightning-4steps-V1.0-bf16.safetensors"
|
| 697 |
# SD1.5 FaceID
|
| 698 |
- filename: "ip-adapter-faceid_sd15_lora.safetensors"
|
| 699 |
source: "hf"
|
|
|
|
| 685 |
repo_id: "black-forest-labs/FLUX.1-Redux-dev"
|
| 686 |
repository_file_path: "flux1-redux-dev.safetensors"
|
| 687 |
loras:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 688 |
# SD1.5 FaceID
|
| 689 |
- filename: "ip-adapter-faceid_sd15_lora.safetensors"
|
| 690 |
source: "hf"
|
yaml/model_defaults.yaml
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
Default:
|
| 2 |
steps: 20
|
| 3 |
cfg: 5.0
|
| 4 |
-
sampler_name: "
|
| 5 |
scheduler: "simple"
|
| 6 |
positive_prompt: ""
|
| 7 |
-
negative_prompt: ""
|
| 8 |
|
| 9 |
Ideogram-4:
|
| 10 |
_defaults:
|
|
@@ -74,8 +74,8 @@ Z-Image:
|
|
| 74 |
|
| 75 |
Qwen-Image:
|
| 76 |
_defaults:
|
| 77 |
-
steps:
|
| 78 |
-
cfg:
|
| 79 |
sampler_name: "euler"
|
| 80 |
scheduler: "simple"
|
| 81 |
|
|
|
|
| 1 |
Default:
|
| 2 |
steps: 20
|
| 3 |
cfg: 5.0
|
| 4 |
+
sampler_name: "er_sde"
|
| 5 |
scheduler: "simple"
|
| 6 |
positive_prompt: ""
|
| 7 |
+
negative_prompt: "low quality, worst quality, over-saturated, blurry, deformed, watermark"
|
| 8 |
|
| 9 |
Ideogram-4:
|
| 10 |
_defaults:
|
|
|
|
| 74 |
|
| 75 |
Qwen-Image:
|
| 76 |
_defaults:
|
| 77 |
+
steps: 20
|
| 78 |
+
cfg: 4.0
|
| 79 |
sampler_name: "euler"
|
| 80 |
scheduler: "simple"
|
| 81 |
|
yaml/model_list.yaml
CHANGED
|
@@ -94,18 +94,16 @@ Checkpoint:
|
|
| 94 |
Qwen-Image:
|
| 95 |
latent_type: sd3_latent
|
| 96 |
models:
|
| 97 |
-
- display_name: "Qwen
|
| 98 |
components:
|
| 99 |
unet: "qwen_image_2512_fp8_e4m3fn.safetensors"
|
| 100 |
vae: "qwen_image_vae.safetensors"
|
| 101 |
clip: "qwen_2.5_vl_7b_nvfp4.safetensors"
|
| 102 |
-
|
| 103 |
-
- display_name: "Qwen/Qwen-Image + Lightning-4steps-V1.0 LoRA"
|
| 104 |
components:
|
| 105 |
unet: "qwen_image_fp8_e4m3fn.safetensors"
|
| 106 |
vae: "qwen_image_vae.safetensors"
|
| 107 |
clip: "qwen_2.5_vl_7b_nvfp4.safetensors"
|
| 108 |
-
lora: "Qwen-Image-fp8-e4m3fn-Lightning-4steps-V1.0-bf16.safetensors"
|
| 109 |
LongCat-Image:
|
| 110 |
latent_type: sd3_latent
|
| 111 |
models:
|
|
|
|
| 94 |
Qwen-Image:
|
| 95 |
latent_type: sd3_latent
|
| 96 |
models:
|
| 97 |
+
- display_name: "Qwen-Image-2512"
|
| 98 |
components:
|
| 99 |
unet: "qwen_image_2512_fp8_e4m3fn.safetensors"
|
| 100 |
vae: "qwen_image_vae.safetensors"
|
| 101 |
clip: "qwen_2.5_vl_7b_nvfp4.safetensors"
|
| 102 |
+
- display_name: "Qwen-Image"
|
|
|
|
| 103 |
components:
|
| 104 |
unet: "qwen_image_fp8_e4m3fn.safetensors"
|
| 105 |
vae: "qwen_image_vae.safetensors"
|
| 106 |
clip: "qwen_2.5_vl_7b_nvfp4.safetensors"
|
|
|
|
| 107 |
LongCat-Image:
|
| 108 |
latent_type: sd3_latent
|
| 109 |
models:
|