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.

By parametricparadigm·Created 4 days ago·Updated about 3 hours ago· 1
VRAM Gate
  • value
  • value
  • free_gb
  • status
◄peak_gb8.0►
◄margin_gb4.0►
◄free_idle_modelstrue►
CategoryParametric/Flagship

Inputs (4)

NameTypeDefaultDescription
valueCOMFY_MATCHTYPE_V3Anything: passed through unchanged when the gate is open.
peak_gbFLOAT8.00–1000000The most memory the next step will use, in GB.
margin_gbFLOAT4.00–1000Memory to keep free on top of the peak, in GB.
free_idle_modelsBOOLEANtrueWhen short, first unload models this ComfyUI holds idle, then measure again. Never touches other programs.

Outputs (3)

NameTypeDescription
valueCOMFY_MATCHTYPE_V3The input, unchanged.
free_gbFLOATFree memory measured, in GB.
statusSTRINGWhat the gate saw, in one line.