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

Painter MiniMax Ref To Video 2

Same reference magic, uploads handled inside

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

The original MiniMaxRefToVideo works great; the thing people stumble on is where the reference images go. You'd wire up autogrow inputs, tag them in the prompt, and hope the mapping was obvious. PainterMiniMaxRefToVideo2 is the author's answer: reference images now upload straight into the node through its own frontend upload area - no external wiring, no autogrow, just drop your pictures on the node and @ them in the prompt. The author's changelog is honest about the trade: images moved inside the node for clarity, while reference audio and video (used less often) still come from external inputs.

What it is

The v2 of the model/conditioning/minimax reference builder. Same H3 stack inputs - clip, vae, audio_vae - same prompt, resolution, length, and ref_max_size. The difference is in the input list: a new required ref_image_files string holds a JSON array of uploaded reference image info, managed by the node's upload UI. The external reference slots that remain are ref_videos, ref_video_audios, and ref_audios.

How it works

Same underlying H3 reference conditioning as v1: images, videos, and audios become in-context tokens, and you point at them in the prompt with the skill-style @ syntax - @图片1 @音频1 @视频1 - or the <Picture i> / <Video k> / <Audio j> tags. The author also documents the newer H3 skill formatting in the README: @图片1 to select material, 切镜3.5 (with a trailing space) to cut the camera at 3.5 seconds, and 【台词内容】 for dialogue lines. That's the "official MiniMax H3 skill" formatting the changelog mentions - worth trying even if you ignored it before.

ref_max_size still governs reference downscaling (scaled down, never up, snapped to 32px), and length still wants to stay in the ~124–362 trained band (124 ≈ 5s at 24fps). Outputs match v1: positive, LATENT, plus width, height, length, and the resolved prompt.

Inputs and outputs that matter

  • ref_image_files - internal; don't touch it manually, use the node's upload area.
  • ref_audios / ref_videos / ref_video_audios - the external references that still exist.
  • prompt - use the @ / tag syntax to select material and write lines.
  • length / ref_max_size - the usual H3 frame-count and reference-size constraints.
  • Outputs: positive + LATENT to the sampler; width/height/length/prompt forward.

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

There's a JS file in the pack's web/js/ (PainterMiniMaxRefToVideo2.js) that powers the upload area - if the upload UI is missing, that's usually a stale ComfyUI cache or a core version that doesn't serve extension JS; refresh hard and update ComfyUI.

Common issues

  • Upload area doesn't appear - the node's frontend extension isn't loading. Update ComfyUI, clear the browser cache, and restart the server once; the web/js extension needs a recent core.
  • Uploaded image ignored in output - you didn't @ it in the prompt. The upload just makes the image available; the tag is what tells H3 to use it.
  • Still can't get audio/video references in - by design those remain external inputs; that's the v2 trade the author chose for clarity.

If v1's external image wiring felt fiddly, this is the quality-of-life upgrade: pick images on the node, tag them, go. The skill-style prompting is the real power underneath, and the node makes the setup part painless.

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_image_filesSTRING[]Internal: JSON array of uploaded reference image file info (managed by frontend upload area)
ref_videosoptCOMFY_AUTOGROW_V3
ref_video_audiosoptCOMFY_AUTOGROW_V3
ref_audiosoptCOMFY_AUTOGROW_V3

Outputs (6)

NameTypeDescription
positiveCONDITIONING
LATENTLATENT
widthINT
heightINT
lengthINT
promptSTRING