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.

feat: ComfyUI can be run on the specified Ascend NPU (#9663)

Rui Wang (王瑞)1364548c721a
diff --git a/main.py b/main.py
index c33f0e17b..70696fcc3 100644
--- a/main.py
+++ b/main.py
@@ -127,6 +127,7 @@ 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)
+ os.environ["ASCEND_RT_VISIBLE_DEVICES"] = str(args.cuda_device)
logging.info("Set cuda device to: {}".format(args.cuda_device))
if args.oneapi_device_selector is not None: