Nodes/ComfyUI-TJ_NODE/Batch to Multi Image Output(TJ)
ComfyUI Node

Batch to Multi Image Output(TJ)

One batch in, up to 64 branches out — the splitter for selective workflows

By designloves2·Created 4 months ago·Updated 4 days ago· 13
Batch to Multi Image Output(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
  • IMAGE_13
  • IMAGE_14
  • IMAGE_15
  • IMAGE_16
  • IMAGE_17
  • IMAGE_18
  • IMAGE_19
  • IMAGE_20
  • IMAGE_21
  • IMAGE_22
  • IMAGE_23
  • IMAGE_24
  • IMAGE_25
  • IMAGE_26
  • IMAGE_27
  • IMAGE_28
  • IMAGE_29
  • IMAGE_30
  • IMAGE_31
  • IMAGE_32
  • IMAGE_33
  • IMAGE_34
  • IMAGE_35
  • IMAGE_36
  • IMAGE_37
  • IMAGE_38
  • IMAGE_39
  • IMAGE_40
  • IMAGE_41
  • IMAGE_42
  • IMAGE_43
  • IMAGE_44
  • IMAGE_45
  • IMAGE_46
  • IMAGE_47
  • IMAGE_48
  • IMAGE_49
  • IMAGE_50
  • IMAGE_51
  • IMAGE_52
  • IMAGE_53
  • IMAGE_54
  • IMAGE_55
  • IMAGE_56
  • IMAGE_57
  • IMAGE_58
  • IMAGE_59
  • IMAGE_60
  • IMAGE_61
  • IMAGE_62
  • IMAGE_63
  • IMAGE_64
get_name(none)
out_count2
auto_setfalse

Batch to Multi Image Output (TJ) is the un-batcher: it takes one IMAGE batch and splits it into individual IMAGE_1 through IMAGE_64 outputs so each image can go down its own branch. The use case is anything where you want to treat images differently after a batch step - upscale only the good ones, run a face-fix on one, save the rest as-is, compare them side by side. A normal batch forces every downstream node to process every image; this node hands you per-image lanes.

How it works

You feed it a batch via the images input and set out_count to however many output lanes you want (1–64). On execution it slices the batch: image i of the batch goes to IMAGE_i+1. Three details matter:

  • Outputs beyond the batch size are not errors - each unused lane gets a black placeholder tensor matching the batch's resolution. If your batch has 4 images and out_count is 6, IMAGE_5 and IMAGE_6 come out black.
  • It always declares all 64 outputs in the API, so anything you leave unconnected is simply dropped - you can set out_count to 2 and ignore the other 62.
  • get_name is the wireless receive slot: pick a TJ Set provider and the batch arrives without a wire. auto_set does the reverse - publish each output as a wireless provider.

So the honest mental model: this is a batch de-multiplexer with training wheels. If you know the batch size at workflow-edit time, you can hardcode out_count; if it varies, keep in mind that "missing" lanes show up as black images, not None - and anything that takes an IMAGE will happily process a black frame. (The pack ships a derived node, Batch to MinimaxH3, that returns None instead of black for overflow, specifically because MiniMax H3 reference slots treat None as "disconnected".)

Inputs and outputs that matter

  • images - the batch to split.
  • out_count - how many lanes to activate. Set it to your expected batch size.
  • get_name / auto_set - wireless receive and publish.

Outputs: IMAGE_1IMAGE_64, one single-image tensor per lane. Wire each into whatever branch you want, then into a preview or save node.

Install

ComfyUI Manager → Install Custom Nodes → search TJ_NODE, or:

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

Restart ComfyUI. Nothing extra to download for this one. Category: ✨ TJ_Node/Image.

The trap to dodge

The black-placeholder behavior is the thing that bites people. If you're splitting a variable-size batch and wiring all lanes, you'll get black frames in your outputs whenever the batch is shorter than out_count, and nodes downstream will happily save or compare those black frames. Either set out_count to match your known batch size, or gate the branches so a black placeholder never reaches a save node. That's not a bug - it's the design - but you need to know it's there.

Category ✨ TJ_Node/Image

Inputs (4)

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

Outputs (64)

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
IMAGE_13IMAGE
IMAGE_14IMAGE
IMAGE_15IMAGE
IMAGE_16IMAGE
IMAGE_17IMAGE
IMAGE_18IMAGE
IMAGE_19IMAGE
IMAGE_20IMAGE
IMAGE_21IMAGE
IMAGE_22IMAGE
IMAGE_23IMAGE
IMAGE_24IMAGE
IMAGE_25IMAGE
IMAGE_26IMAGE
IMAGE_27IMAGE
IMAGE_28IMAGE
IMAGE_29IMAGE
IMAGE_30IMAGE
IMAGE_31IMAGE
IMAGE_32IMAGE
IMAGE_33IMAGE
IMAGE_34IMAGE
IMAGE_35IMAGE
IMAGE_36IMAGE
IMAGE_37IMAGE
IMAGE_38IMAGE
IMAGE_39IMAGE
IMAGE_40IMAGE
IMAGE_41IMAGE
IMAGE_42IMAGE
IMAGE_43IMAGE
IMAGE_44IMAGE
IMAGE_45IMAGE
IMAGE_46IMAGE
IMAGE_47IMAGE
IMAGE_48IMAGE
IMAGE_49IMAGE
IMAGE_50IMAGE
IMAGE_51IMAGE
IMAGE_52IMAGE
IMAGE_53IMAGE
IMAGE_54IMAGE
IMAGE_55IMAGE
IMAGE_56IMAGE
IMAGE_57IMAGE
IMAGE_58IMAGE
IMAGE_59IMAGE
IMAGE_60IMAGE
IMAGE_61IMAGE
IMAGE_62IMAGE
IMAGE_63IMAGE
IMAGE_64IMAGE