--disable-image-log
This commit is contained in:
parent
943098f8da
commit
3b97e49dd8
@ -16,6 +16,8 @@ fcbh_cli.parser.add_argument("--enable-smart-memory", action="store_true",
|
||||
"Some Mac users may need this.")
|
||||
|
||||
fcbh_cli.parser.add_argument("--theme", type=str, help="launches the UI with light or dark theme", default=None)
|
||||
fcbh_cli.parser.add_argument("--disable-image-log", action='store_true',
|
||||
help="Prevent writing images and logs to hard drive.")
|
||||
|
||||
fcbh_cli.parser.set_defaults(
|
||||
disable_cuda_malloc=True,
|
||||
|
@ -1 +1 @@
|
||||
version = '2.1.819'
|
||||
version = '2.1.820'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import os
|
||||
import args_manager
|
||||
import modules.config
|
||||
|
||||
from PIL import Image
|
||||
@ -16,6 +17,9 @@ def get_current_html_path():
|
||||
|
||||
|
||||
def log(img, dic, single_line_number=3):
|
||||
if args_manager.args.disable_image_log:
|
||||
return
|
||||
|
||||
date_string, local_temp_filename, only_name = generate_temp_filename(folder=modules.config.path_outputs, extension='png')
|
||||
os.makedirs(os.path.dirname(local_temp_filename), exist_ok=True)
|
||||
Image.fromarray(img).save(local_temp_filename)
|
||||
|
@ -1,3 +1,7 @@
|
||||
# 2.1.820
|
||||
|
||||
* support "--disable-image-log" to prevent writing images and logs to hard drive.
|
||||
|
||||
# 2.1.819
|
||||
|
||||
* Allow disabling preview in dev tools.
|
||||
|
3
webui.py
3
webui.py
@ -222,7 +222,8 @@ with shared.gradio_root:
|
||||
|
||||
seed_random.change(random_checked, inputs=[seed_random], outputs=[image_seed], queue=False)
|
||||
|
||||
gr.HTML(f'<a href="/file={get_current_html_path()}" target="_blank">\U0001F4DA History Log</a>')
|
||||
if not args_manager.args.disable_image_log:
|
||||
gr.HTML(f'<a href="/file={get_current_html_path()}" target="_blank">\U0001F4DA History Log</a>')
|
||||
|
||||
with gr.Tab(label='Style'):
|
||||
style_sorter.try_load_sorted_styles(
|
||||
|
Loading…
Reference in New Issue
Block a user