ComfyUI Node

Video Prompt Expander

One idea in, a shootable video prompt out

By EricRollei·Created about a year ago·Updated 21 days ago· 48
Video Prompt Expander
    • positive_prompt_1
    • positive_prompt_2
    • positive_prompt_3
    • negative_prompt
    • breakdown
    • status
    ◄basic_promptA cat playing piano in a cozy room►
    ◄presetcinematic►
    ◄expansion_tierauto►
    ◄modetext-to-video►
    ◄llm_backendlm_studio►
    ◄api_endpointhttp://localhost:1234/v1►
    ◄temperature0.7►
    ◄positive_keywords►
    ◄negative_keywords►
    ◄num_variations1►
    ◄save_to_filefalse►
    ◄filename_basevideo_prompt►
    ◄wildcard_seed-1►
    ◄wildcard_llm_blocktrue►
    ◄wildcard_instructions—►
    ◄target_modelminimax_h3►
    ◄duration_seconds6.0►
    ◄nsfwoff►
    ◄violence_filteroff►

    You've got an idea - "a cat playing piano in a cozy room" - and you're staring at Wan 2.2's prompt box knowing that five words will come back as a static, stiff clip. This node fixes that specific gap. Feed it the short idea, and it hands back a proper shot-by-shot video prompt: lighting, camera movement, atmosphere, the whole cinematic vocabulary the video models were trained on. No API key, no cloud, no subscription. It just needs a local LLM running on your machine.

    It's the simplest node in Eric's Prompt Enhancers pack (one of five that all live under Add Node → Eric Prompt Enhancers), and it's the one I'd reach for when I want a decent Wan or LTX prompt without thinking. The catch, as always with local-LLM helpers: you have to have an LLM running first.

    How it works

    The node has no model of its own. It takes your basic_prompt, wraps it in a system prompt built from your chosen style preset and expansion tier, and POSTs it to an OpenAI-compatible chat endpoint. LM Studio's http://localhost:1234/v1 is the default; Ollama works too. Whatever 7-8B model you have loaded does the actual writing.

    Two details are worth knowing. First, expansion_tier (auto/basic/enhanced/advanced/cinematic) is how long you want the result - roughly 150 words up to a 600-1000 word director's note. Second, the node understands the pack's emphasis and alternation syntax: (keyword:1.5) boosts weight and {red|blue|green} makes the LLM pick a random option, which is a cheap way to get variety across a batch.

    The inputs that matter

    Most of the fields you can leave alone. The ones that actually do something:

    • basic_prompt - your raw idea. One sentence is fine; that's the whole point.
    • preset - cinematic, surreal, action, stylized, noir, or random. This is your style lever; it changes the system prompt the LLM works from.
    • num_variations - 1 to 3. Bump it to 3 and pick the best; the node runs the LLM once per variation.
    • temperature - 0.7 default. Lower for consistency, nudge toward 1.0 when variations start looking too similar.
    • llm_backend / api_endpoint - leave lm_studio and the default URL unless you run Ollama (then it's http://localhost:11434).

    The outputs

    positive_prompt_1, positive_prompt_2, positive_prompt_3 are the money outputs - wire one into your video model's positive conditioning. negative_prompt is auto-generated and usually worth keeping on Wan. breakdown tells you what tier and preset were actually applied (useful because auto picks for you), and status reports success or the file path if you enable save_to_file.

    One honest gotcha: there's a mode dropdown offering image-to-video, but this node has no image input - so that mode just frames the prompt as if a starting frame exists. If you actually want vision analysis of a reference image, use the dedicated Image-to-Video Prompt Expander or the Advanced node's reference_image socket.

    Install

    Shared with the whole pack. In ComfyUI Manager, search "Local LLM Prompt Enhancer" (the pack title is Eric's Prompt Enhancers for ComfyUI) and hit install. Or clone it yourself:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/EricRollei/Local_LLM_Prompt_Enhancer.git video_prompter
    cd video_prompter
    pip install -r requirements.txt
    

    Restart ComfyUI. The requirements file is tiny - just requests - because ComfyUI already ships torch, numpy and Pillow. What the README doesn't always make obvious: you still need an LLM backend. Install LM Studio, load a model (Llama 3 8B class or similar), start the server, done. The only heavy dependency is the optional Qwen3-VL vision backend (transformers, accelerate, bitsandbytes), and you don't need that for this node.

    Troubleshooting

    • "LLM connection failed" - the endpoint doesn't match your running server. Test http://localhost:1234/v1 in a browser; if it errors, LM Studio's server isn't started.
    • Empty output - check temperature isn't above ~1.5, and confirm a model is actually loaded in the backend.
    • Everything looks samey across variations - raise temperature or switch the preset to random.

    This is a low-stakes utility, and it's at its best when you pair it with the pack's Advanced node once you outgrow it - that one gives you actual per-category control over the shot.

    CategoryEric Prompt Enhancers

    Inputs (19)

    NameTypeDefaultDescription
    basic_promptSTRINGA cat playing piano in a cozy room—
    presetCOMBOcinematic7 options: custom, cinematic, surreal, action, stylized, noir, +1
    expansion_tierCOMBOauto5 options: auto, basic, enhanced, advanced, cinematic
    modeCOMBOtext-to-video2 options: text-to-video, image-to-video
    llm_backendCOMBOlm_studiolm_studio: Uses currently loaded model in LM Studio ollama: Uses currently loaded model in Ollama qwen3_vl: Auto-detects local Qwen3-VL model (no API server needed)
    api_endpointSTRINGhttp://localhost:1234/v1lm_studio/ollama: API endpoint URL qwen3_vl: Leave default, or specify custom model path like 'A:\path\to\model'
    temperatureFLOAT0.70.1–2—
    positive_keywordsSTRING—
    negative_keywordsSTRING—
    num_variationsINT11–3—
    save_to_fileBOOLEANfalse—
    filename_baseSTRINGvideo_prompt—
    wildcard_seedoptINT-1-1–2147483647Seed for wildcards: __name__, {a|b|c}, __objects[tag AND tag]__. -1 = fresh roll every run. 0 or more = reproducible picks.
    wildcard_llm_blockoptBOOLEANtrueTell the LLM which elements were picked at random so it keeps them: concepts keep their meaning, __=verbatim__ picks stay word for word. Off = the LLM only sees the resolved text.
    wildcard_instructionsoptSTRINGConnect the llm_instructions output of a Wildcard Processor or Semantic Variation node here when the wildcards were resolved before this node. The LLM is then told which elements were picked at random, and verbatim picks are checked in its answer, exactly as if this node had resolved them itself.
    target_modeloptCOMBOminimax_h3The video model the prompt is written for. wan22_video = this node's original behaviour, unchanged: Wan 2.2 tiers and shot structure. Any other model: the prompt is built from that model's profile (profiles/video/<id>.yaml) - its format, length, camera vocabulary, sound and dialogue rules - together with this node's preset, aesthetic controls and creativity settings. The tier then sets how long the prompt is inside the model's own range. MiniMax H3 prompts come out as its three named fields, not as a paragraph.
    duration_secondsoptFLOAT6.00–60Length of the clip you will generate. 0 = not stated. Ignored for wan22_video. Models with timed shots and sound (MiniMax H3, Seedance, Kling, Veo) need it: the timeline and the amount of action and dialogue are fitted to it. Set it to the same value as your sampler.
    nsfwoptCOMBOoffHow far wildcard picks may go (a word match on each entry and on list names, no model). off = SFW: no suggestive, nude or explicit lists or entries suggestive = also lingerie, bikinis, sexy, seductive ... nudity = also nude, naked, topless ... explicit = everything, including lists under _nsfw/ Fix a wrong rating in _catalog_user.yaml (nsfw: on a list, ratings: on entries). Entries pairing minor-related and sexual terms are removed at every level (config.json "content_filter").
    violence_filteroptCOMBOoffHold back violent wildcard picks (a word match on each entry and on list names, no model). off = nothing held back no gore = blood and gore, torture, mutilation, corpses no gore or violent acts = also murder, execution, stabbing, strangling, suicide ... no violence or weapons = also guns, swords, knives, bombs, battle, war Only wildcard picks are filtered; text you type is left as is.

    Outputs (6)

    NameTypeDescription
    positive_prompt_1STRING—
    positive_prompt_2STRING—
    positive_prompt_3STRING—
    negative_promptSTRING—
    breakdownSTRING—
    statusSTRING—