mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-03-14 01:19:49 +00:00
set CUDA_VISIBLE_DEVICES with args
This commit is contained in:
@@ -39,6 +39,10 @@ def initialize_forge():
|
||||
|
||||
args_parser.args, _ = args_parser.parser.parse_known_args()
|
||||
|
||||
if args_parser.args.gpu_device_id is not None:
|
||||
os.environ['CUDA_VISIBLE_DEVICES'] = str(args_parser.args.gpu_device_id)
|
||||
print("Set device to:", args_parser.args.gpu_device_id)
|
||||
|
||||
import ldm_patched.modules.model_management as model_management
|
||||
import torch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user