Nodes/LLM Text Processor/LLM Text Processor
ComfyUI Node

LLM Text Processor

Rewrite prompts and caption images with a local GGUF — no API key, and Windows first

By KingManiya·Created 5 months ago·Updated 13 days ago· 41
LLM Text Processor
  • image
  • RESPONSE
  • REASONING
  • PERF
model
mmprojnone
system_prompt
promptDescribe this image in detail.
max_tokens2048
temperature0.70
top_p0.80
top_k20
repeat_penalty1.00
ctx_size8192
memory_modeauto
n_gpu_layers99
n_cpu_moe_layers1
seed1
timeout_seconds300
reasoningoff
enable_processingtrue
extra_args

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 to Describe 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, or auto, controlling whether the model thinks before answering.
  • system_prompt - a dropdown fed by .txt files in ComfyUI/models/LLM/prompts. Drop a captioner.txt there 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 .gguf extension under models/LLM. Place one and refresh/restart.
  • Image input fails - mmproj set to none, or a projector that doesn't match the model. The node catches the embedding-mismatch error and tells you which n_embd values collided, so the fix is usually "pick the mmproj that belongs to your GGUF."
  • Empty or cut-off response - raise max_tokens. With reasoning on, the model spends part of the budget thinking before it ever reaches the answer.
  • Out of memory - lower ctx_size first (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.

CategoryLLM Text Processor

Inputs (19)

NameTypeDefaultDescription
modelCOMBOGGUF model loaded from ComfyUI/models/LLM. mmproj files are hidden from this list.
mmprojCOMBOnoneVision projector GGUF. Required when one or more images are connected.
system_promptCOMBOSystem prompt preset from ComfyUI/models/LLM/prompts, or none.
promptSTRINGDescribe this image in detail.User prompt sent to the selected model.
max_tokensINT20481–32768Maximum number of tokens to generate.
temperatureFLOAT0.700–2Sampling temperature. Lower is more deterministic.
top_pFLOAT0.800–1Nucleus sampling threshold.
top_kINT201–1000Top-K sampling cutoff.
repeat_penaltyFLOAT1.000–3Penalty applied to repeated tokens.
ctx_sizeINT8192512–1048576Context window size in tokens. Use a value supported by the selected GGUF; larger context uses more VRAM.
memory_modeCOMBOautoAdvanced memory placement mode: auto, gpu_layers, cpu_moe_layers, or gpu_and_cpu_moe_layers.
n_gpu_layersINT99-1–999Used only in gpu_layers and gpu_and_cpu_moe_layers modes. Number of model layers to place on the GPU.
n_cpu_moe_layersINT11–999Used only in cpu_moe_layers and gpu_and_cpu_moe_layers modes. Number of MoE layers to keep on the CPU.
seedINT1-1–4294967295Random seed. Use -1 for a random seed.
timeout_secondsINT30010–3600Maximum time to wait before generation is stopped.
reasoningCOMBOoffReasoning output mode.
imageoptIMAGEOptional image input. A single image or ComfyUI batch is passed to llama.cpp.
enable_processingoptBOOLEANtrueWhen enabled, run normal node processing. When disabled, forward the input prompt directly as RESPONSE.
extra_argsoptSTRINGOptional advanced llama.cpp parameters. Leave empty for normal use.

Outputs (3)

NameTypeDescription
RESPONSESTRINGFinal model response with reasoning blocks removed.
REASONINGSTRINGExtracted reasoning when present in model output.
PERFSTRINGllama.cpp prompt and generation speed.