diff options
author | Extraltodeus <extraltodeus@gmail.com> | 2022-10-21 22:12:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 22:12:46 +0000 |
commit | 29bfacd63cb5c73b9643d94f255cca818fd49d9c (patch) | |
tree | 7dbc6f9fb1498685e158d7fb2f69720eddae35ce /modules/shared.py | |
parent | 57eb54b838faa383c10079e1bb5471b7bee6a695 (diff) | |
download | stable-diffusion-webui-gfx803-29bfacd63cb5c73b9643d94f255cca818fd49d9c.tar.gz stable-diffusion-webui-gfx803-29bfacd63cb5c73b9643d94f255cca818fd49d9c.tar.bz2 stable-diffusion-webui-gfx803-29bfacd63cb5c73b9643d94f255cca818fd49d9c.zip |
implement CUDA device selection, --device-id arg
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py index 41d7f08e..03032a47 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -80,6 +80,7 @@ parser.add_argument('--vae-path', type=str, help='Path to Variational Autoencode parser.add_argument("--disable-safe-unpickle", action='store_true', help="disable checking pytorch models for malicious code", default=False)
parser.add_argument("--api", action='store_true', help="use api=True to launch the api with the webui")
parser.add_argument("--nowebui", action='store_true', help="use api=True to launch the api instead of the webui")
+parser.add_argument("--device-id", type=str, help="Select the default CUDA device to use (export CUDA_VISIBLE_DEVICES=0,1,etc might be needed before)", default=None)
cmd_opts = parser.parse_args()
restricted_opts = [
|