From e9469e732d8c84048dcf4c94604607c92e5297df Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sun, 20 Aug 2023 04:00:53 -0400 Subject: [PATCH] --disable-smart-memory now disables loading model directly to vram. --- comfy/model_management.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/comfy/model_management.py b/comfy/model_management.py index 5c5d5ab7..80f6620a 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