SDXL ChordEdit Release Cache
SDXL ChordEdit Release Cache, a pass-through that frees VRAM
- image
- image
ComfySDXLChordEditReleaseCache ("SDXL ChordEdit Release Cache") is the boring half of the ChordEdit pair, and that's the point. The main ComfySDXLChordEdit node is a VRAM hog - every step fires multiple UNet passes - so the pack ships this tiny companion: you route the edited image through it and it garbage-collects and empties ComfyUI's VRAM cache before your graph moves on.
It does nothing to your pixels. It takes one image, returns the same image, and in between calls gc.collect() and soft_empty_cache() (with a torch.cuda.empty_cache() fallback). That's the whole node. If the name reads like a method call, it basically is one - the author wanted a way to trigger the same cache-cleanup the main node offers via its clear_cache_after_run toggle, but as a separate node you can drop anywhere in the graph.
When it actually helps
ComfyUI keeps loaded models and cached tensors around so the next queue run doesn't pay the load cost again. That's usually good - but ChordEdit is memory-hungry, and if the next thing in your graph is another heavy step (an upscale, a second ChordEdit pass, a big batch), the freed memory can be the difference between fitting and an OOM. Put this node on the ChordEdit output and wire its output into the next heavy stage. It's also handy in the middle of iterating on a workflow: it forces the cache down right after the expensive node instead of whenever the backend happens to feel like it.
Inputs and outputs
That's a short section, because the schema is a single required image in and a single image out. There's no list, no password, no toggle. The only real decision is where to put it: immediately after ComfySDXLChordEdit if your next stage is heavy, or after any node whose output you want to keep flowing while clearing the deck.
Install and gotchas
Same pack as the main ChordEdit node - ComfyUI Manager (search "FastTool") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Fengxiaoxiao-001/ComfyUI-FastTool.git
Restart, and it appears under XiaoXiao/ChordEdit. No dependencies beyond ComfyUI itself.
Honest caveats: this is a convenience node, not a memory panacea. It releases the PyTorch caching allocator's cached blocks, but models the graph still holds references to stay resident until the queue clears; if a workflow is running in one batch, the release happens when the node executes, and anything the graph pins stays pinned until the run ends. So think of it as "free up slack before the next big step," not "make my 8GB card into a 16GB card." Also, soft_empty_cache touching the cache mid-run can cost a little time on the next allocation - it's a trade, not a free lunch. For the ChordEdit workflow specifically, the author pairs it with clear_cache_after_run on the main node; you don't need both, but having the explicit node is more readable when you're sharing a graph.
If you're already low on VRAM and ChordEdit alone is dying, a release-cache node won't rescue you - lower noise_samples, unet_batch_size, and n_steps on the main node first. This node just makes the memory you do have work better.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |