* fix

* fix

* fix
This commit is contained in:
lllyasviel 2023-10-04 15:43:41 -07:00 committed by GitHub
parent 8bfc90202d
commit aebfc56641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 10 deletions

View File

@ -1 +1 @@
version = '2.0.89'
version = '2.0.90'

View File

@ -8,6 +8,7 @@ outputs = []
def worker():
global buffer, outputs
import traceback
import numpy as np
import torch
import time
@ -46,8 +47,8 @@ def worker():
def handler(task):
execution_start_time = time.perf_counter()
prompt, negative_prompt, style_selections, performance_selction, \
aspect_ratios_selction, image_number, image_seed, sharpness, adm_scaler_positive, adm_scaler_negative, guidance_scale, adaptive_cfg, sampler_name, scheduler_name, \
prompt, negative_prompt, style_selections, performance_selection, \
aspect_ratios_selection, image_number, image_seed, sharpness, adm_scaler_positive, adm_scaler_negative, guidance_scale, adaptive_cfg, sampler_name, scheduler_name, \
overwrite_step, overwrite_switch, overwrite_width, overwrite_height, overwrite_vary_strength, overwrite_upscale_strength, \
base_model_name, refiner_model_name, \
l1, w1, l2, w2, l3, w3, l4, w4, l5, w5, \
@ -89,7 +90,7 @@ def worker():
tiled = False
inpaint_worker.current_task = None
if performance_selction == 'Speed':
if performance_selection == 'Speed':
steps = 30
switch = 20
else:
@ -104,7 +105,7 @@ def worker():
pipeline.clear_all_caches() # save memory
width, height = aspect_ratios[aspect_ratios_selction]
width, height = aspect_ratios[aspect_ratios_selection]
if overwrite_width > 0:
width = overwrite_width
@ -400,7 +401,7 @@ def worker():
('Negative Prompt', raw_negative_prompt),
('Fooocus V2 Expansion', task['expansion']),
('Styles', str(raw_style_selections)),
('Performance', performance_selction),
('Performance', performance_selection),
('Resolution', str((width, height))),
('Sharpness', sharpness),
('Guidance Scale', guidance_scale),
@ -433,7 +434,11 @@ def worker():
time.sleep(0.01)
if len(buffer) > 0:
task = buffer.pop(0)
handler(task)
try:
handler(task)
except:
traceback.print_exc()
outputs.append(['results', []])
pass

View File

@ -112,8 +112,8 @@ with shared.gradio_root:
with gr.Column(scale=0.5, visible=False) as right_col:
with gr.Tab(label='Setting'):
performance_selction = gr.Radio(label='Performance', choices=['Speed', 'Quality'], value='Speed')
aspect_ratios_selction = gr.Radio(label='Aspect Ratios', choices=list(aspect_ratios.keys()),
performance_selection = gr.Radio(label='Performance', choices=['Speed', 'Quality'], value='Speed')
aspect_ratios_selection = gr.Radio(label='Aspect Ratios', choices=list(aspect_ratios.keys()),
value='1152×896', info='width × height')
image_number = gr.Slider(label='Image Number', minimum=1, maximum=32, step=1, value=2)
negative_prompt = gr.Textbox(label='Negative Prompt', show_label=True, placeholder="Type prompt here.",
@ -211,7 +211,7 @@ with shared.gradio_root:
advanced_checkbox.change(lambda x: gr.update(visible=x), advanced_checkbox, right_col, queue=False)
ctrls = [
prompt, negative_prompt, style_selections,
performance_selction, aspect_ratios_selction, image_number, image_seed, sharpness, adm_scaler_positive, adm_scaler_negative, guidance_scale, adaptive_cfg, sampler_name, scheduler_name
performance_selection, aspect_ratios_selection, image_number, image_seed, sharpness, adm_scaler_positive, adm_scaler_negative, guidance_scale, adaptive_cfg, sampler_name, scheduler_name
]
ctrls += overwrite_ctrls
ctrls += [base_model, refiner_model] + lora_ctrls