mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
add debug mode
This commit is contained in:
@@ -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:
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user