Skip to main content

VRAM Debug

KJNodes/misc
VRAM_Debug

Returns the inputs unchanged, they are only used as triggers, and performs comfy model management functions and garbage collection, reports free VRAM before and after the operations.

Example

JSON Example
{
  "class_type": "VRAM_Debug",
  "inputs": {
    "empty_cache": true,
    "gc_collect": true,
    "unload_all_models": false
  }
}

This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.

Inputs

NameTypeStatusConstraintsDefault
empty_cacheBOOLEANrequired-true
gc_collectBOOLEANrequired-true
unload_all_modelsBOOLEANrequired-false
any_input*optional--
image_passIMAGEoptional--
model_passMODELoptional--

Outputs

IndexNameTypeIs ListConnection Reference
0any_output*No["{node_id}", 0]
1image_passIMAGENo["{node_id}", 1]
2model_passMODELNo["{node_id}", 2]
3freemem_beforeINTNo["{node_id}", 3]
4freemem_afterINTNo["{node_id}", 4]
How to connect to these outputs

To connect another node's input to an output from this node, use the connection reference format:

["node_id", output_index]

Where node_id is the ID of this VRAM_Debug node in your workflow, and output_index is the index from the table above.

Example

If this node has ID "5" in your workflow:

  • any_output (*): ["5", 0]
  • image_pass (IMAGE): ["5", 1]
  • model_pass (MODEL): ["5", 2]
Was this page helpful?