From e78be27e7540ac33ed6b5668ed5e71f55a5f7667 Mon Sep 17 00:00:00 2001 From: Won-Kyu Park Date: Sat, 12 Oct 2024 22:49:14 +0900 Subject: [PATCH] add --cuda-malloc, --disable-cuda-malloc cmd args --- modules/cmd_args.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/cmd_args.py b/modules/cmd_args.py index d71982b2c12..2947ec395e6 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -9,6 +9,9 @@ parser.add_argument("--update-all-extensions", action='store_true', help="launch.py argument: download updates for all extensions when starting the program") parser.add_argument("--skip-python-version-check", action='store_true', help="launch.py argument: do not check python version") parser.add_argument("--skip-torch-cuda-test", action='store_true', help="launch.py argument: do not check if CUDA is able to work properly") +cm_group = parser.add_mutually_exclusive_group() +cm_group.add_argument("--cuda-malloc", action='store_true', help="Enable cudaMallocAsync (enabled by default for torch 2.0 and up).") +cm_group.add_argument("--disable-cuda-malloc", action="store_true", help="Disable cudaMallocAsync.") parser.add_argument("--reinstall-xformers", action='store_true', help="launch.py argument: install the appropriate version of xformers even if you have some version already installed") parser.add_argument("--reinstall-torch", action='store_true', help="launch.py argument: install the appropriate version of torch even if you have some version already installed") parser.add_argument("--update-check", action='store_true', help="launch.py argument: check for updates at startup")