Lance: Unload Model
Freeing Lance's 40 GB when ComfyUI's own buttons won't
- pipeline
ComfyUI won't free Lance, and that's the whole point of this node
Lance is ByteDance's unified 3B model - image and video generation, editing, and understanding all in one pipeline, Apache-2.0, released May 2026. This pack (by anr2me, who also shipped the self-contained HuggingFace conversions) loads the entire thing into GPU memory and keeps it there. And here's the catch: that pipeline lives in a Python global inside the pack, not in ComfyUI's own model registry. So when you hit ComfyUI's "free memory" button, it shrugs. It has no idea Lance is squatting on your VRAM.
That's the hole Lance: Unload Model exists to fill. It's the dumbest node in the pack and arguably one of the most useful, because this model needs at least 40 GB of VRAM per the official docs - the files ship in FP32 (~24–28 GB each) and the pack moves everything to GPU in one shot. If you can barely fit it, you need a reliable way to let go of it.
How it actually works
Wire the LANCE_PIPELINE output from Lance: Load Model into this node's single pipeline input, queue, and the pack does three things:
- Scans its internal
_LANCE_CACHEand deletes the cached pipeline object you passed in (and the temp directory holding its materialized config/tokenizer JSONs). - Calls
gc.collect(). - Calls
torch.cuda.empty_cache().
You'll see [LanceNodes] Pipeline unloaded. in the console. That's it - no outputs, nothing to wire onward. It's a dead-end node you drop at the tail of a workflow so the model frees itself the moment the run finishes.
The gotcha that bites everyone: the cache is per-config
Load Model caches by a key made of llm_file | vit_file | vae_file | device | dtype. Change any of those and the loader builds a second pipeline and caches it alongside the first - the old one stays in VRAM. Unload only removes the specific pipeline object you wire into it. Stack two or three of those on a 40 GB card and you've got an instant OOM with no obvious culprit. The fix is boring but reliable: don't swap Lance configs without running Unload first, and keep this node handy on a cleanup tab for exactly that.
Also worth knowing: unloading means the next queue run reloads the whole model from disk, and that's slow (the loader prints Pipeline ready in Xs when it finishes). Don't put Unload at the end of every single workflow and re-pay that cost each time. Run it when you're done with Lance for the session, or before switching to another model - that's what it's for.
Install
Same story as the rest of the pack: ComfyUI Manager, search "comfyui-lance-nodes", or
cd ComfyUI/custom_nodes
git clone --recurse-submodules https://github.com/anr2me/comfyui-lance-nodes.git
The --recurse-submodules matters - Lance itself is embedded as a git submodule, and without it you get an empty Lance/ folder and an import error. The pack's own requirements.txt is effectively empty (a commented-out transformers<4.43 pin the author dropped to avoid breaking other custom nodes); the real dependencies come from the submodule via install.py, which Manager runs automatically. Then grab the weights from anr2me/bytedance_lance on HuggingFace (the lance_3b_comfyui.safetensors / lance_3b_video_comfyui.safetensors checkpoints, plus the Qwen2.5-VL ViT and Wan 2.2 VAE), placed in models/LLM/, models/clip_vision/, and models/vae/ respectively.
Troubleshooting
- "My VRAM is still full after hitting Free." Expected - that button doesn't know about Lance. Run this node instead.
- OOM after a few generations. Check whether you've changed Load Model inputs and left orphaned pipelines cached. Unload, then reload clean.
- You don't have 40 GB. This pack is not for you yet. The community fork
comfyui-lance-aioreuses ComfyUI's dynamic VRAM offloading and has been run on 12 GB cards, so it's the low-VRAM route if Lance itself still tempts you.
One honest take: Lance is a "worse than the specialist in every category" model right now - reviewers call the quality "meh" against Qwen, Flux, and Wan for their respective jobs. It's a curiosity, and its appeal is the single-model jack-of-all-trades idea. This node won't make it better. It just makes sure that when you're done playing with it, you get your GPU back.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | LANCE_PIPELINE | — |
Outputs (0)
No outputs