[llama.cpp] Thinking / Reasoning Profile
Turn Thinking Off Before Your Captions Get Weird
- reasoning
Modern instruction models love to think out loud. For some jobs that's genuinely better output. For the jobs this pack exists to do - write me a video prompt, caption this frame, pick between these two labels - it is mostly a tax, and sometimes an outright bug.
This node is the switch. Its output is a typed OLLAMA_IMAGE_LIST_LLAMA_CPP_REASONING_CONFIG cable you connect to Create Runtime Session, where it applies for the life of the server.
How it works
Four controls:
reasoning_mode - auto leaves whatever the model's own template says alone; off and on explicitly disable or enable reasoning. off wins: per the pack's changelog, an explicit disable takes precedence over the effort setting, so you don't get a half-on state from an "off mode, high effort" combination.
reasoning_effort - auto, low, medium, high, xhigh. Only used when mode is on.
max_reasoning_tokens - a separate cap on the thinking span. 0 means no separate limit, and here's the part people miss: reasoning and the final answer still share Generate's max_tokens. So capping this helps, but a tight max_tokens with thinking on will still eat your answer.
preserve_thinking - keep prior thinking content in the chat history sent to the model. The author's own tooltip says it's Qwen3.5+ only "and may not work", which is refreshingly honest and, in fairness, the kind of thing you'd rather know up front.
What to actually set
Off, confidently, for captions and prompt-writing. This is the practical take: for a short, format-shaped rewrite the thinking pass adds latency and gives you a second thing that can leak into your output as literal prompt tokens. The KB's read of this space is blunt and correct - the job selects for small and obedient, and reasoning models spend tokens deliberating and are more likely to leak scratch-work into the result. ComfyUI users who hit this end up regexing Thinking Process: out of their conditioning before they work out that the model was showing its homework.
On for genuine judging. If you're using Decide to make a call that actually needs reasoning, or asking a Qwen-VL "thinking" build to reconcile two images, turn it on with medium effort and give the graph headroom in max_tokens. xhigh is for when you've measured that it helps; it's expensive.
auto as the default to leave alone. It respects the model's template. If you downloaded a model whose default is thinking-on and your captions start with a preamble, that's not the node misbehaving - that's the template, and off is your fix.
On the consumer side, this matters too: the Generate nodes have a separate thinking output from the response, so you can see what the model was doing. Getting a response, an empty thinking and output that still looks reasoned means the split didn't catch your model's format - which is essentially the situation the Muse Glimmer Response Parser exists for.
Where people get burned
Thinking eats the token budget. Symptom: coherent paragraphs that stop mid-sentence, or a response field that's a truncated reasoning transcript. Raise max_tokens or turn thinking off. Check the metrics output before you blame the model.
A reasoning model in a one-token decision slot is a bad fit. With Decide, thinking in front of the label is exactly what the grammar-constrained path tries to prevent - but if you've forced on here, you're fighting it. Off.
The cable only bites at session creation. Reasoning config is read when the server starts. Change it, re-queue, don't sit there re-running Generate and wondering.
Install
Manager → search llama multimodal → ComfyUI-llama-multimodal, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/craftingmod/ComfyUI-llama-multimodal.git
ComfyUI 0.19.3+. This node itself needs nothing installed beyond the pack. The session it feeds needs the llama runtime (Settings → llama-multimodal → Download llama.cpp, or your own on PATH), your GGUF and its matching mmproj in ComfyUI/models/LLM, and - if you're on the Native session path - the optional multimodal llama-cpp-python fork.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| reasoning_mode | COMBO | auto | auto leaves template controls untouched; off and on explicitly disable or enable reasoning. |
| reasoning_effort | COMBO | auto | Used only when reasoning_mode is on. |
| max_reasoning_tokens | INT | 00–65536 | 0 applies no separate reasoning limit. Reasoning and final output still share Generate's max_tokens. |
| preserve_thinking | BOOLEAN | false | Preserve thinking/reasoning content in the chat history passed to the model.Currently, Qwen3.5+ only and may not work. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| reasoning | OLLAMA_IMAGE_LIST_LLAMA_CPP_REASONING_CONFIG | — |