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.

--disable-smart-memory now disables loading model directly to vram.

comfyanonymouse9469e732d8c
diff --git a/comfy/model_management.py b/comfy/model_management.py
index 5c5d5ab74..80f6620a0 100644
--- a/comfy/model_management.py
+++ b/comfy/model_management.py
@@ -397,6 +397,9 @@ def unet_inital_load_device(parameters, dtype):
return torch_dev
cpu_dev = torch.device("cpu")
+ if DISABLE_SMART_MEMORY:
+ return cpu_dev
+
dtype_size = 4
if dtype == torch.float16 or dtype == torch.bfloat16:
dtype_size = 2