This commit is contained in:
lllyasviel
2023-11-05 03:44:18 -08:00
parent b95c7378c9
commit 49f47a6f5e
4 changed files with 16 additions and 20 deletions
+14 -5
View File
@@ -10,11 +10,20 @@ fcbh_cli.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.")
fcbh_cli.args = fcbh_cli.parser.parse_args()
fcbh_cli.args.disable_cuda_malloc = True
fcbh_cli.args.auto_launch = True
# For example, https://github.com/lllyasviel/Fooocus/issues/849
fcbh_cli.parser.add_argument("--enable-smart-memory", action="store_true",
help="Force loading models to vram when the unload can be avoided. "
"Some Mac users may need this.")
if getattr(fcbh_cli.args, 'port', 8188) == 8188:
fcbh_cli.args.port = None
fcbh_cli.parser.set_defaults(
disable_cuda_malloc=True,
auto_launch=True,
port=None
)
fcbh_cli.args = fcbh_cli.parser.parse_args()
# Disable by default because of issues like https://github.com/lllyasviel/Fooocus/issues/724
fcbh_cli.args.disable_smart_memory = not fcbh_cli.args.enable_smart_memory
args = fcbh_cli.args