[llama.cpp] System One Decide (Media Sequential)
One question, asked of every image in the batch
- session
- question
- images
- answer
- metrics
- media_diagnostics
- session
Here's a job that shows up the moment you start generating in batches: you've got sixteen rendered frames and one question - "is there water in this?" - and you want sixteen answers, one per frame. Wiring sixteen Decide nodes is not a workflow, it's a coping mechanism. Re-running one node in a loop means re-loading or re-prefilling for every frame, which is slower and dumber than it needs to be.
[llama.cpp] System One Decide (Media Sequential) is the batch version. It runs one System One decision per image in the batch, in order, reusing one session with one model load. Then it unloads once at the end if you asked it to.
What it does
Same inputs as the single Decision node: session, system, context, question, the session_unload toggle, and optional images. The difference is what it does with a batch. Every image item in the connected IMAGE batch becomes its own request against /v1/systemone, with the session kept alive across all of them.
Your context and question are broadcast across the batch if you supply one value, or paired one-per-image if you supply exactly that many. The pack's rule, stated in its own error message: each of those inputs "must contain one value or exactly N values" - where N is the number of images. If you wire three questions and send four images, the node fails before the first request rather than doing something clever with the mismatch.
Worth knowing: if nothing is connected to images, you get exactly one text-only decision. Same node, degenerate case. That's a useful way to test a question's wording before you point it at a pile of frames.
Reading the outputs
All three meaningful outputs come back as lists, one entry per image: answer, metrics, and media_diagnostics. Only session is scalar, so you can chain another sequential decision or hand the handle to [llama.cpp] Unload Session.
To get at an individual result you need to index the list first. The pack's own example does it with a core GetItemFromList feeding [llama.cpp] Extract Answer:
System One Decide (Media Sequential) ─ answer ─ GetItemFromList (index 3) ─ answer ─ Extract Answer
That means the two structural lists you'll actually build are: one branch per index you care about, or a downstream node that consumes lists natively. The first one is fine for three images and awful for forty - if you need every frame's answer, index a few and look at metrics or result_json for the whole set rather than planting forty extractors.
Also note the unload flag reports on the last element only. That's not a bug; it's the node telling you when the session actually closed.
Installing it
Same pack, same drill:
cd ComfyUI/custom_nodes
git clone https://github.com/craftingmod/ComfyUI-llama-multimodal.git
Restart ComfyUI, or search llama multimodal in ComfyUI Manager and install ComfyUI-llama-multimodal. Requirements that bite here specifically: ComfyUI 0.19.3 or later, the GGUF model and its matching mmproj in ComfyUI/models/LLM (without a projector, images are sent but never really evaluated), a llama binary - get it from Settings → llama-multimodal → Download llama.cpp if it isn't on your PATH - and the decision nodes' optional llama dependency makoto-decision, which lives in the pack's requirements.txt. Manager installs it; a manual clone may leave you fixing that by hand.
Where people get burned
You're paying for the image encode N times. The session is reused, but each request still carries its own image, and the diagnostics that come back are explicitly marked unverified_remote when media is attached - a 200 response never proves the server actually looked at the picture. Sixteen plausible-looking probabilities can be sixteen hallucinations with a nice decimal point.
The wrong session type. Native Sessions are refused here, same as the single Decide node. Runtime or Connect only.
Server without the endpoint. If your llama.cpp server build doesn't serve /v1/systemone, this fails loudly on the first image. There's no token-scoring fallback - the prefill family ([llama.cpp] Prefill Decide (Media Sequential)) is the one that works through /completion and scores letter tokens instead.
Batch length surprises. Answer lists are as long as the image batch, so a stray five-frame batch doubles the work and shifts every index downstream. Print the length once with a core node before you build anything on top of it, and remember the node is non-idempotent: a queue rerun re-asks every question for every image.
VRAM held hostage. Left on Keep, the model stays resident after the run. This pack's sessions are the fix for the oldest complaint about LLM nodes in ComfyUI - people have been restarting ComfyUI to reclaim VRAM from stuck text models for years - but only if you actually flip session_unload on the last decision in the chain, or wire session into [llama.cpp] Unload Session.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| session | OLLAMA_IMAGE_LIST_LLAMA_CPP_SESSION | — | |
| system | STRING | — | |
| context | STRING | — | |
| question | OLLAMA_IMAGE_LIST_LLAMA_CPP_QUESTION | — | |
| session_unload | BOOLEAN | false | Unload the session after all System One requests. |
| imagesopt | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| answer | OLLAMA_IMAGE_LIST_LLAMA_CPP_ANSWER | — |
| metrics | STRING | — |
| media_diagnostics | OLLAMA_IMAGE_LIST_LLAMA_CPP_MEDIA_DIAGNOSTICS | — |
| session | OLLAMA_IMAGE_LIST_LLAMA_CPP_SESSION | — |