Jinja Chat Template Preset
The one-node reason Qwen chat templates stop lying to you
- chat template
If you're running a Qwen vision GGUF directly inside ComfyUI - no Ollama server in between - there's a good chance the model's own chat template is quietly sabotaging you. This node is the fix, and it's almost insultingly simple: one dropdown, one string output, zero processing. It reads a packaged Jinja chat template file out of the pack's presets/chat_template folder and hands you the raw text to plug into the model.
The name is honest. OllamaImageList_JinjaChatTemplatePreset loads a Jinja chat template preset. That's the whole job. Don't reach for it expecting anything cleverer - reach for it because pasting a multi-kilobyte template into a text widget every workflow is miserable, and because the one template it ships is worth having.
Why this exists
The pack is called "Ollama Image List," but look at what it actually ships and the README has gone stale: alongside the Ollama /api/chat nodes there's now a whole llama.cpp backend that loads GGUFs straight into the graph (the thing people kept asking for - see how "local LLM" tooling keeps splitting into "talk to Ollama" versus "load the GGUF yourself"). That direct path works through a Model Profile node that bundles a handler, sampling defaults, and an optional custom_chat_template.
That last input is the hook. When llama-cpp-python loads a GGUF, it normally trusts the chat template baked into the file's metadata - and Qwen GGUFs are exactly where that trust breaks. Qwen 3 and Qwen-VL generations lean on thinking tags (reasoning_effort, preserve_thinking, tools) that a half-baked embedded template mangles or omits. Feed the profile a known-good override and the backend passes it to llama-cpp-python as chat_format, replacing the metadata version wholesale.
The shipped preset, qwen_fixed, is a copy of froggeric's Qwen-Fixed-Chat-Templates v22.1 (Apache-2.0, sourced from Hugging Face). It's the community fix for exactly this failure mode, and the pack vendors it so you don't have to go find the file yourself. Given how much of the modern image stack is Qwen-encoded under the hood, "fixed Qwen templating" is more relevant than it sounds.
Inputs and output
The info_schema is refreshingly small:
- template (combo, default
qwen_fixed) - which preset to load. Today there's exactly one option, and that's not a bug. - chat template (string) - the entire
.jinjafile as text. The tooltip says it all: connect to a Model Profile'scustom_chat_templateinput.
That's the whole wiring: Jinja Chat Template Preset → Model Profile's custom_chat_template → the pack's llama.cpp generate node. The node does no validation, no interpolation - it's Path.read_text() wearing a GUI. All the cleverness lives in whatever consumes the string.
Installing
Standard custom node, no model downloads and no extra pip packages - the runtime deps come from ComfyUI itself:
cd ComfyUI/custom_nodes
git clone https://github.com/craftingmod/ComfyUI-Ollama-ImageList
Then restart ComfyUI. Easier still: search "Ollama-ImageList" in ComfyUI Manager. One catch worth knowing: this is a ComfyUI V3 node (comfy_api) and the manifest wants ComfyUI >= 0.19.3 plus Python >= 3.12. If it doesn't appear after install, you're on a stale ComfyUI - update first.
Where people get burned
- You only see
qwen_fixedin the dropdown. That's all that ships. Want another one? Drop your own.jinjafile into<pack>/presets/chat_templateand restart - the dropdown is built by scanning that folder, so your file shows up automatically. Typing a name that isn't there raises a helpful error listing the valid options. - You connected it to the Ollama server path and nothing changed. Expected. This preset targets the pack's llama.cpp/GGUF Model Profile path, where you own the templating. When you're talking to the Ollama server, the server handles templating on its side and this node has no seat at that table.
- The README doesn't mention this node. The README describes the v0.1.0 Ollama-only scope and trails the code badly. Trust the installed nodes, not the docs - the llama.cpp backend and its Model Profile sibling are real and registered.
One honest caveat: a wrong template override won't error, it'll just make the model behave oddly - think-tag soup in the output, refusals to use tools, that kind of thing. If you don't know why you need a custom template, you probably don't; leave the profile on its built-in defaults and this node unused.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| template | COMBO | qwen_fixed | Jinja chat template preset to load. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| chat template | STRING | Connect to a Model Profile's custom_chat_template input. |