Ollama Video Prompt Refiner (Nukun)
Turn six rough video-prompt sections into one usable block
- prompt
- negative
- report
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.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| scene | STRING | Optional raw Scene guidance in English, German, or mixed language. | |
| character | STRING | Optional raw Character guidance in English, German, or mixed language. | |
| action | STRING | Optional raw Action guidance in English, German, or mixed language. | |
| camera | STRING | Optional raw Camera guidance in English, German, or mixed language. | |
| visual_style | STRING | Optional raw Visual Style guidance in English, German, or mixed language. | |
| audio | STRING | Optional raw Audio guidance in English, German, or mixed language. | |
| ollama_url | STRING | http://127.0.0.1:11434 | — |
| ollama_model | COMBO | autoren-darkidol-llama-3-1-8b:latest | 1 options: autoren-darkidol-llama-3-1-8b:latest |
| target_profile | COMBO | minimax_h3 | 2 options: minimax_h3, wan2_2_video |
| seed | INT | 00–18446744073709550000 | — |
| temperature | FLOAT | 0.450–2 | — |
| top_p | FLOAT | 0.900.01–1 | — |
| timeout_seconds | INT | 1201–600 | — |
| context_length | COMBO | 4096 | 7 options: 2048, 4096, 8192, 16384, 32768, 65536, +1 |
| creativity_modeopt | COMBO | balanced | faithful stays close to the source; balanced enriches it; cinematic adds stronger grounded direction and sound design. |
| pipeline_modeopt | COMBO | single | 2 options: single, review |
| fallback_modeopt | COMBO | adaptive | 3 options: adaptive, strict, continue |
| unload_after_runopt | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| negative | STRING | — |
| report | STRING | — |