diff --git a/launch.py b/launch.py index f80e9ae72..995f61894 100644 --- a/launch.py +++ b/launch.py @@ -98,7 +98,7 @@ if __name__ == "__main__": setup.log.debug('Starting WebUI') logging.disable(logging.INFO) if args.test: - setup.log.info(f"Test only") + setup.log.info("Test only") import webui exit(0) else: diff --git a/modules/img2img.py b/modules/img2img.py index de889d4b7..fc7165751 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -60,7 +60,7 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): if processed_image.mode == 'RGBA': processed_image = processed_image.convert("RGB") processed_image.save(os.path.join(output_dir, filename)) - if cmd_opts.debug: + if cmd_opts.get('debug', False): log.info(f'Processed: {len(images)} Memory: {memory_stats()} batch') @@ -146,6 +146,6 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s processed = process_images(p) p.close() generation_info_js = processed.js() - if cmd_opts.debug: + if cmd_opts.get('debug', False): log.info(f'Processed: {len(processed.images)} Memory: {memory_stats()} img') return processed.images, generation_info_js, plaintext_to_html(processed.info), plaintext_to_html(processed.comments) diff --git a/modules/txt2img.py b/modules/txt2img.py index 17e5ce909..45541749b 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -46,6 +46,6 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step processed = process_images(p) p.close() generation_info_js = processed.js() - if cmd_opts.debug: + if cmd_opts.get('debug', False): log.info(f'Processed: {len(processed.images)} Memory: {memory_stats()} txt') return processed.images, generation_info_js, plaintext_to_html(processed.info), plaintext_to_html(processed.comments)