Dynamic VRAM unloading still doesn't seem to work on windows
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
File "F:\Content\ComfyUI\execution.py", line 305, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "F:\Content\ComfyUI\execution.py", line 293, in process_inputs
result = f(**inputs)
File "F:\Content\ComfyUI\nodes.py", line 969, in load_unet
model = comfy.sd.load_diffusion_model(unet_path, model_options=model_options)
File "F:\Content\ComfyUI\comfy\sd.py", line 1686, in load_diffusion_model
sd, metadata = comfy.utils.load_torch_file(unet_path, return_metadata=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Content\ComfyUI\comfy\utils.py", line 132, in load_torch_file
raise e
File "F:\Content\ComfyUI\comfy\utils.py", line 112, in load_torch_file
sd, metadata = load_safetensors(ckpt)
~~~~~~~~~~~~~~~~^^^^^^
File "F:\Content\ComfyUI\comfy\utils.py", line 100, in load_safetensors
sd[name] = data_area[start:end].view(_TYPES[info["dtype"]]).view(info["shape"])
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: self.storage_offset() must be divisible by 4 to view Byte as Float (different element sizes), but got 595403
Prompt executed in 14.97 seconds
### Actual Behavior
error
### Steps to Reproduce
every times
### Debug Logs
```powershell
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
Found quantization metadata version 1
Using MixedPrecisionOps for text encoder
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
Requested to load WanVAE
Model WanVAE prepared for dynamic VRAM loading. 484MB Staged. 0 patches attached.
FETCH ComfyRegistry Data: 70/123
Model WanVAE prepared for dynamic VRAM loading. 484MB Staged. 0 patches attached.
Requested to load QwenImageTEModel_
Model QwenImageTEModel_ prepared for dynamic VRAM loading. 7910MB Staged. 0 patches attached.
FETCH ComfyRegistry Data: 75/123
FETCH ComfyRegistry Data: 80/123
0 models unloaded.
Model WanVAE prepared for dynamic VRAM loading. 484MB Staged. 0 patches attached.
0 models unloaded.
Model WanVAE prepared for dynamic VRAM loading. 484MB Staged. 0 patches attached.
Model QwenImageTEModel_ prepared for dynamic VRAM loading. 7910MB Staged. 0 patches attached.
FETCH ComfyRegistry Data: 85/123
!!! Exception during processing !!! self.storage_offset() must be divisible by 4 to view Byte as Float (different element sizes), but got 595403
Traceback (most recent call last):
File "F:\Content\ComfyUI\execution.py", line 527, in execute
output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Content\ComfyUI\execution.py", line 331, in get_output_data
return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Content\ComfyUI\execution.py", line 305, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "F:\Content\ComfyUI\execution.py", line 293, in process_inputs
result = f(**inputs)
File "F:\Content\ComfyUI\nodes.py", line 969, in load_unet
model = comfy.sd.load_diffusion_model(unet_path, model_options=model_options)
File "F:\Content\ComfyUI\comfy\sd.py", line 1686, in load_diffusion_model
sd, metadata = comfy.utils.load_torch_file(unet_path, return_metadata=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Content\ComfyUI\comfy\utils.py", line 132, in load_torch_file
raise e
File "F:\Content\ComfyUI\comfy\utils.py", line 112, in load_torch_file
sd, metadata = load_safetensors(ckpt)
~~~~~~~~~~~~~~~~^^^^^^
File "F:\Content\ComfyUI\comfy\utils.py", line 100, in load_safetensors
sd[name] = data_area[start:end].view(_TYPES[info["dtype"]]).view(info["shape"])
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: self.storage_offset() must be divisible by 4 to view Byte as Float (different element sizes), but got 595403
Prompt executed in 14.97 seconds
```
### Other
Trying to use dynamic VRAM test qwen edit 2511 but getting the same error every time.
Contributor guide
Assessment
This issue has not been assessed yet.