Skip to content

Commit

Permalink
fix a bug:
Browse files Browse the repository at this point in the history
If you use `--disable-metadata` or `--disable-image-log`, it will cause args to pop up an exception, which is unique to the API
  • Loading branch information
mrhan1993 committed Nov 27, 2024
1 parent 98b10c1 commit a7f7650
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions modules/async_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,22 @@ def __init__(self, args, task_id=uuid.uuid4().hex):
self.inpaint_advanced_masking_checkbox = args.pop()
self.invert_mask_checkbox = args.pop()
self.inpaint_erode_or_dilate = args.pop()
self.save_final_enhanced_image_only = args.pop() if not args_manager.args.disable_image_log else False
self.save_metadata_to_images = args.pop() if not args_manager.args.disable_metadata else False
self.metadata_scheme = MetadataScheme(
args.pop()) if not args_manager.args.disable_metadata else MetadataScheme.FOOOCUS

if not args_manager.args.disable_image_log:
self.save_final_enhanced_image_only = args.pop()
else:
self.save_final_enhanced_image_only = False
args.pop()
if not args_manager.args.disable_metadata:
self.save_metadata_to_images = args.pop()
else:
self.save_metadata_to_images = False
args.pop()
if args_manager.args.disable_metadata:
self.metadata_scheme = MetadataScheme(args.pop())
else:
self.metadata_scheme = MetadataScheme.FOOOCUS
args.pop()

self.cn_tasks = {x: [] for x in ip_list}
for _ in range(modules.config.default_controlnet_image_count):
Expand Down

0 comments on commit a7f7650

Please sign in to comment.