Nodes/Ollama-ImageList/Ollama Generate (Image List)
ComfyUI Node

Ollama Generate (Image List)

The Ollama vision node that finally handles batches

By craftingmod·Created about a month ago·Updated 11 days ago· 2
Ollama Generate (Image List)
  • options
  • images
  • response
  • thinking
  • raw JSON
  • metrics
  • image manifest
urlhttp://127.0.0.1:11434
model
system
prompt
options_json
format_json
thinkoff
unload_after_responsefalse
keep_alive5m
timeout_seconds300
debugfalse

This is the node the pack is named after, and it's worth understanding why it exists. Most "talk to Ollama" nodes in ComfyUI take one image, or smash your batch into a montage, or call the API once per frame. Ollama Generate (Image List) instead flattens whatever you hand it - a single IMAGE, a batch, a nested list, a ComfyUI data list - and sends it all in exactly one /api/chat request. Every image keeps its original width, height, channels and order. No resizing, no cropping, no letterboxing, no montage. It's the difference between asking a vision model to describe a contact sheet and asking it to look at each picture.

The mechanism is refreshingly boring. The node declares V3 is_input_list=True, so ComfyUI passes the whole list to one execution instead of mapping the node over each item. Each image is independently encoded as a PNG, dropped into the images array of one stateless POST /api/chat call, and the response comes back non-streaming. There's no session, no history - system goes in a system-role message, prompt in a user-role message, and nothing is trimmed or rewritten. The Ollama and Python packages aren't even required: this talks to your server with Python's standard HTTP client, which also means no API key and no extra install beyond the node itself.

The inputs that matter are few. url (default http://127.0.0.1:11434) and model are the obvious pair - the model name must be exact, which is why the pack ships a Connectivity node to fill it. system and prompt are plain text. For sampling control, connect the pack's Options node into options - when a dictionary is connected it takes precedence over the manual options_json fallback, even an empty one. format_json accepts empty, the literal json, or a JSON Schema object for structured output. think (off/on/low/medium/high/max) turns on reasoning where the model supports it. One knob worth knowing: unload_after_response sends keep_alive: 0, so Ollama frees the model the moment the response lands - handy if Ollama is sharing your VRAM with the diffusion side of the workflow.

The outputs are response (what the model said), thinking (reasoning text), raw JSON, metrics, and an image manifest. The manifest is the debugging gift: enable debug and it describes counts, dimensions, byte sizes and hashes - never the base64 payloads or the prompt text - so you can prove a data list really did produce one request. Wire response into a ShowText node and you're done.

To verify the one-request behavior, turn on Ollama server logging and look for a single POST /api/chat.

Installing is the easy part:

cd ComfyUI/custom_nodes
git clone https://github.com/craftingmod/ComfyUI-Ollama-ImageList

...then restart ComfyUI. ComfyUI Manager users can just search "Ollama Image List". Two gotchas before you start: this pack needs a modern ComfyUI (it uses the V3 node API, so 0.19.3+), and it needs an Ollama server with a vision model pulled - ollama pull llava or a Qwen-VL / Gemma model, not a text-only one. If the model rejects multiple images, you get the backend's error verbatim; this node won't silently split, resize, or drop anything to make it work.

One more thing, and it's the privacy one: images go to whatever URL you configured. A non-loopback or remote URL will happily accept your private images, and URL credentials are redacted from diagnostics precisely because remote servers are a real use case. Keep url at 127.0.0.1:11434 unless you know what you're doing.

Local vision in the graph is a solved problem in 2026 - the KB's LLM-in-ComfyUI writeup tracks prompt enhancers and captioners running uncensored 8B models locally for exactly this reason. This node is the cleanest stateless way I've seen to bolt Ollama onto that pattern, because it treats a batch like a batch.

CategoryOllama/Image List

Inputs (13)

NameTypeDefaultDescription
urlSTRINGhttp://127.0.0.1:11434Ollama base URL. Only HTTP and HTTPS are accepted.
modelSTRINGExact Ollama model name.
systemSTRINGSystem message sent without trimming or rewriting.
promptSTRINGUser message sent without trimming or rewriting.
options_jsonSTRINGAdvanced fallback for a manually written Ollama options JSON object. Ignored when the options dictionary input is connected.
format_jsonSTRINGEmpty, the literal json, or a JSON Schema object.
thinkCOMBOoff6 options: off, on, low, medium, high, max
unload_after_responseBOOLEANfalseUnload the Ollama model immediately after the response is complete. When enabled, this overrides keep_alive with 0.
keep_aliveSTRING5m
timeout_secondsINT3001–86400
debugBOOLEANfalseInclude a payload-free request manifest in the manifest output.
optionsoptDICTPreferred Ollama options dictionary. When connected, this takes precedence over options_json, including when the dictionary is empty.
imagesoptIMAGEIMAGE single, batch, list, nested list, or ComfyUI data list.

Outputs (5)

NameTypeDescription
responseSTRING
thinkingSTRING
raw JSONSTRING
metricsSTRING
image manifestSTRING