LLM Text Processor
Rewrite prompts and caption images with a local GGUF — no API key, and Windows first
- image
- RESPONSE
- REASONING
- PERF
If you've been re-wording your prompts by hand while your image model waits, this is the node that kills the copy-paste step. LLM Text Processor is a single-node pack that runs a local GGUF model through llama.cpp and hands the finished text back inside your workflow. The name is honest about the other thing it is: no API, no key, no cloud. Every token is generated on your machine.
Why you'd reach for it: it fits the direction image prompting went. Modern LLM-encoded models read your prompt as an instruction, so having another local LLM write that instruction is translation between two things speaking the same language - the community converged on this exact "have an LLM enhance the prompt" pattern, and it stopped being a browser-tab thing and became a node. This pack is a deliberately small take on that: one node, prompt writing, rewriting, translation, captioning, extraction. Not an ecosystem, just the one thing.
How it works
The node doesn't load the model into Python. It shells out to llama.cpp's llama-cli, which the pack downloads itself - pinned to a specific release (b8840 at the time of writing) and vendored under the pack's vendor/llama.cpp folder. It builds the CLI command from your sampling inputs, writes your prompt to a temp file, and for vision it saves each image to a temp PNG and passes --mmproj plus --image. Then it parses llama-cli's output: reasoning blocks wrapped in [Start thinking] / [End thinking] get split into the REASONING output and stripped from the final answer, and the speed line gets captured as PERF. Temp files are cleaned up even on errors, and it respects ComfyUI's interrupt button.
Inputs and outputs that matter
The two dropdowns you'll set first are model and mmproj. Models are discovered recursively from ComfyUI/models/LLM; the projector dropdown shows only files with "mmproj" in the name, and it's required if you connect an image. Everything else is familiar sampler territory, but a few deserve attention:
prompt- what you ask the model to do. Defaults toDescribe this image in detail.and supports dynamic prompts.max_tokens- 2048 default, up to 32768. This is the setting that bites (see below).reasoning-off,on, orauto, controlling whether the model thinks before answering.system_prompt- a dropdown fed by.txtfiles inComfyUI/models/LLM/prompts. Drop acaptioner.txtthere and it appears as an option.
The three outputs are RESPONSE (reasoning stripped), REASONING (the thought block, if any), and PERF (llama.cpp's speed line). Wire RESPONSE into your text encode or prompt input and you're done. There's also an enable_processing toggle that turns the node into a pure passthrough - handy for A/B comparing generated vs. hand-written prompts, and it skips all model checks.
Installing it
ComfyUI Manager, search LLM Text Processor, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/KingManiya/ComfyUI-LLM-text-processor
Then drop GGUF files anywhere under ComfyUI/models/LLM (for example ComfyUI/models/LLM/My-Model/model-q4_k_m.gguf). The node only needs numpy and Pillow, which ComfyUI already ships - the real download is llama.cpp itself, done automatically on first run.
The big gotcha: it's Windows x64 CUDA 13 for now
Here's where people get burned. The automatic llama.cpp setup only supports Windows x64 + CUDA 13. On Linux or Mac the shipped code hits an unsupported-platform error and stops - there's no manual binary-path override in the pack as of 1.3.0, despite the README implying otherwise. If you're not on that exact setup, check the repo for newer releases before committing to it. On Windows, a failed setup is almost always internet/GitHub access - run the node again and watch the console, which logs download progress, total size, and speed so a slow connection doesn't look like a freeze.
Common issues
- No models in the dropdown - nothing with a
.ggufextension undermodels/LLM. Place one and refresh/restart. - Image input fails -
mmprojset tonone, or a projector that doesn't match the model. The node catches the embedding-mismatch error and tells you whichn_embdvalues collided, so the fix is usually "pick the mmproj that belongs to your GGUF." - Empty or cut-off response - raise
max_tokens. Withreasoningon, the model spends part of the budget thinking before it ever reaches the answer. - Out of memory - lower
ctx_sizefirst (8192 default), then a smaller quant.
The README also has sensible starter presets for Qwen, Gemma 4, and gpt-oss - copy those numbers and adjust from there. It's a genuinely useful little node if your platform matches; a hard pass if it doesn't.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | GGUF model loaded from ComfyUI/models/LLM. mmproj files are hidden from this list. | |
| mmproj | COMBO | none | Vision projector GGUF. Required when one or more images are connected. |
| system_prompt | COMBO | System prompt preset from ComfyUI/models/LLM/prompts, or none. | |
| prompt | STRING | Describe this image in detail. | User prompt sent to the selected model. |
| max_tokens | INT | 20481–32768 | Maximum number of tokens to generate. |
| temperature | FLOAT | 0.700–2 | Sampling temperature. Lower is more deterministic. |
| top_p | FLOAT | 0.800–1 | Nucleus sampling threshold. |
| top_k | INT | 201–1000 | Top-K sampling cutoff. |
| repeat_penalty | FLOAT | 1.000–3 | Penalty applied to repeated tokens. |
| ctx_size | INT | 8192512–1048576 | Context window size in tokens. Use a value supported by the selected GGUF; larger context uses more VRAM. |
| memory_mode | COMBO | auto | Advanced memory placement mode: auto, gpu_layers, cpu_moe_layers, or gpu_and_cpu_moe_layers. |
| n_gpu_layers | INT | 99-1–999 | Used only in gpu_layers and gpu_and_cpu_moe_layers modes. Number of model layers to place on the GPU. |
| n_cpu_moe_layers | INT | 11–999 | Used only in cpu_moe_layers and gpu_and_cpu_moe_layers modes. Number of MoE layers to keep on the CPU. |
| seed | INT | 1-1–4294967295 | Random seed. Use -1 for a random seed. |
| timeout_seconds | INT | 30010–3600 | Maximum time to wait before generation is stopped. |
| reasoning | COMBO | off | Reasoning output mode. |
| imageopt | IMAGE | Optional image input. A single image or ComfyUI batch is passed to llama.cpp. | |
| enable_processingopt | BOOLEAN | true | When enabled, run normal node processing. When disabled, forward the input prompt directly as RESPONSE. |
| extra_argsopt | STRING | Optional advanced llama.cpp parameters. Leave empty for normal use. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| RESPONSE | STRING | Final model response with reasoning blocks removed. |
| REASONING | STRING | Extracted reasoning when present in model output. |
| PERF | STRING | llama.cpp prompt and generation speed. |