Nodes/Bjornulf_custom_nodes/๐Ÿฆ™ Ollama Job Selector ๐Ÿ‘‡
ComfyUI Node

๐Ÿฆ™ Ollama Job Selector ๐Ÿ‘‡

Give your local LLM a task in ComfyUI

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
๐Ÿฆ™ Ollama Job Selector ๐Ÿ‘‡
  • OLLAMA_PERSONA
  • OLLAMA_JOB
  • prompt_text
โ—„selected_promptNoneโ–บ
โ—„custom_prompt_prefixโ–บ

This is the "what should the LLM actually do?" knob for Bjornulf's Ollama integration. On its own the Ollama Talk node is a raw chat box. The Job Selector snaps a preset task onto it - turn a short idea into an SDXL prompt, expand a scene into a story, whatever - so you're not hand-writing a system prompt every time. Pick a job from a dropdown and it feeds the right instructions to your local model.

Where this fits

The Bjornulf pack lets you run a local LLM through Ollama inside your ComfyUI graph. That's genuinely useful for prompt work: you give the model a scrap like black cat and it fleshes it out into a full, model-appropriate prompt. But "flesh this out" depends entirely on the system prompt driving the model, and writing good ones is fiddly. The Job Selector is a menu of pre-written jobs so you skip that step. Think of it as the task half of the setup; a companion Persona Selector handles the voice half (who the model is pretending to be), and both plug into the Ollama Talk node that does the actual generating.

How it works

You choose a selected_prompt from the dropdown. The options are role-flavored jobs:

  • None - no preset; the model just chats, or you supply your own instructions.
  • Storyteller - you give it a main story ("Jerry the cat is in a bar") and it narrates.
  • Imaginator - you give it a specific event ("Jerry the cat is fighting a dog") and it imagines around it.
  • SDXL - you give it a short context ("black cat") and it writes an SDXL-style prompt.
  • FLUX - same idea, tuned for Flux's natural-language prompting instead.

The SDXL and FLUX jobs are the ones most people are here for - they're a prompt-expansion assistant baked into a dropdown, and picking the one that matches your checkpoint matters because SDXL wants tags and Flux wants sentences.

Two optional inputs let you go further: OLLAMA_PERSONA, to layer a personality on top of the job, and custom_prompt_prefix, a multiline field where you prepend your own instructions - handy when a preset is almost right and you just want to nudge it ("...and keep it under 40 words"). If you set the job to None and write your own prefix, you've got a fully custom system prompt with no preset at all.

The outputs are OLLAMA_JOB - the packaged job you wire into the Ollama Talk node - and prompt_text, the assembled instruction as a plain string so you can inspect exactly what's being sent.

Installing the pack - and Ollama itself

The nodes come in one pack: ComfyUI Manager โ†’ Install Custom Nodes โ†’ search Bjornulf_custom_nodes โ†’ install โ†’ restart, or

cd ComfyUI/custom_nodes
git clone https://github.com/justUmen/Bjornulf_custom_nodes

The catch is that the Ollama nodes need two things beyond the pack. First, the Python client: pip install ollama (it's in requirements.txt, but confirm it landed). Second - and this is the one people miss - the Ollama backend has to be installed and actually running on your machine, with a model pulled. The Talk node defaults to llama3.2:3b at http://0.0.0.0:11434, so ollama pull llama3.2:3b and make sure the Ollama service is up before you run the graph.

Common issues

The Job Selector itself is just a dropdown that packages instructions - it rarely misbehaves. When "the Ollama nodes don't work," it's the backend: Ollama isn't running, the model isn't pulled, or the URL/port doesn't match your setup (fix the address on the Ollama configuration node, not here). The other thing is job-to-model fit - running the SDXL job into a Flux checkpoint gives you tag-soup where Flux wanted a sentence, and vice versa. Match the job to your model, keep a Show node on prompt_text while you're dialing it in so you can see what the LLM is actually being told, and it behaves.

CategoryBjornulf

Inputs (3)

NameTypeDefaultDescription
selected_promptCOMBONone5 options: None, Storyteller, main story given (ex: 'Jerry the cat is in a bar.'), Imaginator, specific event given (ex: 'Jerry the cat is fighting a dog.'), SDXL, context given (Ex: 'black cat'), FLUX, context given (Ex: 'black cat')
OLLAMA_PERSONAoptOLLAMA_PERSONAโ€”
custom_prompt_prefixoptSTRINGโ€”

Outputs (2)

NameTypeDescription
OLLAMA_JOBOLLAMA_JOBโ€”
prompt_textSTRINGโ€”