fix refiner
This commit is contained in:
parent
5cbefa821f
commit
f07f7693d3
@ -1 +1 @@
|
||||
version = '2.1.751'
|
||||
version = '2.1.752'
|
||||
|
@ -80,6 +80,7 @@ def worker():
|
||||
guidance_scale = args.pop()
|
||||
base_model_name = args.pop()
|
||||
refiner_model_name = args.pop()
|
||||
refiner_switch = args.pop()
|
||||
loras = [(args.pop(), args.pop()) for _ in range(5)]
|
||||
input_image_checkbox = args.pop()
|
||||
current_tab = args.pop()
|
||||
@ -147,10 +148,8 @@ def worker():
|
||||
|
||||
if performance_selection == 'Speed':
|
||||
steps = 30
|
||||
switch = 20
|
||||
else:
|
||||
steps = 60
|
||||
switch = 40
|
||||
|
||||
sampler_name = advanced_parameters.sampler_name
|
||||
scheduler_name = advanced_parameters.scheduler_name
|
||||
@ -171,10 +170,8 @@ def worker():
|
||||
else:
|
||||
if performance_selection == 'Speed':
|
||||
steps = 18
|
||||
switch = 12
|
||||
else:
|
||||
steps = 36
|
||||
switch = 24
|
||||
progressbar(1, 'Downloading upscale models ...')
|
||||
modules.path.downloading_upscale_model()
|
||||
if (current_tab == 'inpaint' or (current_tab == 'ip' and advanced_parameters.mixing_image_prompt_and_inpaint))\
|
||||
@ -206,6 +203,8 @@ def worker():
|
||||
pipeline.refresh_controlnets([controlnet_canny_path, controlnet_cpds_path])
|
||||
ip_adapter.load_ip_adapter(clip_vision_path, ip_negative_path, ip_adapter_path)
|
||||
|
||||
switch = int(round(steps * refiner_switch))
|
||||
|
||||
if advanced_parameters.overwrite_step > 0:
|
||||
steps = advanced_parameters.overwrite_step
|
||||
|
||||
|
@ -91,6 +91,11 @@ default_refiner_model_name = get_config_item_or_set_default(
|
||||
default_value='sd_xl_refiner_1.0_0.9vae.safetensors',
|
||||
validator=lambda x: isinstance(x, str)
|
||||
)
|
||||
default_refiner_switch = get_config_item_or_set_default(
|
||||
key='default_refiner_switch',
|
||||
default_value=0.8,
|
||||
validator=lambda x: isinstance(x, float)
|
||||
)
|
||||
default_lora_name = get_config_item_or_set_default(
|
||||
key='default_lora',
|
||||
default_value='sd_xl_offset_example-lora_1.0.safetensors',
|
||||
|
@ -2,6 +2,7 @@
|
||||
"default_model": "bluePencilXL_v050.safetensors",
|
||||
"default_refiner": "DreamShaper_8_pruned.safetensors",
|
||||
"default_lora": "sd_xl_offset_example-lora_1.0.safetensors",
|
||||
"default_refiner_switch": 0.667,
|
||||
"default_lora_weight": 0.5,
|
||||
"default_cfg_scale": 7.0,
|
||||
"default_sampler": "dpmpp_2m_sde_gpu",
|
||||
|
5
webui.py
5
webui.py
@ -253,6 +253,9 @@ with shared.gradio_root:
|
||||
info='Higher value means image and texture are sharper.')
|
||||
guidance_scale = gr.Slider(label='Guidance Scale', minimum=1.0, maximum=30.0, step=0.01, value=modules.path.default_cfg_scale,
|
||||
info='Higher value means style is cleaner, vivider, and more artistic.')
|
||||
refiner_switch = gr.Slider(label='Refiner Switch At', minimum=0.0, maximum=1.0, step=0.0001,
|
||||
info='When to switch from base model to the refiner (if refiner is used).',
|
||||
value=modules.path.default_refiner_switch)
|
||||
|
||||
gr.HTML('<a href="https://github.com/lllyasviel/Fooocus/discussions/117" target="_blank">\U0001F4D4 Document</a>')
|
||||
dev_mode = gr.Checkbox(label='Developer Debug Mode', value=False, container=False)
|
||||
@ -361,7 +364,7 @@ with shared.gradio_root:
|
||||
performance_selection, aspect_ratios_selection, image_number, image_seed, sharpness, guidance_scale
|
||||
]
|
||||
|
||||
ctrls += [base_model, refiner_model] + lora_ctrls
|
||||
ctrls += [base_model, refiner_model, refiner_switch] + lora_ctrls
|
||||
ctrls += [input_image_checkbox, current_tab]
|
||||
ctrls += [uov_method, uov_input_image]
|
||||
ctrls += [outpaint_selections, inpaint_input_image]
|
||||
|
Loading…
Reference in New Issue
Block a user