ComfyUI Extension: RAM/VRAM Purge by Steve Lasmin
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.
Aggressive RAM and VRAM cleanup nodes for ComfyUI on Windows. Clears model caches, CLIP, checkpoints, VAE, and forces Windows to release physical RAM.
Looking for a different extension?
Custom Nodes (2)
README
RAM/VRAM Purge by Steve Lasmin
Aggressive RAM and VRAM cleanup nodes for ComfyUI on Windows. Forcefully offloads model caches, CLIP, checkpoints, VAE, and forces the OS to release physical RAM back to the pagefile.
Author: Steve Lasmin
Support: https://boosty.to/stevelasmin
Features
π§Ή RAM Purge (Windows)
- Full system cleanup β clears ComfyUI model cache, CLIP cache, checkpoints, and VAE
- Deep garbage collection β 3-pass Python GC to catch reference cycles
- CUDA cache purge β empties GPU VRAM twice with synchronization
- Windows working-set trim β uses
SetProcessWorkingSetSize/EmptyWorkingSetto force Windows to page out unused physical RAM (reduces Task Manager numbers) - Before/after stats β prints system RAM and VRAM usage to the console
- Safety gate β requires typing
PURGEto prevent accidental execution - Passthrough design β connect any wire, data flows through unchanged
π§Ή VRAM Purge (Windows)
- Lightweight GPU-only cleanup β unloads models and empties CUDA cache
- Instant execution β no system RAM or GC overhead
- VRAM stats β prints free/total GPU memory to console
- Passthrough design β drop between sampler steps or before model switches
UX Enhancements
- Hover tooltips β every input field explains what it does
- Right-click help β built-in HTML help dialog via context menu
- Console logging β detailed before/after memory statistics
Installation
Via ComfyUI Manager (recommended)
- Open ComfyUI Manager β Custom Nodes Manager
- Search for "RAM/VRAM Purge by Steve Lasmin"
- Click Install
- Restart ComfyUI
Manual Install
- Navigate to your
ComfyUI/custom_nodes/directory - Clone this repository:
git clone https://github.com/Eklipsis/comfyui-ram-vram-purge-by-steve-lasmin.git - Restart ComfyUI
Usage
The nodes appear under RAM/VRAM Purge by Steve Lasmin in the node menu.
Recommended Workflow Placement
Place the node between heavy model-loading stages so models don't stack in RAM:
[Load Checkpoint] β [π§Ή RAM Purge] β [Load LTXV Model] β [π§Ή RAM Purge] β [VAE Decode]
RAM Purge Settings
| Setting | Recommended | Description |
|---------|-------------|-------------|
| aggressive_mode | β
ON | Deep GC + internal cache wiping |
| clear_cuda_cache | β
ON | Frees GPU VRAM |
| trim_working_set | β
ON | Forces Windows to return physical RAM |
| confirmation | PURGE | Type PURGE to execute (safety gate) |
VRAM Purge Settings
| Setting | Recommended | Description |
|---------|-------------|-------------|
| empty_cache | β
ON | torch.cuda.empty_cache() |
| synchronize | β
ON | Wait for GPU ops to finish |
| unload_models | β
ON | Move loaded models out of VRAM |
File Structure
comfyui-ram-vram-purge-by-steve-lasmin/
βββ __init__.py
βββ nodes.py
βββ pyproject.toml
βββ README.md
βββ LICENSE
βββ .gitignore
Requirements
- Windows (working-set trim uses Windows APIs)
- ComfyUI (any recent version)
- Python β₯ 3.8
- PyTorch with CUDA (for VRAM features)
Note: The RAM purge node will still function on Linux/macOS but the working-set trim and RAM statistics will be skipped gracefully. The VRAM purge works on any CUDA-capable system.
License
This project is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License.
- β Free to use (personal and commercial)
- β Free to share
- β Modifications and derivative works are not allowed without permission
See LICENSE for full terms.
To request permission for modifications, contact: [email protected]
Support
If you find these nodes useful, consider supporting the author:
https://boosty.to/stevelasmin
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.