Nodes/Vsaan212-workflow-utilities/LazyPrompt — Unload local model
ComfyUI Node

LazyPrompt — Unload local model

The VRAM eject button you'll forget you need

By vsaan212·Created 10 months ago·Updated 9 days ago· 1
LazyPrompt — Unload local model

      This is the smallest node in the pack and possibly the most self-explanatory: it frees the VRAM held by a LazyPrompt - Prompt Engineer node. There's no input, no output, no settings. You drop it into a graph, run it, and the resident LLM leaves the GPU.

      Why does that need to exist? LazyPrompt Engineer has a keep_model_loaded toggle. Leave it on and an 8B LLM sits in VRAM between runs so the next prompt expansion is fast - but it's also still sitting there when you queue a video render that needs every gigabyte. On a 12GB card that's the difference between a render and an out-of-memory crash. The Unload node is your explicit eject: one little output node that runs gc over the graph, finds any loaded LazyPromptEngineer instances, and calls their unload path.

      How you'd use it

      Two patterns, both fine:

      • Add it to the end of a branch you only want to run occasionally, and queue that branch when you're done generating.
      • Or just keep it handy and run it manually the moment you switch from LLM-assisted prompting to an actual diffusion render.

      The node's own docs frame it the same way: wire it after your generation branch, or run it by hand, whenever you no longer need the local HF model resident.

      The practical part

      The honest advice is that you usually shouldn't need this at all - turning keep_model_loaded off on the Prompt Engineer node frees VRAM automatically after every run. The Unload node exists for the times you explicitly left it on (repeated prompt iteration, batch of ideas) and then want the memory back now without rebuilding the graph. If you only ever use LM Studio as the backend, this node does nothing for you - it only targets the local Hugging Face models LazyPrompt loads itself.

      Same install as the rest of the pack: ComfyUI Manager → search vsaan212/Vsaan212-workflow-utilities, or git clone into custom_nodes and restart. It lives in the vsaan212/LazyPrompt menu. If you're seeing OOM on your first LazyPrompt render, the fastest fix is usually flipping keep_model_loaded off - but when you want to keep the speed and reclaim the VRAM on demand, this is the button.

      Categoryvsaan212/LazyPrompt

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs