MiniMax H3 Reference-to-Video
Character lock, with a bracket-tag catch
- reference_images_tensor
- client
- video_url
Reference-to-video is how you stop a generator from inventing a new face every shot. Instead of describing a character in words and hoping, you hand the model actual media - up to nine reference images, three reference videos, and three reference audios - and it builds the clip around them. In the local world, Bernini made multi-reference R2V the thing people went nuts for. This is the hosted, no-GPU version of the same idea through WaveSpeed's API, and if you need a character, product, or scene to stay recognizably the same thing across a shot, this node is the one in the pack that can actually pull it off.
The catch, and it's a real one, is in the prompt format. Every reference must be cited with a bracket tag - <Picture 1>, <Video 1>, <Audio 1>. Mention a reference in plain text and it is silently ignored. That's not a failure you'll get an error for; you'll just get a video where your reference did nothing. The tooltip says it plainly, and it's the difference between this working and this feeling broken.
How it works
The node accepts references two ways. reference_images_tensor takes a ComfyUI IMAGE batch, where each batch slice becomes one reference (capped at 9) - the clean path when you're pulling frames from your canvas. The string inputs take URLs:
reference_images- up to 9, cited<Picture N>, billed $0.02 each. Takes a single URL or a list.reference_videos- up to 3, sharing a 15-second total budget, billed $0.05/s. Supplying any video reference forces 480p output.reference_audios- up to 3, each trimmed to 15s, billed $0.02 each. One subtlety: a reference video's own audio fills the earliest<Audio>slots first, so you don't need to pass audio separately if the video already has the sound you want.
Then the prompt cites them: "the woman from <Picture 1> walks toward camera wearing <Picture 2>'s jacket" - that kind of thing. The bracket tags are how the model knows which media to use where.
Inputs that matter
Beyond the references: prompt is required, and it carries the <...> citations plus the optional Audio: line. duration runs 3–15s (snaps to the frame grid), aspect_ratio has the full seven-option list, resolution is 480p (~$0.05/s) or 768p (~$0.125/s) - both before reference charges, which stack on top. seed is a true API seed: fixed = reproducible, -1 = fresh each queue.
Output is video_url (STRING) - pipe it into the pack's Preview Anything node. Polling runs every 10s with a 20-minute timeout, the longest of the H3 trio, because R2V jobs with several references genuinely take a while.
Installing and configuring
Part of the ERPK Collection pack. ComfyUI Manager: search erpk, install ERPK Custom Nodes, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/eRepublik-Labs/comfyui-nodes-erpk.git erpk
cd erpk && pip install -r requirements.txt
WaveSpeed key from wavespeed.ai into Settings > ERPK > API Keys (right-click canvas > ERPK Settings). No models to download - all server-side.
Common issues
- References doing nothing - you didn't cite them, or you cited them in prose without the
<Picture N>tag. The model only acts on bracket tags. - My video came out 480p and I asked for 768p - any reference video forces 480p. It's an API constraint, not a bug; drop the video reference if you need the higher resolution.
- The bill surprised you - references are charged on top of the per-second rate. Nine images at $0.02 each plus a few seconds at $0.05/s adds up fast. It's the honest cost of consistency.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Cite every reference with bracket tags: <Picture 1>-<Picture 9>, <Video 1>-<Video 3>, <Audio 1>-<Audio 3>. A reference mentioned only in plain text is ignored. Add an 'Audio:' line to steer the soundtrack. | |
| reference_imagesopt | STRING | Reference image URL(s), cited as <Picture N>. Single URL or list. Up to 9. Billed $0.02 each. Ignored when `reference_images_tensor` is connected. | |
| reference_videosopt | STRING | Reference video URL(s), cited as <Video N>. Up to 3, sharing a 15s budget. Supplying any forces 480p output. Billed $0.05 per second. | |
| reference_audiosopt | STRING | Reference audio URL(s), cited as <Audio N>. Up to 3, each trimmed to 15s. Billed $0.02 each. A reference video's own audio fills the earliest <Audio> slots first. | |
| reference_images_tensoropt | IMAGE | Reference images as a ComfyUI IMAGE batch (B,H,W,C). Each batch slice becomes one reference, capped at 9. Takes precedence over `reference_images` URLs when connected. | |
| clientopt | WAVESPEED_AI_API_CLIENT | WaveSpeed API client (optional if API key is configured in Settings) | |
| durationopt | INT | 53–15 | Video duration in seconds (3-15). Snaps to the model's frame grid, so a 5s request lands near 5.2s. |
| aspect_ratioopt | COMBO | 16:9 | Video aspect ratio |
| resolutionopt | COMBO | 480p | Video resolution. Roughly $0.05/s at 480p and $0.125/s at 768p, before reference charges. Reference videos force 480p. |
| seedopt | INT | -1-1–2147483647 | Generation seed, sent to the API. A fixed seed reproduces the same video and lets ComfyUI reuse the cached result; -1 generates a new one each queue. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video_url | STRING | — |