Comfy-Org / Comfy-Org/ComfyUI

OOM error, pc almost unresponsive, 4090rxt, 24vram, 64ram

Open
#11,790 4 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [ ] 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

Comfyui portable, latest version.
First time using portable version, with a workflow I often used in the desktop version, never had any problems with it.
Before that workflow I have tried a few other workflows, wan2.2 mostly.
After using Wan2.2 workflow pressed clear cache and empty vram button which seemed to work (no reason to doubt it didn't).
The expected behavior was finishing the workflow.

### Actual Behavior

Was almost done with qwen 1125 workflow, then when wanvae started its process the error occured.

An oom crash leaving my pc almost unresponsive, even after shutting down processes of browser (brave).
No python processes were visible in taskmanager with sorted on memory.
After shutting down brave processes memory problems didn't resolve and might even got worse.
Getting taskmanager back up (I had shut that down) took minutes.
In the end I managed to shut down the pc which took 5-10 minutes.
After restart (so far) no damage done.

### Steps to Reproduce

I'd rather don't try to reproduce this crash.
I was fearing for my os.

### Debug Logs

```powershell
[2026-01-10 17:26:35.050] got prompt
[2026-01-10 17:26:39.327] model weight dtype torch.float8_e4m3fn, manual cast: torch.bfloat16
[2026-01-10 17:26:39.329] model_type FLUX
[2026-01-10 17:26:45.686] Using pytorch attention in VAE
[2026-01-10 17:26:45.688] Using pytorch attention in VAE
[2026-01-10 17:26:45.892] VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
[2026-01-10 17:26:54.747] Requested to load QwenImageTEModel_
[2026-01-10 17:26:54.811] loaded completely; 7388.28 MB loaded, full load: True
[2026-01-10 17:26:54.824] CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cuda:0, dtype: torch.float16
[2026-01-10 17:26:59.544] # 😺dzNodes: LayerStyle -> ImageScaleByAspectRatio V2 Processed 1 image(s).
[2026-01-10 17:26:59.550] Requested to load WanVAE
[2026-01-10 17:26:59.876] loaded completely; 11000.85 MB usable, 242.03 MB loaded, full load: True
[2026-01-10 17:27:00.993] Requested to load QwenImage
[2026-01-10 17:27:12.305] loaded completely; 20683.88 MB usable, 19483.95 MB loaded, full load: True
[2026-01-10 17:27:19.470]
100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 4/4 [00:07<00:00, 1.79s/it]
100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 4/4 [00:07<00:00, 1.78s/it]
[2026-01-10 17:27:19.810] Requested to load WanVAE
[2026-01-10 17:27:20.027] !!! Exception during processing !!! CUDA error: out of memory
Search for `cudaErrorMemoryAllocation' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

[2026-01-10 17:27:20.089] Traceback (most recent call last):
File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\execution.py", line 518, 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 "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\execution.py", line 329, 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 "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-lora-manager\py\metadata_collector\metadata_hook.py", line 165, in async_map_node_over_list_with_metadata
results = await original_map_node_over_list(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\execution.py", line 303, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\execution.py", line 291, in process_inputs
result = f(**inputs)
File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\nodes.py", line 335, in decode
images = vae.decode_tiled(samples["samples"], tile_x=tile_size // compression, tile_y=tile_size // compression, overlap=overlap // compression, tile_t=temporal_size, overlap_t=temporal_overlap)
File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 835, in decode_tiled
model_management.load_models_gpu([self.patcher], memory_required=memory_used, force_full_load=self.disable_offload)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 674, in load_models_gpu
free_memory(total_memory_required[device] * 1.1 + extra_mem, device)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 606, in free_memory
if current_loaded_models[i].model_unload(memory_to_free):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 529, in model_unload
freed = self.model.partially_unload(self.model.offload_device, memory_to_free)
File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\comfy\model_patcher.py", line 919, in partially_unload
m.to(device_to)
~~~~^^^^^^^^^^^
File "C:\AI_Stuff\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1371, in to
return self._apply(convert)
~~~~~~~~~~~^^^^^^^^^
File "C:\AI_Stuff\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 957, in _apply
param_applied = fn(param)
File "C:\AI_Stuff\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1357, in convert
return t.to(
~~~~^
device,
^^^^^^^
dtype if t.is_floating_point() or t.is_complex() else None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
non_blocking,
^^^^^^^^^^^^^
)
^
torch.AcceleratorError: CUDA error: out of memory
Search for `cudaErrorMemoryAllocation' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

[2026-01-10 17:27:20.093] Prompt executed in 43.27 seconds
[2026-01-10 17:27:20.432] Exception in thread Thread-15 (prompt_worker):
[2026-01-10 17:27:20.444] Traceback (most recent call last):
[2026-01-10 17:27:20.444] File "threading.py", line 1043, in _bootstrap_inner
[2026-01-10 17:27:20.445] File "threading.py", line 994, in run
[2026-01-10 17:27:20.445] File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\main.py", line 270, in prompt_worker
comfy.model_management.soft_empty_cache()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
[2026-01-10 17:27:20.446] File "C:\AI_Stuff\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 1549, in soft_empty_cache
torch.cuda.empty_cache()
~~~~~~~~~~~~~~~~~~~~~~^^
[2026-01-10 17:27:20.447] File "C:\AI_Stuff\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\memory.py", line 224, in empty_cache
torch._C._cuda_emptyCache()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
[2026-01-10 17:27:20.448] torch.AcceleratorError: CUDA error: out of memory
Search for `cudaErrorMemoryAllocation' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
[2026-01-10 17:27:20.449]
[2026-01-10 17:28:28.842]
Stopped server
[2026-01-10 17:28:28.856] {"client": "", "event": "Websocket thread terminated", "thread_id": "Thread-16"}
```

### 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.