Painter MiniMax Ref To Video
Reference conditioning for H3, done properly
- clip
- vae
- audio_vae
- ref_images
- ref_videos
- ref_video_audios
- ref_audios
- positive
- LATENT
- width
- height
- length
- prompt
Reference-to-video is the workflow where character consistency finally behaves: you feed the model a handful of images, videos, and audio clips, and it keeps those subjects across the generation. PainterMiniMaxRefToVideo is the PainterNodes conditioning node for MiniMax H3's reference mode - the "ref2va" builder that takes up to nine reference images, plus videos and audios, and turns a prompt full of @-tags into the conditioning and latent H3 needs. And because H3 is multimodal, the references aren't just visual: audio references carry voice, and reference videos carry motion.
What it is
A model/conditioning/minimax node. Required inputs are your H3 stack - clip, vae, audio_vae - plus a prompt, resolution, length, and ref_max_size. Optional autogrow inputs take ref_images (up to 9), ref_videos, ref_video_audios, and ref_audios. Outputs are positive, LATENT, plus the resolved width, height, length, and the prompt - the last four being handily wired forward so your sampler stays in sync.
How it works
You reference things in the prompt by tag: <Picture 1>, <Video 1>, <Audio 1> - or, in the newer skill-style prompting the author documents, just @图片1 @音频1 @视频1 (the node formats it for you). Each connected reference becomes an in-context token in the conditioning; H3's "Contextual Omni Representation" is what lets text, images, video, and audio share one context. ref_max_size (default 1536) governs how big references get: images and videos are scaled down - never up - so their longest side fits the value, then snapped to 32px. The length tooltip is the practical one: frame count at 24fps, with 124 ≈ 5 seconds and the trained range roughly 124–362.
The prompt output deserves a mention: the node echoes back the resolved prompt, so you can inspect exactly what conditioning got built (and debug why that @音频1 isn't being heard).
Inputs and outputs that matter
- ref_images / ref_videos / ref_audios / ref_video_audios - the references. Each maps to a
<Picture i>/<Video k>/<Audio j>tag. - prompt - tag the references here and describe the shot.
- length - keep it in the ~124–362 trained band.
- ref_max_size - reference resolution cap; bigger isn't always better, it just costs memory.
- Outputs:
positiveandLATENTto the sampler;width/height/length/promptforward for consistency.
Install
Part of the PainterNodes pack. ComfyUI Manager → search "PainterNodes" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/princepainter/ComfyUI-PainterNodes
cd ComfyUI-PainterNodes
pip install -r requirements.txt
Common issues
- Reference ignored - you described the shot but never tagged the reference in the prompt. Un-tagged references are dead weight; the
<Picture i>/@syntax is how the model knows what to use. - Faces drift anyway - H3's references hold identity much better than open models used to, but multi-reference still benefits from describing the relationship in the prompt ("the woman from
<Picture 1>, wearing the jacket from<Picture 2>"). - Length errors - off the 124–362 trained range and you're asking the model to extrapolate; results degrade before they fail.
- Node won't appear - the H3 nodes use ComfyUI's newer node API; update ComfyUI core before troubleshooting the pack.
If you've been fighting character consistency with IP-Adapter stacks and first-frame tricks, H3's native reference conditioning is a different category of problem - and this node is the clean front door to it.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| vae | VAE | — | |
| audio_vae | VAE | — | |
| prompt | STRING | — | |
| width | INT | 137632–16384 | — |
| height | INT | 76832–16384 | — |
| length | INT | 1245–3600 | Frame count at 24 fps, (124 = ~5s, trained range is ~124-362) |
| ref_max_size | INT | 153632–4096 | Reference max long edge. Reference images and videos are scaled down (never up) so the longest side fits this value, then snapped to 32px. |
| ref_imagesopt | COMFY_AUTOGROW_V3 | — | |
| ref_videosopt | COMFY_AUTOGROW_V3 | — | |
| ref_video_audiosopt | COMFY_AUTOGROW_V3 | — | |
| ref_audiosopt | COMFY_AUTOGROW_V3 | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| LATENT | LATENT | — |
| width | INT | — |
| height | INT | — |
| length | INT | — |
| prompt | STRING | — |