Nodes/ComfyUI-PainterNodes/Painter MiniMax Ref To Video
ComfyUI Node

Painter MiniMax Ref To Video

Reference conditioning for H3, done properly

By princepainter·Created 7 months ago·Updated 5 days ago· 194
Painter MiniMax Ref To Video
  • clip
  • vae
  • audio_vae
  • ref_images
  • ref_videos
  • ref_video_audios
  • ref_audios
  • positive
  • LATENT
  • width
  • height
  • length
  • prompt
prompt
width1376
height768
length124
ref_max_size1536

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: positive and LATENT to the sampler; width/height/length/prompt forward 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.

Categorymodel/conditioning/minimax

Inputs (12)

NameTypeDefaultDescription
clipCLIP
vaeVAE
audio_vaeVAE
promptSTRING
widthINT137632–16384
heightINT76832–16384
lengthINT1245–3600Frame count at 24 fps, (124 = ~5s, trained range is ~124-362)
ref_max_sizeINT153632–4096Reference max long edge. Reference images and videos are scaled down (never up) so the longest side fits this value, then snapped to 32px.
ref_imagesoptCOMFY_AUTOGROW_V3
ref_videosoptCOMFY_AUTOGROW_V3
ref_video_audiosoptCOMFY_AUTOGROW_V3
ref_audiosoptCOMFY_AUTOGROW_V3

Outputs (6)

NameTypeDescription
positiveCONDITIONING
LATENTLATENT
widthINT
heightINT
lengthINT
promptSTRING