### 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
Upscaling workflow that works since months just fine. ComfyUI 0.3.5 runs the workflow even after 40 videos without to run out of system ram. The overall ram usage is relatively low. With a short spike to the maximum ram at the image mixing point.
After every generation the ram usage drops down to around 5-7 gb. And continues happily then with the next video.
### Actual Behavior
Same workflow. Newest ComfyUI runs out of system ram after a handful runs.
Very high ram consumption. After every run more and more ram gets consumed. And after a few runs it throws an out of memory error.

### Steps to Reproduce
Easiest method with the full workflow and all involved nodes:
Generate a folder called Input at your drive C
Throw in a few videos
Set the nunber of runs to the number of videos.
Run.
Since both upscaling nodes are in the workflow, the oom will appear quicker here.
Full workflow. Image is workflow ...
<img width="2526" height="1243" alt="Image" src="https://github.com/user-attachments/assets/e081ffae-d0ab-44b7-a607-5a319619aa2f" />
The more time consuming method:
Use the reduced workflow that just uses the Load Upscale Model.
Load video
Run
Load Video
Run
and so on
Wait until you run into the oom. This will take a bit longer, since just the one upscaling node is in the workflow.
<img width="1483" height="898" alt="Image" src="https://github.com/user-attachments/assets/ee653bbf-6048-4b7d-bcb2-97f76cd660e7" />
Example video. Duplicate it for the tests.
https://github.com/user-attachments/assets/19e80f36-5f4f-4b76-8468-83b5b18b3994
### Debug Logs
```powershell
H:\comfy_blank\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build
[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2025-09-06 09:26:36.960
** Platform: Windows
** Python version: 3.13.6 (tags/v3.13.6:4e66535, Aug 6 2025, 14:36:00) [MSC v.1944 64 bit (AMD64)]
** Python executable: H:\comfy_blank\ComfyUI_windows_portable\python_embeded\python.exe
** ComfyUI Path: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI
** ComfyUI Base Folder Path: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI
** User directory: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\user
** ComfyUI-Manager config path: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\user\default\ComfyUI-Manager\config.ini
** Log path: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\user\comfyui.log
Prestartup times for custom nodes:
2.1 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
Checkpoint files will always be loaded safely.
Total VRAM 16380 MB, total RAM 32687 MB
pytorch version: 2.8.0+cu129
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4060 Ti : cudaMallocAsync
Using pytorch attention
Python version: 3.13.6 (tags/v3.13.6:4e66535, Aug 6 2025, 14:36:00) [MSC v.1944 64 bit (AMD64)]
ComfyUI version: 0.3.56
ComfyUI frontend version: 1.25.11
[Prompt Server] web root: H:\comfy_blank\ComfyUI_windows_portable\python_embeded\Lib\site-packages\comfyui_frontend_package\static
### Loading: ComfyUI-Manager (V3.36)
[ComfyUI-Manager] network_mode: public
### ComfyUI Revision: 208 [9b151559] *DETACHED | Released on '2025-08-31'
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
NumExpr defaulting to 16 threads.
FizzleDorf Custom Nodes: Loaded
Traceback (most recent call last):
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\nodes.py", line 2129, in load_custom_node
module_spec.loader.exec_module(module)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\drag_drop_images\__init__.py", line 2, in <module>
from .node import DragDropImageViewer
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\drag_drop_images\node.py", line 2, in <module>
from nodes import BaseNode # <-- korrekter Import für die aktuelle Version
^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'BaseNode' from 'nodes' (H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\nodes.py)
Cannot import H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\drag_drop_images module for custom nodes: cannot import name 'BaseNode' from 'nodes' (H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\nodes.py)
Import times for custom nodes:
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\autoresetint
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_auto_prompt_schedule
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_text_line_combine
0.0 seconds (IMPORT FAILED): H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\drag_drop_images
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\mikey_nodes
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfy-image-saver
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-custom-scripts
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-image-blender
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\derfuu_comfyui_moddednodes
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-various
0.0 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-dream-video-batches
0.1 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
0.3 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-videohelpersuite
0.7 seconds: H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_fizznodes
Context impl SQLiteImpl.
Will assume non-transactional DDL.
No target revision found.
Starting server
To see the GUI go to: http://127.0.0.1:8188
FETCH ComfyRegistry Data: 5/96
FETCH ComfyRegistry Data: 10/96
FETCH ComfyRegistry Data: 15/96
FETCH ComfyRegistry Data: 20/96
FETCH ComfyRegistry Data: 25/96
got prompt
pop wan_video_I2V_00004.mp4
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
FETCH ComfyRegistry Data: 30/96
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
FETCH ComfyRegistry Data: 35/96
FETCH ComfyRegistry Data: 40/96
FETCH ComfyRegistry Data: 45/96
FETCH ComfyRegistry Data: 50/96
FETCH ComfyRegistry Data: 55/96
FETCH ComfyRegistry Data: 60/96
FETCH ComfyRegistry Data: 65/96
FETCH ComfyRegistry Data: 70/96
FETCH ComfyRegistry Data: 75/96
FETCH ComfyRegistry Data: 80/96
FETCH ComfyRegistry Data: 85/96
FETCH ComfyRegistry Data: 90/96
FETCH ComfyRegistry Data: 95/96
FETCH ComfyRegistry Data [DONE]
[ComfyUI-Manager] default cache updated: https://api.comfy.org/nodes
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [DONE]
[ComfyUI-Manager] All startup tasks have been completed.
pop wan_video_I2V_00004.mp4
Prompt executed in 194.27 seconds
pop wan_video_I2V_00005.mp4
pop wan_video_I2V_00005.mp4
Prompt executed in 197.25 seconds
pop wan_video_I2V_00006.mp4
pop wan_video_I2V_00006.mp4
Prompt executed in 194.21 seconds
pop wan_video_I2V_00007.mp4
!!! Exception during processing !!! Unable to allocate 27.0 MiB for an array with shape (1152, 2048, 3) and data type float32
Traceback (most recent call last):
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\execution.py", line 496, 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, hidden_inputs=hidden_inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\execution.py", line 315, 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, hidden_inputs=hidden_inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\execution.py", line 289, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\execution.py", line 277, in process_inputs
result = f(**inputs)
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1800, in upscale
s = comfy.utils.common_upscale(samples, width, height, upscale_method, crop)
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 885, in common_upscale
out = lanczos(s, width, height)
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 857, in lanczos
images = [torch.from_numpy(np.array(image).astype(np.float32) / 255.0).movedim(-1, 0) for image in images]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
numpy._core._exceptions._ArrayMemoryError: Unable to allocate 27.0 MiB for an array with shape (1152, 2048, 3) and data type float32
Prompt executed in 10.21 seconds
pop wan_video_I2V_00007.mp4
!!! Exception during processing !!! Unable to allocate 27.0 MiB for an array with shape (1152, 2048, 3) and data type float32
Traceback (most recent call last):
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\execution.py", line 496, 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, hidden_inputs=hidden_inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\execution.py", line 315, 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, hidden_inputs=hidden_inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\execution.py", line 289, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\execution.py", line 277, in process_inputs
result = f(**inputs)
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1800, in upscale
s = comfy.utils.common_upscale(samples, width, height, upscale_method, crop)
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 885, in common_upscale
out = lanczos(s, width, height)
File "H:\comfy_blank\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 857, in lanczos
images = [torch.from_numpy(np.array(image).astype(np.float32) / 255.0).movedim(-1, 0) for image in images]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
numpy._core._exceptions._ArrayMemoryError: Unable to allocate 27.0 MiB for an array with shape (1152, 2048, 3) and data type float32
```
Note that the log was too long to paste it in full length here. So i have cut off the other error messages with the same content for the rest of the videos.
### Other
I think ComfyUI does simpyl not unload the internally generated images anymore. In 0.3.5 i can see a drop of the memory usage back to 5 to 7 gb after a video is generated. Which is not the case in the current ComfyUI version. There is no drop in ram usage. It sticks at the same ram level and adds from there where in comfyUI 0.3.5 i can see the drop down to 5 gb.
It is also not node bound. But happens with both, the upscale by model node, and also with the upscale image node.