32 lines
1.5 KiB
Python
32 lines
1.5 KiB
Python
import ldm_patched.modules.args_parser as args_parser
|
|
|
|
|
|
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.")
|
|
|
|
args_parser.parser.add_argument("--language", type=str, default='default',
|
|
help="Translate UI using json files in [language] folder. "
|
|
"For example, [--language example] will use [language/example.json] for translation.")
|
|
|
|
# For example, https://github.com/lllyasviel/Fooocus/issues/849
|
|
args_parser.parser.add_argument("--disable-offload-from-vram", action="store_true",
|
|
help="Force loading models to vram when the unload can be avoided. "
|
|
"Some Mac users may need this.")
|
|
|
|
args_parser.parser.add_argument("--theme", type=str, help="launches the UI with light or dark theme", default=None)
|
|
args_parser.parser.add_argument("--disable-image-log", action='store_true',
|
|
help="Prevent writing images and logs to hard drive.")
|
|
|
|
args_parser.parser.set_defaults(
|
|
disable_cuda_malloc=True,
|
|
auto_launch=True,
|
|
port=None
|
|
)
|
|
|
|
args_parser.args = args_parser.parser.parse_args()
|
|
|
|
# (Disable by default because of issues like https://github.com/lllyasviel/Fooocus/issues/724)
|
|
args_parser.args.always_offload_from_vram = not args_parser.args.disable_offload_from_vram
|
|
|
|
args = args_parser.args
|