Comfy-Org / Comfy-Org/ComfyUI

Cannot allocate memory, But VRAM has 80G, that is absolutely enough. Why does it affect model weight loading? Isn't it loaded into the video memory?

Open
#9,178 3 comments 0 reactions 0 assignees View on GitHub
bug-cop:response-received User Support
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

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)

### Your question

!!! Exception during processing !!! unable to mmap 34211675392 bytes from file : Cannot allocate memory (12) Traceback (most recent call last): File "/dev/text2image/Comfyui/ComfyUI-master/execution.py", line 349, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/dev/text2image/Comfyui/ComfyUI-master/execution.py", line 224, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/dev/text2image/Comfyui/ComfyUI-master/execution.py", line 196, in _map_node_over_list process_inputs(input_dict, i) File "/dev/text2image/Comfyui/ComfyUI-master/execution.py", line 185, in process_inputs results.append(getattr(obj, func)(**inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/dev/text2image/Comfyui/ComfyUI-master/nodes.py", line 916, in load_unet model = comfy.sd.load_diffusion_model(unet_path, model_options=model_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/dev/text2image/Comfyui/ComfyUI-master/comfy/sd.py", line 1147, in load_diffusion_model sd = comfy.utils.load_torch_file(unet_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/dev/text2image/Comfyui/ComfyUI-master/comfy/utils.py", line 71, in load_torch_file raise e File "/dev/text2image/Comfyui/ComfyUI-master/comfy/utils.py", line 58, in load_torch_file with safetensors.safe_open(ckpt, framework="pt", device=device.type) as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: unable to mmap 34211675392 bytes from file : Cannot allocate memory (12)

### Logs

```powershell

```

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.