Memory management: are models dumped & reloaded between runs? V0.19.1 vs V16.3
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
I'm getting marginally slower generation times (by only a few seconds) V0.19.1 vs V16.3.
Is memory dumped between runs?
ComfyUI: 0.19.1
venv running on Ubuntu
115GB RAM
CU130, 5090 GPU
test with LTX 2.3 dev BF16, w distll lora
Crystools toolbar highlighted the fact memory seemed to go down at start of runs, so I monitored:
This graph of 0.19.1 shows memory at point a new run is started. It looks like models dumped then re-loaded on each run?
This graph of 0.16.3
It looks like the model is being taken out of memory then reloaded? If it is, I suspect I'm not so badly hit as the OS will cache the model in memory, but it seems a retrograde step in behaviour (if this is indeed what it causing the slightly slower generations - i did note the s/it looks better for 0.16.3 than 0.19.1).
**Is there a way to avoid this, or flag to ComfyUI to use memory more liberally?**
In general, memory management seems much better in recent months - thank you. In early Wan 2.2. days, Kijai's workflows using only FP8 models, in particular I saw memory creep up to fill my 56GB RAM and 64GB SWAP on consecutive runs - with ComfyUI crashing unceremoniously when full. Since November 2025 (ish) I've seen a fraction of that memory used (ironic, as I bought more memory in Nov 2025 which Comfy doesn't seem to use now!)
Can I provide any information? (I have both versions to test, as I keep numerous for repeatability as the output of same-seed gens on many models changes slightly as ComfyUI changes)
Here are comparative logs of identical Gen on 0.19.1 vs 0.16.3
Typical v0.19.1 time
> got prompt
> Requested to load LTXAV
> Model LTXAV prepared for dynamic VRAM loading. 40053MB Staged. 0 patches attached.
> 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:43<00:00, 2.16s/it]
> Requested to load VideoVAE
> Model VideoVAE prepared for dynamic VRAM loading. 1384MB Staged. 0 patches attached.
> Requested to load LTXAV
> 0 models unloaded.
> Model LTXAV prepared for dynamic VRAM loading. 40053MB Staged. 1660 patches attached.
> 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:20<00:00, 6.84s/it]
> Requested to load AudioVAE
> loaded completely; 3550.82 MB usable, 693.46 MB loaded, full load: True
> 0 models unloaded.
> Model VideoVAE prepared for dynamic VRAM loading. 1384MB Staged. 0 patches attached.
> Prompt executed in 81.52 seconds
>
Identical run on v0.16.3 times:
>
> got prompt
> Requested to load LTXAV
> Model LTXAV prepared for dynamic VRAM loading. 40053MB Staged. 0 patches attached.
> 100%|████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:42<00:00, 2.12s/it]
> Requested to load VideoVAE
> Model VideoVAE prepared for dynamic VRAM loading. 1384MB Staged. 0 patches attached.
> Requested to load LTXAV
> 0 models unloaded.
> Model LTXAV prepared for dynamic VRAM loading. 40053MB Staged. 1660 patches attached.
> 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:20<00:00, 6.71s/it]
> Requested to load AudioVAE
> loaded completely; 3735.13 MB usable, 693.46 MB loaded, full load: True
> 0 models unloaded.
> Model VideoVAE prepared for dynamic VRAM loading. 1384MB Staged. 0 patches attached.
> Prompt executed in 77.98 seconds
>
Contributor guide
Assessment
This issue has not been assessed yet.