Nodes/ComfyUI_OllamaUnload/Ollama Unload (free VRAM)
ComfyUI Node

Ollama Unload (free VRAM)

Unload one or all Ollama models to free VRAM. Wire a prompt through passthrough to force it to run before image sampling.

By bradsec·Created 2 months ago·Updated about a month ago· 0
Ollama Unload (free VRAM)
  • passthrough
  • passthrough
  • status
urlhttp://127.0.0.1:11434
model
waittrue
timeout60
free_comfy_vramtrue
CategoryOllama

Inputs (6)

NameTypeDefaultDescription
urlSTRINGhttp://127.0.0.1:11434Ollama server base URL, e.g. http://127.0.0.1:11434.
modelSTRINGExact model name to unload (e.g. gemma4:26b). Empty = unload every loaded model.
waitBOOLEANtrueBlock until the model leaves Ollama memory (VRAM actually freed) before continuing.
timeoutINT601–600Max seconds to wait for the unload and the resident-memory poll.
free_comfy_vramBOOLEANtrueAlso unload ComfyUI's own models and empty the CUDA cache.
passthroughopt*Wire your final prompt/conditioning through here so this node runs BEFORE the sampler.

Outputs (2)

NameTypeDescription
passthrough*
statusSTRING