Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

fix --cuda-device arg for AMD/HIP devices (#5586)

Bratzmeistera72d152b0c87
diff --git a/main.py b/main.py
index c23210861..05eb31c7a 100644
--- a/main.py
+++ b/main.py
@@ -71,6 +71,7 @@ if os.name == "nt":
if __name__ == "__main__":
if args.cuda_device is not None:
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.cuda_device)
+ os.environ['HIP_VISIBLE_DEVICES'] = str(args.cuda_device)
logging.info("Set cuda device to: {}".format(args.cuda_device))
if args.deterministic: