Skip to content

Commit

Permalink
resolves issue #1
Browse files Browse the repository at this point in the history
where swapped face outputs were not saved to the directory
  • Loading branch information
machineminded committed Jan 29, 2024
1 parent dce7b6b commit a11c05d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/async_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,10 @@ def callback(step, x0, x, total_steps, y):
if inpaint_worker.current_task is not None:
imgs = [inpaint_worker.current_task.post_process(x) for x in imgs]

if inswapper_enabled and input_image_checkbox:
print("Lets swap some faces!")
imgs = perform_face_swap(imgs, inswapper_source_image, inswapper_target_image_index)

for x in imgs:
d = [
('Prompt', task['log_positive_prompt']),
Expand Down Expand Up @@ -809,10 +813,6 @@ def callback(step, x0, x, total_steps, y):
d.append(('Version', 'v' + fooocus_version.version))
log(x, d)

if inswapper_enabled and input_image_checkbox:
print("Lets swap some faces!")
imgs = perform_face_swap(imgs, inswapper_source_image, inswapper_target_image_index)

yield_result(async_task, imgs, do_not_show_finished_images=len(tasks) == 1)
except ldm_patched.modules.model_management.InterruptProcessingException as e:
if shared.last_stop == 'skip':
Expand Down

0 comments on commit a11c05d

Please sign in to comment.