My Ollama Generate
Plain Q&A with a local LLM, inside your graph
- response
MyOllamaGenerate is the vanilla node of the ComfyUi-Ollama-YN pack: you type a question, a local LLM answers it, the text comes out as a string. That's it. No system prompt, no SD embellishing, no context chaining - just the raw generate call that everything else in this pack is built on top of.
It's the node to reach for when you want a text answer inside a workflow rather than a prompt. Brainstorming prompt ideas, translating a phrase, asking "what camera angle matches this description," summarizing a chunk of text you dropped into the multiline field - all of that is a one-node graph. It's also the best node to start with if you're testing whether the pack works at all, because it's the simplest possible path from "Ollama installed" to "text appeared."
How it works
Like the rest of the pack, it talks to your local Ollama server through the official ollama Python client - default endpoint http://127.0.0.1:11434, no key, nothing leaving the machine. It sends your prompt plus a seed (the only sampling option it passes), runs ollama pull first if the model isn't downloaded, and returns the generated response. It records the model in file/category.csv so the dropdown list can keep track of what you've used.
The inputs that matter
- prompt - the question. Multiline, so you can paste in context.
- model / extra_model - choose from the dropdown, or type a new model name into
extra_modelto auto-download and run it. Remember the README's:latestgotcha: write the tag explicitly. - seed - 0 gives you a random seed; set a fixed value if you want reproducible answers.
- keep_alive -
0frees the model from VRAM right after the answer;60mkeeps it resident for follow-ups. - debug - flip to
enableand the ComfyUI console prints the full request and response metadata (model, timings, token counts), which is genuinely useful for figuring out whether a slow answer is the model or your disk.
The single output, response, is a plain STRING. Wire it into a PreviewText or any text-consuming node.
Installing it
Same pack, same one-time setup. ComfyUI Manager (search "ComfyUi-Ollama-YN"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/wujm424606/ComfyUi-Ollama-YN.git
# restart ComfyUI
Requirements are ollama, pandas, and aiohttp; the actual model runs through the Ollama app, which you need installed and running in the background. The pack has been dormant since September 2024, but this node is so thin that there's essentially nothing to break.
Where people get burned
The classic failure is an empty dropdown and a dead run - which almost always means Ollama isn't running, because the model list is built live from ollama list at http://127.0.0.1:11434. Second: you pull a model and it never appears in the list. Add the node again or restart ComfyUI; don't use right-click "Reload," which the README explicitly warns errors out. And if you downloaded models before the pack's September 2024 update, they won't show until you add them to file/category.csv (open it in a spreadsheet, drop the model names into the text_model column, save, restart). Those three account for nearly every "why is this broken" post about the pack's text nodes.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | What is Art? | — |
| debug | COMBO | 2 options: disable, enable | |
| url | STRING | http://127.0.0.1:11434 | — |
| model | COMBO | 0 options: | |
| extra_model | STRING | none | — |
| seed | INT | 00–18446744073709550000 | — |
| keep_alive | COMBO | 2 options: 0, 60m |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |