Nodes/Nukun_ComfyUI_Nodes/Ollama Video Prompt Refiner (Nukun)
ComfyUI Node

Ollama Video Prompt Refiner (Nukun)

Turn six rough video-prompt sections into one usable block

By OnekoSL·Created 3 months ago·Updated 11 days ago· 1
Ollama Video Prompt Refiner (Nukun)
    • prompt
    • negative
    • report
    scene
    character
    action
    camera
    visual_style
    audio
    ollama_urlhttp://127.0.0.1:11434
    ollama_modelautoren-darkidol-llama-3-1-8b:latest
    target_profileminimax_h3
    seed0
    temperature0.45
    top_p0.90
    timeout_seconds120
    context_length4096
    creativity_modebalanced
    pipeline_modesingle
    fallback_modeadaptive
    unload_after_runtrue

    The Ollama nodes in this pack share a family resemblance, and this one is the video specialist: it takes six rough source strings - Scene, Character, Action, Camera, Visual Style, Audio - and has a local Ollama model harmonize them into one finished prompt for either MiniMax H3 or Wan 2.2 video. Same local-LLM philosophy as the image refiner (no API, no key, small uncensored model on your own machine), aimed at the two video formats people in this ecosystem actually render.

    Why six inputs instead of one blob? Because that's how video prompting fails. A MiniMax H3 prompt needs distinct sections or the model half-ignores the scene; a Wan 2.2 prompt needs the image-description and the motion-description separated, and the KB's Wan guidance is emphatic that mixing them is the single biggest prompt mistake. Feeding the LLM six labeled boxes makes it structurally impossible for it to forget a section exists.

    How it works

    Each of scene, character, action, camera, visual_style, audio is optional and can be English, German, or mixed - German gets a separate translation pass first. Then, depending on target_profile:

    • minimax_h3 - Ollama writes at least 100 words per section (validation accepts from 60 up, no ceiling), the node assembles them locally under the fixed [Scene], [Character], [Action], [Camera], [Visual Style], [Audio] headers, and rejects/repairs anything too short. Audio stays in.
    • wan2_2_video - the six sources get joined into one continuous visual shot in character/action/scene/camera/style order. Audio is deliberately excluded - Wan 2.2 has no audio output - and gets recorded in the report instead.

    creativity_mode is the dial you'll actually touch. faithful barely rewrites, balanced (default) substantially rewrites into "production direction" - compatible secondary motion, atmosphere, camera timing, lighting response, sound texture - and cinematic pushes hardest on directing and sound-design choices. If your source is already good, faithful keeps it; if you want the LLM to earn its keep, leave it on balanced.

    pipeline_mode = single makes one compiler request and one repair only when needed. review adds a semantic continuity/grounding review and at most one correction. fallback_mode (strict/adaptive/continue) decides what happens when validation keeps failing or Ollama drops: adaptive locally formats your supplied sections, continue survives even connection failures, both without inventing replacement prose. Note the subtle difference from the image refiner's defaults - here adaptive is the default fallback, and it's the safe one.

    Inputs and outputs

    The six text inputs plus ollama_url/ollama_model (defaults http://127.0.0.1:11434 and autoren-darkidol-llama-3-1-8b:latest), target_profile, and the usual seed/temperature/top_p/timeout_seconds/context_length. Outputs are the finished prompt, a negative, and a report documenting what ran.

    Installing it

    Same pack install as everything else:

    cd ComfyUI/custom_nodes
    git clone https://github.com/OnekoSL/Nukun_ComfyUI_Nodes.git
    

    Restart, then make sure Ollama is serving (ollama serve) with a model pulled (ollama pull autoren-darkidol-llama-3-1-8b:latest). The natural workflow the README pushes: take the six section outputs from MiniMax H3 Prompt Builder (Nukun) and plug them straight into the matching six inputs here - randomized structured prompt in, harmonized production prompt out.

    Common issues

    The H3 validation is strict on section length, and the "at least 100 words, accept from 60" rule trips people who feed short bullet-point sources - the node will legitimately send those through a repair request. If you keep seeing repair loops, your model is weak at long structured output; a stronger local model or creativity_mode = cinematic (which writes more) usually fixes it. Double-quoted dialogue is preserved untouched through both stages, so if your quotes vanish, that's a model behavior problem worth reporting rather than a node bug. And remember the wan2_2_video profile has no Audio - don't expect audio guidance in the prompt, it lives in the report.

    CategoryNukun/Video

    Inputs (18)

    NameTypeDefaultDescription
    sceneSTRINGOptional raw Scene guidance in English, German, or mixed language.
    characterSTRINGOptional raw Character guidance in English, German, or mixed language.
    actionSTRINGOptional raw Action guidance in English, German, or mixed language.
    cameraSTRINGOptional raw Camera guidance in English, German, or mixed language.
    visual_styleSTRINGOptional raw Visual Style guidance in English, German, or mixed language.
    audioSTRINGOptional raw Audio guidance in English, German, or mixed language.
    ollama_urlSTRINGhttp://127.0.0.1:11434
    ollama_modelCOMBOautoren-darkidol-llama-3-1-8b:latest1 options: autoren-darkidol-llama-3-1-8b:latest
    target_profileCOMBOminimax_h32 options: minimax_h3, wan2_2_video
    seedINT00–18446744073709550000
    temperatureFLOAT0.450–2
    top_pFLOAT0.900.01–1
    timeout_secondsINT1201–600
    context_lengthCOMBO40967 options: 2048, 4096, 8192, 16384, 32768, 65536, +1
    creativity_modeoptCOMBObalancedfaithful stays close to the source; balanced enriches it; cinematic adds stronger grounded direction and sound design.
    pipeline_modeoptCOMBOsingle2 options: single, review
    fallback_modeoptCOMBOadaptive3 options: adaptive, strict, continue
    unload_after_runoptBOOLEANtrue

    Outputs (3)

    NameTypeDescription
    promptSTRING
    negativeSTRING
    reportSTRING