Nodes/MiniMax-H3-Prompt-Rewriter-ComfyUI/MiniMax-H3 Reference Adapter
ComfyUI Node

MiniMax-H3 Reference Adapter

The MiniMax-H3 Reference Adapter

By pytraveler·Created 26 days ago·Updated a day ago· 99
MiniMax-H3 Reference Adapter
  • items
  • bundle
  • picture_1
  • picture_2
  • picture_3
  • picture_4
  • picture_5
  • picture_6
  • picture_7
  • picture_8
  • picture_9
  • video_1
  • video_2
  • video_3
  • audio_1
  • audio_2
  • audio_3
  • summary
split_batchestrue

The writer nodes in the pytraveler MiniMax-H3 pack take references one per socket. That's not an accident - it's what powers the drag-to-order strips and the checkbox-on-every-row rig, where each asset gets its own square, its own role and its own switch. One value per slot is the shape everything downstream is built around.

Plenty of nodes don't hand things over that way. An image batch arrives as one tensor holding many frames. A directory loader, or some other pack's output, hands you a list. A reference bundle is a whole structure in one value. None of those has a slot shape to go into, which is exactly the gap MiniMax-H3 Reference Adapter fills: references collected in together, separated back out one to a socket.

What it does

Nothing, is the honest answer - and that's the point. No model is loaded, no frame is decoded, nothing is described. Values pass through as they arrived; the node only sorts them by kind and spreads them out. A run costs about 14 milliseconds. It's a glorified routing hub, and glorified is fine because routing is precisely the fiddly bit.

Two ways in:

  • items - references arriving together. The socket takes any type, because the nodes that produce collections mostly don't declare one. What each item is gets worked out from the value itself rather than from the wire, so anything that isn't an image, a clip or a sound is skipped and counted on the summary.
  • bundle - a reference bundle from another pack (the node's own H3_REFS type), if you have one. Its pictures, clips and sounds are read out and placed ahead of anything on items, and the audio tracks that come with clips are treated as sounds in their own right.

Out the other side: picture_1 through picture_9, video_1 through video_3, audio_1 through audio_3, and a summary string. Nine pictures, three clips and three sounds is the room Ref2VA can hold, so that's the room there is - anything past it is reported on summary rather than silently dropped. Wire those outputs into the pack's writer and caption nodes the way you'd wire any individual asset, and the strips, numbering and checkboxes all keep working as if you'd plugged each one in by hand.

The one widget that's a real choice

split_batches decides what an image batch means, and the difference is genuine. On (the default), six frames become six references - six things the video reuses, each described and numbered separately. Off, they stay one reference made of several frames, described once - which is what a clip is. Turn it off when the batch is frames of a single shot and you don't want the writer describing the same scene six times.

Left-over outputs are harmless either way. An empty socket hands on nothing, and the writer nodes skip empties already, so plug in all nine and let the ones you didn't fill sit idle.

Why it exists as its own node

Because it can't be a socket on a writer - and this is the interesting bit. Receiving a real ComfyUI list means declaring is_input_list, and that flag isn't per-input. It rewrites the shape of every argument the node receives. Bolted onto a writer, it would change how the prompt, the duration and the options arrive. So it lives here, on a node that has nothing else to lose by it. Knowing that saves you from filing a confused feature request later: the adapter is the correct home for this job by construction.

Install

Same pack, same story as every node here: ComfyUI Manager, searching MiniMax-H3-Prompt-Rewriter-ComfyUI, or

cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI

then restart. This node ignores the pack's heavy requirements.txt entirely - no transformers, no bitsandbytes, no model of any kind is touched. If a reference isn't turning up where you expected, look at the line under the widget: it's the same text as the summary output, so what came in and where it went is readable off the node without wiring a preview to anything. That line will also name anything skipped or over capacity - the fix is usually one flip of split_batches.

CategoryMiniMax-H3

Inputs (3)

NameTypeDefaultDescription
split_batchesBOOLEANtrueWhat to do with an image batch: split it into one reference per frame, or keep it as a single reference made of several frames. The difference is real. Split, six frames are six things the video reuses, each described and numbered separately. Kept, they are one thing seen six times, described once -- which is what a clip is. Turn it off when the batch is frames of one shot.
itemsopt*References arriving together. An image batch is split into its frames, a list is taken apart, and a single value is passed through as one reference. The socket takes any type because the nodes that produce collections mostly do not declare one. What each item is gets worked out from the value itself, not from the wire, so anything that is not an image, a clip or a sound is skipped and counted on the summary.
bundleoptH3_REFSA reference bundle from another pack, if you have one. Its pictures, clips and sounds are read out and placed on the sockets below, ahead of anything on 'items'. The audio tracks that come with clips are treated as sounds in their own right, since that is what they are to a writer.

Outputs (16)

NameTypeDescription
picture_1IMAGE
picture_2IMAGE
picture_3IMAGE
picture_4IMAGE
picture_5IMAGE
picture_6IMAGE
picture_7IMAGE
picture_8IMAGE
picture_9IMAGE
video_1VIDEO
video_2VIDEO
video_3VIDEO
audio_1AUDIO
audio_2AUDIO
audio_3AUDIO
summarySTRINGWhat arrived and where it went, including anything skipped or over capacity. Wire it to a preview when a reference is not turning up where you expected.