ComfyUI Node
Eric Krea2 Unload Models
A ComfyUI node in Eric/Krea2 with 6 inputs and 1 output.
Eric Krea2 Unload Models
- value
- krea2_pipeline
- value
◄also_clear_module_cachestrue►
◄aggressive_teardowntrue►
◄also_unload_comfy_modelstrue►
◄verbosetrue►
CategoryEric/Krea2
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| value | * | Passthrough - wire anything here (e.g. the final IMAGE) so this node sits downstream in the graph and runs as part of the queue. | |
| krea2_pipelineopt | KREA2_PIPELINE | The pipeline to free. Connect the Component Loader or plain Loader's krea2_pipeline output here. | |
| also_clear_module_cachesopt | BOOLEAN | true | Also clear the loader nodes' module-level caches (_COMP_CACHE / _PIPELINE_CACHE), not just this input. Leave ON unless you specifically want to free only the connected pipeline and keep another cached one alive. |
| aggressive_teardownopt | BOOLEAN | true | Explicitly break the pipe's internal references to its submodules (transformer/vae/text_encoder) before dropping the pipe itself, instead of relying on the top-level pipe object's refcount hitting zero on its own. Use this when 'keep in vram'=True on the loader and VRAM isn't dropping after unload - something (accelerate hooks, cached attention workspace, an offload dispatch table) may be holding a submodule reference independent of the pipe wrapper. |
| also_unload_comfy_modelsopt | BOOLEAN | true | Also unload models ComfyUI's own model_management is tracking (SAM / GroundingDINO / DepthPro and anything else loaded through regular comfy nodes), then soft-empty comfy's cache. NOTE: nodes that cache in their own globals (e.g. SegmentAnything Ultra with cache_model=True) are invisible to this - turn their own cache toggle off as well. |
| verboseopt | BOOLEAN | true | Print refcount + CUDA memory before/after, to diagnose cases where VRAM still doesn't drop (tells us whether something else is holding a reference, vs. it being driver/kernel-level memory that only frees on process exit). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |