mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
feat: use args temp path if given
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import ldm_patched.modules.args_parser as args_parser
|
||||
import os
|
||||
|
||||
from tempfile import gettempdir
|
||||
|
||||
args_parser.parser.add_argument("--share", action='store_true', help="Set whether to share on Gradio.")
|
||||
args_parser.parser.add_argument("--preset", type=str, default=None, help="Apply specified UI preset.")
|
||||
@@ -34,7 +36,11 @@ args_parser.args.always_offload_from_vram = not args_parser.args.disable_offload
|
||||
if args_parser.args.disable_analytics:
|
||||
import os
|
||||
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
|
||||
|
||||
if args_parser.args.disable_in_browser:
|
||||
args_parser.args.in_browser = False
|
||||
|
||||
if args_parser.args.temp_path is None:
|
||||
args_parser.args.temp_path = os.path.join(gettempdir(), 'Fooocus')
|
||||
|
||||
args = args_parser.args
|
||||
|
||||
Reference in New Issue
Block a user