Nodes/FMJ-LLM/🩙FMJ Ollama Prompt Generator
ComfyUI Node

🩙FMJ Ollama Prompt Generator

Let a local LLM write your prompts so you don't have to

By bulldog68·Created 10 months ago·Updated 3 months ago· 3
🩙FMJ Ollama Prompt Generator
    • response
    • debug_info
    ◄textâ–ș
    ◄prompt_styleLTX-Videoâ–ș
    ◄model_nameqwen3:2bâ–ș
    ◄ollama_urlhttp://localhost:11434â–ș
    ◄max_tokens512â–ș
    ◄temperature0.7â–ș
    ◄seed0â–ș
    ◄keep_alive5â–ș
    ◄request_timeout300â–ș
    ◄override_promptâ–ș
    ◄disable_thinkingtrueâ–ș

    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 your csv/ files.
    • model_name - which Ollama model, default qwen3: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, and request_timeout fill 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.

    Category🌀FMJ

    Inputs (11)

    NameTypeDefaultDescription
    textSTRING—
    prompt_styleCOMBOLTX-Video18 options: LTX-Video, character, qwen_edit_relight, enhancer, Zimage, qwen_edit_camera, +12
    model_nameSTRINGqwen3:2b—
    ollama_urlSTRINGhttp://localhost:11434—
    max_tokensINT5121–16384Nombre max de tokens Ă  gĂ©nĂ©rer.
    temperatureFLOAT0.70–10—
    seedINT00–18446744073709550000—
    keep_aliveINT5-1–120DurĂ©e (min) de mise en cache du modĂšle.
    request_timeoutINT30030–3600DĂ©lai d'attente max (en secondes) pour la rĂ©ponse. Augmentez si Qwen3 est lent.
    override_promptoptSTRING—
    disable_thinkingoptBOOLEANtrue—

    Outputs (2)

    NameTypeDescription
    responseSTRING—
    debug_infoSTRING—