đŠFMJ Ollama Prompt Generator
Let a local LLM write your prompts so you don't have to
- response
- debug_info
This is the flagship of the FMJ-LLM pack: text in, LLM-generated text out, everything local. You've almost certainly hit the workflow it exists for - the one where your video model wants a 500-word prompt with lighting, camera, and a full audio track, and you'd rather not hand-write that for the fortieth time. đŠFMJ Ollama Prompt Generator sends your raw idea to a model running in Ollama and hands back a finished prompt you can feed straight into your sampler or your LTX-Video workflow.
The default model is qwen3:2b, but it works with any chat-capable model in your ollama list - llama3, mistral, phi3, the whole crew. The trick is that it talks to Ollama's /api/chat endpoint, so it needs models with a chat template. If your model can't hold a conversation, this node can't use it.
How it works
The clever part is the system-prompt library. The node scans every .csv file in its csv/ folder, and each file should have exactly two columns: prompt_style and system_prompt. Every row becomes an entry in the prompt_style dropdown. Pick a style, and the node builds a chat with that system instruction plus your text as the user message, then calls the model with your max_tokens, temperature, and seed as generation options.
You can add your own styles just by dropping a CSV in that folder - no code, no restart needed beyond re-adding the node. And the pack ships a genuinely useful starter set. The LTX-Video style alone is worth the install: give it a raw scene idea and it expands it into a long, audio-aware video prompt, which is exactly the kind of long-form prompting LTX actually rewards. There's also a qwen_edit style tuned to write prompts for Qwen's image-edit model, and a character style that builds detailed SD-style makeover prompts. Fair warning: several of the shipped styles are in French, so don't be surprised if the dropdown reads like a menu from Lyon. Your own CSVs, your own language.
The inputs that matter
text(required) - the thing you want processed: a scene idea, a paragraph to rewrite, a question.prompt_style- the dropdown built from yourcsv/files.model_name- which Ollama model, defaultqwen3:2b.disable_thinking(default ON) - this one earns its keep. Details below.override_prompt(optional) - if you type anything here, it replaces the CSV system prompt for a one-off instruction.temperature- 0 for deterministic, 0.7 balanced, higher for chaos.max_tokens,seed,keep_alive, andrequest_timeoutfill out the rest.
Two outputs come back: response (the generated text) and debug_info (status, model, style, timeout - genuinely handy when the response comes back empty).
Where people get burned
Qwen3's thinking mode is the big one. Reasoning models can spend their whole token budget on a <think> block and return an empty or tag-filled answer - it's a known, widespread failure in the community. That's what disable_thinking is for: with it on, the node sends think: false and you get a straight answer. Leave it on.
request_timeout is a lie in this version. It's collected and reported in debug_info, but the code never actually passes it to the HTTP call - a comment in the source admits as much. So don't trust it to fix a timeout; if Qwen3 is taking forever, it's the model, not the setting.
Empty response, check in this order: is the model installed (ollama list)? Does your CSV actually contain the selected prompt_style? Is disable_thinking on? That covers most cases.
Installing it
Install the whole pack - ComfyUI Manager â search "ComfyUI_FMJ_LLM", or cd ComfyUI/custom_nodes && git clone https://github.com/bulldog68/ComfyUI_FMJ_LLM, then restart. The only pip dependency is ollama. You also need the Ollama runtime itself, and a model: ollama pull qwen3:2b.
Feed the response output into a text node feeding your positive prompt, or chain it with the pack's Vision node for image-to-video prompt generation. It's the most flexible node in the pack, and the CSV system is the part you'll actually make your own.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | â | |
| prompt_style | COMBO | LTX-Video | 18 options: LTX-Video, character, qwen_edit_relight, enhancer, Zimage, qwen_edit_camera, +12 |
| model_name | STRING | qwen3:2b | â |
| ollama_url | STRING | http://localhost:11434 | â |
| max_tokens | INT | 5121â16384 | Nombre max de tokens Ă gĂ©nĂ©rer. |
| temperature | FLOAT | 0.70â10 | â |
| seed | INT | 00â18446744073709550000 | â |
| keep_alive | INT | 5-1â120 | DurĂ©e (min) de mise en cache du modĂšle. |
| request_timeout | INT | 30030â3600 | DĂ©lai d'attente max (en secondes) pour la rĂ©ponse. Augmentez si Qwen3 est lent. |
| override_promptopt | STRING | â | |
| disable_thinkingopt | BOOLEAN | true | â |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| response | STRING | â |
| debug_info | STRING | â |