Environment
- OS: Windows 11 (x64), 24 GB RAM
- GPU: RTX 4060 Laptop 8 GB
- Python 3.12.10, torch 2.11.0+cu128, bitsandbytes 0.50.0
- DiffSynth-Studio: current
main, installed via pip install -e ".[quant]" (2026-08-03)
- Model:
DiffSynth-Studio/MiniMax-H3-NF4 (disk-offload low-VRAM path)
Observation
Running MiniMax-H3 NF4 FL2VA with the official disk-offload vram_config (offload_device="disk", onload_device="cpu", preparing_device="cuda", computation_device="cuda"), host RAM usage of the python process grows monotonically with every denoising step and is never reclaimed:
- After the text-encoder phase (which alone peaks at ~15 GB), the process working set keeps climbing during denoising — ~11.3 GB by step 39/50 and still growing
- On a 24 GB machine this pushes the OS into swap thrashing: per-step time degrades from ~65-75 s/step (steps 1-3) to ~1000-1100 s/step (step 39+), i.e. a >15x slowdown
- A 50-step 5-second 640x640 video took ~10 hours instead of the ~1 hour the early-step speed would suggest
Expectation
In disk offload mode, weights that _load_from_disk loads into CPU RAM (module.load_state_dict(state, assign=True) in layers.py) should be released when the layer is offloaded again (offload() re-creates a quantized shell). Host RAM should stay roughly constant across steps, but it looks like the CPU-side copies or the rebuilt quant state from quantize.unflatten_state_dict() are kept alive somewhere, so each step's reloads accumulate.
Impact
This disproportionately affects exactly the audience the disk-offload path targets: low-VRAM and low-RAM machines (the model card advertises ~6 GB VRAM as enough). Short runs (<= 8 steps) finish before the leak hits the wall, which masks the issue in quick tests; any 50-step or long-video run degrades severely.
Happy to provide py-spy dumps, tracemalloc snapshots, or per-step RSS logs if helpful.
Environment
main, installed viapip install -e ".[quant]"(2026-08-03)DiffSynth-Studio/MiniMax-H3-NF4(disk-offload low-VRAM path)Observation
Running MiniMax-H3 NF4 FL2VA with the official disk-offload
vram_config(offload_device="disk",onload_device="cpu",preparing_device="cuda",computation_device="cuda"), host RAM usage of the python process grows monotonically with every denoising step and is never reclaimed:Expectation
In disk offload mode, weights that
_load_from_diskloads into CPU RAM (module.load_state_dict(state, assign=True)inlayers.py) should be released when the layer is offloaded again (offload()re-creates a quantized shell). Host RAM should stay roughly constant across steps, but it looks like the CPU-side copies or the rebuilt quant state fromquantize.unflatten_state_dict()are kept alive somewhere, so each step's reloads accumulate.Impact
This disproportionately affects exactly the audience the disk-offload path targets: low-VRAM and low-RAM machines (the model card advertises ~6 GB VRAM as enough). Short runs (<= 8 steps) finish before the leak hits the wall, which masks the issue in quick tests; any 50-step or long-video run degrades severely.
Happy to provide py-spy dumps, tracemalloc snapshots, or per-step RSS logs if helpful.