Merge branch 'jpg_config_image_extension'

# Conflicts:
#	modules/async_worker.py
#	modules/config.py
#	modules/flags.py
#	webui.py
This commit is contained in:
Manuel Schmid
2024-01-14 23:22:03 +01:00
8 changed files with 51 additions and 21 deletions
+7 -4
View File
@@ -134,6 +134,7 @@ def worker():
performance_selection = args.pop()
aspect_ratios_selection = args.pop()
image_number = args.pop()
image_extension = args.pop()
image_seed = args.pop()
sharpness = args.pop()
guidance_scale = args.pop()
@@ -390,6 +391,7 @@ def worker():
progressbar(async_task, 3, 'Processing prompts ...')
tasks = []
for i in range(image_number):
task_seed = (seed + i) % (constants.MAX_SEED + 1) # randint is inclusive, % is not
task_rng = random.Random(task_seed) # may bind to inpaint noise in the future
@@ -525,8 +527,8 @@ def worker():
if direct_return:
d = [('Upscale (Fast)', '2x')]
log(uov_input_image, d)
yield_result(async_task, uov_input_image, do_not_show_finished_images=True)
uov_input_image_path = log(uov_input_image, d, image_extension)
yield_result(async_task, uov_input_image_path, do_not_show_finished_images=True)
return
tiled = True
@@ -790,6 +792,7 @@ def worker():
if inpaint_worker.current_task is not None:
imgs = [inpaint_worker.current_task.post_process(x) for x in imgs]
img_paths = []
for x in imgs:
d = [
('Prompt', task['log_positive_prompt']),
@@ -816,9 +819,9 @@ def worker():
if n != 'None':
d.append((f'LoRA {li + 1}', f'{n} : {w}'))
d.append(('Version', 'v' + fooocus_version.version))
log(x, d)
img_paths.append(log(x, d, image_extension))
yield_result(async_task, imgs, do_not_show_finished_images=len(tasks) == 1, progressbar_index=int(15.0 + 85.0 * float((current_task_id + 1) * steps) / float(all_steps)))
yield_result(async_task, img_paths, do_not_show_finished_images=len(tasks) == 1, progressbar_index=int(15.0 + 85.0 * float((current_task_id + 1) * steps) / float(all_steps)))
except ldm_patched.modules.model_management.InterruptProcessingException as e:
if async_task.last_stop == 'skip':
print('User skipped')