# I built a ComfyUI prompt enhancer that runs a small local LLM without permanently occupying your VRAM — retained record

> Retained reddit record from reddit:comfyui.

Canonical: https://highsignal.app/data/records/3c59e8b3481f5e50

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:comfyui)  published 2026-11-03 14:35 ingested 2026-11-04 02:41

[original source ↗](https://www.reddit.com/r/comfyui/comments/1xmukz1/i_built_a_comfyui_prompt_enhancer_that_runs_a/)

## retained text



```
Hey everyone!

I was looking for a way to take a short prompt and expand it out into a much more detailed image generation prompt without having another LLM constantly gobbling up all the VRAM that I need for my diffusion models.

So I built a custom ComfyUI node to deal with that.

**What does it do?**

You give it a short prompt or a few keywords and a small local LLM then expands that into a more detailed text to image prompt.

It uses a custom inference engine written in PyTorch and Triton (my own INT8 quantisation and matrix multiplication kernels).

It currently supports Qwen3.5 checkpoints in W8A16 (0.8B) and W4A16 (2B).

**The main feature is its memory management.**

There are two options:

\- Offload after generation: once the prompt has been generated the LLM is moved into pinned system memory and its VRAM is released. The next time you use it the load is going to be a lot faster than having to read the weights from disk again.  
\- Keep loaded: the LLM stays on the GPU between generations. That's useful if you're doing a number of different prompts and want to get the benefit of reusing the model.

The first load does take a bit longer but subsequent loads are a lot quicker and decoding is fast enough to make the workflow viable.

**Hardware and testing**

I tested this on my laptop with:  
\- RTX 2050 (4GB VRAM)  
\- 16GB system RAM

One thing to be absolutely clear about: offloading to VRAM doesn't get rid of the system RAM requirement at all. You still need sufficient RAM headroom for your ComfyUI workflow (i.e. your diffusion model, text encoder, VAE and the LLM's pinned memory copy).

**A few limitations**

As these are fairly small LLMs you may not always get the prompt you want on the first go. The quality of the output is very much dependent on the input and the model so you may well need to regenerate or tweak the prompt.

Also if you're on a 4GB GPU I'd recommend the offload option if you're running your diffusion workflow on it as well.

**Try it out:**

GitHub: [https://github.com/Unica2804/Qwen\_3.5\_Comfy\_Prompt\_Enhancer.git](https://github.com/Unica2804/Qwen_3.5_Comfy_Prompt_Enhancer.git)

The README contains the install instructions and details of supported checkpoints.

This is a personal project I put together to make prompt enhancement a bit more practical on VRAM constrained hardware. Hopefully it's of some use to someone else in a similar situation!

Feel free to give it a go. I'd be very interested in feedback and please report any bugs/issues you come across on GitHub. Thanks!
```



document fetched 2026-11-04 00:41 · canonical https://reddit.com/r/comfyui/comments/1xmukz1/i_built_a_comfyui_prompt_enhancer_that_runs_a
