Commit e9469e73 authored by comfyanonymous's avatar comfyanonymous
Browse files

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

parent c9b562ae
...@@ -397,6 +397,9 @@ def unet_inital_load_device(parameters, dtype): ...@@ -397,6 +397,9 @@ def unet_inital_load_device(parameters, dtype):
return torch_dev return torch_dev
cpu_dev = torch.device("cpu") cpu_dev = torch.device("cpu")
if DISABLE_SMART_MEMORY:
return cpu_dev
dtype_size = 4 dtype_size = 4
if dtype == torch.float16 or dtype == torch.bfloat16: if dtype == torch.float16 or dtype == torch.bfloat16:
dtype_size = 2 dtype_size = 2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment