ComfyUI Node
VRAM Gate
Passes its input through only when free VRAM covers this step's peak plus a safety margin; otherwise everything downstream stops with a plain reason instead of an out-of-memory crash. Works with any type.
VRAM Gate
- value
- value
- free_gb
- status
◄peak_gb8.0►
◄margin_gb4.0►
◄free_idle_modelstrue►
CategoryParametric/Flagship
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| value | COMFY_MATCHTYPE_V3 | Anything: passed through unchanged when the gate is open. | |
| peak_gb | FLOAT | 8.00–1000000 | The most memory the next step will use, in GB. |
| margin_gb | FLOAT | 4.00–1000 | Memory to keep free on top of the peak, in GB. |
| free_idle_models | BOOLEAN | true | When short, first unload models this ComfyUI holds idle, then measure again. Never touches other programs. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| value | COMFY_MATCHTYPE_V3 | The input, unchanged. |
| free_gb | FLOAT | Free memory measured, in GB. |
| status | STRING | What the gate saw, in one line. |