Bug Report: Severe Performance Degradation Over Multiple Runs
Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see how to disable custom nodes if you need help)
Expected Behavior
After running multiple prompts, the performance of the program degrades significantly. Each execution becomes slower than the previous one, eventually reaching unusable speeds.
Actual Behavior
Execution times increase with every run:
- First run: ~138 seconds
- Later run: ~428 seconds
- Later run: ~543 seconds
Eventually, processing gets interrupted.
Steps to Reproduce
- Start the program with the default configuration.
- Run several prompts in sequence (see attached logs).
- Observe that execution times increase dramatically with each run.
Debug Logs
[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.
got prompt
Using pytorch attention in VAE
Using pytorch attention in VAE
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9588.8 9587.04833984375 0
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9570.675 9570.57275390625 0
model weight dtype torch.float8_e4m3fn, manual cast: torch.bfloat16
model_type FLUX
Requested to load QwenImage
loaded partially 9214.834965667724 9212.660705566406 645
100%|████████████████████████████████████████████████████████████████████████████████████| 8/8 [01:58<00:00, 14.75s/it]
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Prompt executed in 00:10:25
got prompt
Requested to load QwenImage
loaded partially 9214.834965667724 9212.660705566406 645
100%|████████████████████████████████████████████████████████████████████████████████████| 8/8 [01:49<00:00, 13.69s/it]
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Prompt executed in 138.36 seconds
got prompt
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9570.675 9570.57275390625 0
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9570.675 9570.57275390625 0
Requested to load QwenImage
loaded partially 9214.834965667724 9212.660705566406 645
100%|████████████████████████████████████████████████████████████████████████████████████| 8/8 [04:45<00:00, 35.67s/it]
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Prompt executed in 428.50 seconds
got prompt
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9570.675 9570.57275390625 0
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9570.675 9570.57275390625 0
Requested to load QwenImage
loaded partially 9214.834965667724 9212.660705566406 645
100%|████████████████████████████████████████████████████████████████████████████████████| 8/8 [06:30<00:00, 48.84s/it]
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Prompt executed in 543.34 seconds
got prompt
Requested to load QwenImage
loaded partially 9214.834965667724 9212.660705566406 645
0%| | 0/8 [01:02<?, ?it/s]
Processing interrupted
Prompt executed in 90.05 seconds
got prompt
0 models unloaded.
loaded partially 9212.660705661774 9212.660705566406 0
12%|██████████▌ | 1/8 [01:26<10:06, 86.71s/it]
Processing interrupted
Prompt executed in 88.69 seconds
Other
Expected Behavior The execution time should remain relatively stable between runs.
Logs (Attached below – includes repeated partial loading of models like WanVAE, QwenImageTEModel_, and QwenImage.)
Notes
.It appears that models are being repeatedly reloaded/partially loaded without being properly released. .The issue may be related to memory handling (VRAM/CPU RAM offloading). .System performance continues to degrade until processing fails.
Can you post your full log?
Can you post your full log?
D:\AI\Packages\ComfyUI>.\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-03 08:23:26.843
** 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: D:\AI\Packages\ComfyUI\python_embeded\python.exe
** ComfyUI Path: D:\AI\Packages\ComfyUI\ComfyUI
** ComfyUI Base Folder Path: D:\AI\Packages\ComfyUI\ComfyUI
** User directory: D:\AI\Packages\ComfyUI\ComfyUI\user
** ComfyUI-Manager config path: D:\AI\Packages\ComfyUI\ComfyUI\user\default\ComfyUI-Manager\config.ini
** Log path: D:\AI\Packages\ComfyUI\ComfyUI\user\comfyui.log
Prestartup times for custom nodes:
0.0 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\rgthree-comfy
0.0 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-easy-use
20.8 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-manager
Checkpoint files will always be loaded safely.
Total VRAM 24576 MB, total RAM 32346 MB
pytorch version: 2.8.0+cu129
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4090 : 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: D:\AI\Packages\ComfyUI\python_embeded\Lib\site-packages\comfyui_frontend_package\static
[ComfyUI-Easy-Use] server: v1.3.3 Loaded
[ComfyUI-Easy-Use] web root: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-easy-use\web_version/v2 Loaded
ComfyUI-GGUF: Allowing full torch compile
### Loading: ComfyUI-Impact-Pack (V8.22.2)
[Impact Pack] Wildcards loading done.
### Loading: ComfyUI-Impact-Subpack (V1.3.5)
[Impact Pack/Subpack] Using folder_paths to determine whitelist path: D:\AI\Packages\ComfyUI\ComfyUI\user\default\ComfyUI-Impact-Subpack\model-whitelist.txt
[Impact Pack/Subpack] Ensured whitelist directory exists: D:\AI\Packages\ComfyUI\ComfyUI\user\default\ComfyUI-Impact-Subpack
[Impact Pack/Subpack] Loaded 0 model(s) from whitelist: D:\AI\Packages\ComfyUI\ComfyUI\user\default\ComfyUI-Impact-Subpack\model-whitelist.txt
[Impact Subpack] ultralytics_bbox: D:\AI\Packages\ComfyUI\ComfyUI\models\ultralytics\bbox
[Impact Subpack] ultralytics_segm: D:\AI\Packages\ComfyUI\ComfyUI\models\ultralytics\segm
### Loading: ComfyUI-Inspire-Pack (V1.21)
### Loading: ComfyUI-Manager (V3.36)
[ComfyUI-Manager] network_mode: public
### ComfyUI Revision: 158 [e2d1e5da] *DETACHED | Released on '2025-09-01'
(pysssss:WD14Tagger) [DEBUG] Available ORT providers: AzureExecutionProvider, CPUExecutionProvider
(pysssss:WD14Tagger) [DEBUG] Using ORT providers: CUDAExecutionProvider, CPUExecutionProvider
[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/alter-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
[rgthree-comfy] Loaded 48 epic nodes. 🎉
[ComfyUI-Manager] An error occurred while fetching 'https://api.comfy.org/nodes?page=1&limit=30&comfyui_version=v0.3.56-8-ge2d1e5da&form_factor=git-windows': Expecting value: line 2 column 1 (char 1)
Cannot connect to comfyregistry.
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [DONE]
[ComfyUI-Manager] All startup tasks have been completed.
WAS Node Suite: OpenCV Python FFMPEG support is enabled
WAS Node Suite Warning: `ffmpeg_bin_path` is not set in `D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\was-ns\was_suite_config.json` config file. Will attempt to use system ffmpeg binaries if available.
WAS Node Suite: Finished. Loaded 220 nodes successfully.
"Art is the soul made visible." - George Crook
Import times for custom nodes:
0.0 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\websocket_image_save.py
0.1 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-wd14-tagger
0.1 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\ComfyUI-GGUF
0.1 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui_ipadapter_plus
0.1 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui_ultimatesdupscale
0.2 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-kjnodes
0.2 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\efficiency-nodes-comfyui
0.3 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-custom-scripts
0.3 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-inspire-pack
0.3 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-manager
1.2 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-impact-subpack
1.5 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\rgthree-comfy
2.4 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-impact-pack
5.5 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\was-ns
24.4 seconds: D:\AI\Packages\ComfyUI\ComfyUI\custom_nodes\comfyui-easy-use
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
got prompt
Using pytorch attention in VAE
Using pytorch attention in VAE
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9588.8 9587.04833984375 0
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9570.675 9570.57275390625 0
model weight dtype torch.float8_e4m3fn, manual cast: torch.bfloat16
model_type FLUX
Requested to load QwenImage
loaded partially 9214.834965667724 9212.660705566406 645
100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [02:01<00:00, 15.18s/it]
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Prompt executed in 00:10:37
got prompt
Requested to load QwenImage
loaded partially 9214.834965667724 9212.660705566406 645
100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [01:51<00:00, 13.94s/it]
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Prompt executed in 146.50 seconds
got prompt
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9570.675 9570.57275390625 0
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9570.675 9570.57275390625 0
Requested to load QwenImage
loaded partially 9214.834965667724 9212.660705566406 645
100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [01:58<00:00, 14.77s/it]
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Prompt executed in 275.93 seconds
got prompt
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9570.675 9570.57275390625 0
Requested to load WanVAE
0 models unloaded.
loaded partially 128.0 127.9998779296875 0
Requested to load QwenImageTEModel_
loaded partially 9570.675 9570.57275390625 0
Requested to load QwenImage
loaded partially 9214.834965667724 9212.660705566406 645
38%|████████████████████████████████████▊ | 3/8 [03:06<04:56, 59.21s/it]
Can you post your full log?
When I was testing the model, I noticed that the first run performs at its normal speed. If I don’t change the image or the prompt, the edits are processed much faster than the initial run.
However, when I switch to a different image (even without changing the prompt), the slowdown starts. Gradually, the processing speed decreases to the point where it can even take hours. I suspect that every time I load a new image, it consumes more RAM, and once the RAM fills up, it starts relying on the hard drive. This seems to increase memory usage even further.
From what I can tell, when I request an edit, the model might be trying to apply changes to all the images it has previously handled in memory, which makes the process slower and slower. Of course, I might be wrong, but that’s how it feels to me.
This seems likely to be related to PyTorch 2.8. #9666 #9739 #9758 all seem related.
If I use --cache-none it doesn't seem to happen, but it has other effects including #9536 for me.
So anyone find a way to solve it instead of downgrading Pytorch to 2.7.1? dont want to rebuild all torch related dependancies any more....
Same issue is occurring ,I have pytorch version: 2.6.0+cu126
+1 Upscaler and Frame Interpolation nodes based on pytorch allocate memory that is never returned. I tried to compensate with cleaning RAM manually and using SmartMemoryManager node to free up memory, but that only cleans the physical memory, while the commited memory constantly increases until a job in the batch dies from "out of memory".