mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
Merge branch 'main_upstream' into hotfix/prevent-skipping-and-stopping-by-other-users
This commit is contained in:
+14
-11
@@ -36,6 +36,7 @@ def worker():
|
||||
import modules.advanced_parameters as advanced_parameters
|
||||
import extras.ip_adapter as ip_adapter
|
||||
import extras.face_crop
|
||||
import fooocus_version
|
||||
|
||||
from modules.sdxl_styles import apply_style, apply_wildcards, fooocus_expansion
|
||||
from modules.private_logger import log
|
||||
@@ -279,9 +280,10 @@ def worker():
|
||||
inpaint_image = HWC3(inpaint_image)
|
||||
if isinstance(inpaint_image, np.ndarray) and isinstance(inpaint_mask, np.ndarray) \
|
||||
and (np.any(inpaint_mask > 127) or len(outpaint_selections) > 0):
|
||||
progressbar(async_task, 1, 'Downloading upscale models ...')
|
||||
modules.config.downloading_upscale_model()
|
||||
if inpaint_parameterized:
|
||||
progressbar(async_task, 1, 'Downloading inpainter ...')
|
||||
modules.config.downloading_upscale_model()
|
||||
inpaint_head_model_path, inpaint_patch_model_path = modules.config.downloading_inpaint_models(
|
||||
advanced_parameters.inpaint_engine)
|
||||
base_model_additional_loras += [(inpaint_patch_model_path, 1.0)]
|
||||
@@ -399,8 +401,8 @@ def worker():
|
||||
uc=None,
|
||||
positive_top_k=len(positive_basic_workloads),
|
||||
negative_top_k=len(negative_basic_workloads),
|
||||
log_positive_prompt='; '.join([task_prompt] + task_extra_positive_prompts),
|
||||
log_negative_prompt='; '.join([task_negative_prompt] + task_extra_negative_prompts),
|
||||
log_positive_prompt='\n'.join([task_prompt] + task_extra_positive_prompts),
|
||||
log_negative_prompt='\n'.join([task_negative_prompt] + task_extra_negative_prompts),
|
||||
))
|
||||
|
||||
if use_expansion:
|
||||
@@ -495,7 +497,7 @@ def worker():
|
||||
|
||||
if direct_return:
|
||||
d = [('Upscale (Fast)', '2x')]
|
||||
log(uov_input_image, d, single_line_number=1)
|
||||
log(uov_input_image, d)
|
||||
yield_result(async_task, uov_input_image, do_not_show_finished_images=True)
|
||||
return
|
||||
|
||||
@@ -779,12 +781,13 @@ def worker():
|
||||
('Refiner Switch', refiner_switch),
|
||||
('Sampler', sampler_name),
|
||||
('Scheduler', scheduler_name),
|
||||
('Seed', task['task_seed'])
|
||||
('Seed', task['task_seed']),
|
||||
]
|
||||
for n, w in loras:
|
||||
for li, (n, w) in enumerate(loras):
|
||||
if n != 'None':
|
||||
d.append((f'LoRA [{n}] weight', w))
|
||||
log(x, d, single_line_number=3)
|
||||
d.append((f'LoRA {li + 1}', f'{n} : {w}'))
|
||||
d.append(('Version', 'v' + fooocus_version.version))
|
||||
log(x, d)
|
||||
|
||||
yield_result(async_task, imgs, do_not_show_finished_images=len(tasks) == 1)
|
||||
except ldm_patched.modules.model_management.InterruptProcessingException as e:
|
||||
@@ -807,12 +810,12 @@ def worker():
|
||||
task = async_tasks.pop(0)
|
||||
try:
|
||||
handler(task)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
finally:
|
||||
build_image_wall(task)
|
||||
task.yields.append(['finish', task.results])
|
||||
pipeline.prepare_text_encoder(async_call=True)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
task.yields.append(['finish', task.results])
|
||||
pass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user