Nodes/ComfyUI-TJ_NODE/Batch to MinimaxH3 (TJ)
ComfyUI Node

Batch to MinimaxH3 (TJ)

Feeding a batch into H3's reference slots without the black frames

By designloves2·Created 3 months ago·Updated 5 days ago· 13
Batch to MinimaxH3 (TJ)
  • images
  • IMAGE_1
  • IMAGE_2
  • IMAGE_3
  • IMAGE_4
  • IMAGE_5
  • IMAGE_6
  • IMAGE_7
  • IMAGE_8
  • IMAGE_9
  • IMAGE_10
  • IMAGE_11
  • IMAGE_12
get_name(none)
out_count2
auto_setfalse

Most ComfyUI batch splitters have a dirty little secret: when your batch is shorter than the number of output slots, the empty slots get filled with solid black frames. For a normal image pipeline that's mostly harmless - you just see some dark squares. For MiniMax H3's reference nodes it's a real problem, because "black image" reads as "here is a reference frame of nothing" and the model will absolutely try to use it.

Batch to MinimaxH3 (TJ) is the variant that fixes exactly that: instead of black frames, out-of-range outputs come back as None - the same as if the slot were never wired. And H3's reference nodes (the Autogrow-style ones like "MiniMax H3 Reference to Video" that accept a group of optional image slots) are designed to treat None as "that slot is unconnected" and skip it. So you can feed a batch of three reference images, wire all nine reference slots, and the six empty ones just quietly become empty. No black garbage gets into your reference conditioning.

How it works is unglamorous in the best way. It's a copy of the pack's Batch to Multi Image Output (TJ) with two changes: the output cap drops from 64 to 12, and the fill logic returns None instead of a black tensor. The node unwraps nested/video-shaped tensors down to a flat [B,H,W,C] batch, then for each of the out_count slots either emits images[i:i+1] if i < batch_size, or None. Any slots above out_count are None too.

The inputs that matter:

  • images - your IMAGE batch (e.g. from a Multi Image Loader).
  • out_count - how many of the 12 outputs to actually expose (1–12). Set this to the number of reference slots you're feeding.
  • get_name - wireless provider name for receiving the batch from a TJ Set node; leave at (none) if you're wiring directly.
  • auto_set - whether each output also registers itself as a wireless provider. Off unless you live the wireless life.

Outputs are IMAGE_1 through IMAGE_12. Feed them into H3's ref_images group, or wire them to the ref_video_*/ref_images inputs of the TJ H3 Sequencer/One-Take Sampler if you're using this pack's own nodes.

The trap, and it's the trade-off the author accepts openly: None is not a legal value for single-value consumers. If you connect one of these outputs to a plain PreviewImage or a Save Image node that can't accept None, that node will throw. These outputs are only safe feeding nodes built to absorb optional None slots - the H3 Autogrow reference family, and this pack's own H3 nodes. Keep the empty slots aimed at those, and you're fine.

One note on naming: despite the "MinimaxH3" branding, the node itself knows nothing about H3 - it just returns None. It exists for the H3 workflow because that's where black frames bite hardest. If your H3 workflow takes a single image per slot rather than a batch, you don't need it. When you've got a folder of reference shots you want to run as one batch, you do.

Install

Ships in ComfyUI-TJ_NODE:

cd ComfyUI/custom_nodes
git clone https://github.com/designloves2/ComfyUI-TJ_NODE

or ComfyUI Manager → search "ComfyUI-TJ_NODE", then restart. No model downloads and no extra Python dependencies for this node specifically.

Troubleshooting

  • Downstream node errors with something about None - you wired an empty slot into a node that can't take it. Move it to an H3-style multi-optional-slot consumer, or raise out_count to match the batch.
  • Black frames still appearing - check whether your H3 reference node actually treats None as unconnected. If it's not the Autogrow family, it may not, and you're back to the old behavior.
  • Only the first N of your batch come through - that's correct; it's out_count capped at 12. Split bigger batches or loop.
Category ✨ TJ_Node/Image

Inputs (4)

NameTypeDefaultDescription
imagesIMAGE
get_nameCOMBO(none)1 options: (none)
out_countINT21–12
auto_setBOOLEANfalse

Outputs (12)

NameTypeDescription
IMAGE_1IMAGE
IMAGE_2IMAGE
IMAGE_3IMAGE
IMAGE_4IMAGE
IMAGE_5IMAGE
IMAGE_6IMAGE
IMAGE_7IMAGE
IMAGE_8IMAGE
IMAGE_9IMAGE
IMAGE_10IMAGE
IMAGE_11IMAGE
IMAGE_12IMAGE