LMStudio Unload Ovum
LM Studio Unload Ovum — force the local model out of VRAM when you're done with it
- any_input
- any_output
- status
LMStudioUnloadOvum exists because of a gap in LM Studio: it doesn't actually support unloading a model on request. The pack's prompt node works around that with a "hack" - an inactivity timer that swaps to a tiny model to free VRAM - and this node is the manual override. Wire it in where your graph finishes its LLM work, and it cancels any pending unload timer and forces the swap immediately, so the VRAM is free before the next heavy image node runs.
If you're running a big diffusion model on a GPU that also has to hold an LLM, you know the juggling act. This node is the "put the toy away" step that keeps the two from fighting.
How it works
Three inputs, per the schema:
any_input(*) - a passthrough. The node always passes its first input through unchanged, so you can thread it inline (say, after your sampler) to pin execution order without altering the data.server_address- defaultlocalhost.server_port- default1234.
Two outputs:
any_output(*) - the unchanged passthrough ofany_input.status(STRING) - a human-readable summary of what happened:Unloaded immediately (pending timer was active).,Attempted immediate unload, but the unload request failed., orNo pending unload timer; nothing to do.
Mechanically it's three steps: cancel the shared unload timer (the same one all the pack's LM Studio nodes schedule, under a lock), and if a timer was actually active, send a minimal request to switch to the tiny model liquid/lfm2-1.2b so VRAM is released. No timer pending → it does nothing and tells you so.
Where you put it
The natural spot is at the end of the LLM branch, right before the graph hands the GPU back to diffusion - after your last prompt-generation or image-caption call. Because it passes data through, you can hang it off the final image or string without breaking the wire, and the passthrough also enforces that it runs after the LLM work completes. The status output can be logged or shown so you know the unload actually fired.
The one hard requirement
For the unload to work as designed, you must have the liquid/lfm2-1.2b model installed in LM Studio - that's the tiny model it swaps to. Without it, the swap request fails and you get Attempted immediate unload, but the unload request failed. It also only does something meaningful if a timer is pending; if you never set unload_timeout_seconds on your prompt node, there's nothing to cancel and it'll report "nothing to do" (which is still fine as an execution-ordering passthrough).
Gotchas
- It's not a magic unload. LM Studio's API can't force-drop a model; this is a model switch to a tiny model. It frees most of the VRAM but isn't instant or total.
- Only cancels the pack's own timer. If another app or script loaded a model, this node doesn't touch it.
- The standard LM Studio prerequisites apply: server running on the right address/port, and requests are serialized with the rest of the pack's LLM nodes.
Install
Ships in comfy-ovum:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
or ComfyUI Manager → comfy-ovum, restart. Install the liquid/lfm2-1.2b model inside LM Studio for full functionality.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| any_input | * | — | |
| server_address | STRING | localhost | LM Studio server address |
| server_port | INT | 12340–65535 | LM Studio server port |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| any_output | * | — |
| status | STRING | — |