Nodes/ComfyUI_DiT [WIP]/DiTLabelCombine
ComfyUI Node

DiTLabelCombine

The boring node that unlocks multi-label DiT

By city96·Created 3 years ago·Updated 2 years ago· 5
DiTLabelCombine
  • class_labels_a
  • class_labels_b
  • class_labels

DiTLabelCombine is the most boring node in city96's DiT pack, and it quietly unlocks the pack's most interesting trick. It takes two DITLAB values and concatenates them into one: class_labels_a plus class_labels_b, done. If you've used a combine utility in any other node pack, this looks identical. Except here, combining labels isn't cosmetic.

Why it matters

DiTSampler doesn't take a single label - it takes a list. Its sampling loop walks every class id you hand it and builds a separate guided pass for each one (in the source, that list is called y_inter). So a two-element list doesn't smear into averaged mush; the model gets conditioned on both classes across the whole denoising run. The classic move: pick "goldfish" with one DiTLabelSelect, "tiger shark" with another, combine the two, and let the sampler figure out the compromise. It's a janky, research-grade version of a mixed prompt, and it works better than you'd expect from a pack that calls itself unstable.

That's the entire point of this node. Without it, you can't feed the sampler more than one class without editing the graph's data by hand; with it, multi-class conditioning is a drag-and-drop. The pack's label vocabulary is the full 1,000-class ImageNet list, so there's plenty of room for absurd combinations.

The inputs and output

  • class_labels_a - a DITLAB, usually straight from DiTLabelSelect.
  • class_labels_b - another DITLAB; no real reason they have to differ, but that'd be a weird graph.
  • Output: class_labels (DITLAB), which feeds DiTSampler exactly like a single label would.

You can also stack combines - combine two, then combine the result with a third - if you want to push conditioning across three or four classes at once. The sampler walks whatever list you hand it.

Installing it

# ComfyUI Manager → Install Custom Nodes → search "ComfyUI_DiT"
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/city96/ComfyUI_DiT
# then restart ComfyUI

No requirements.txt, nothing to download for this node specifically. Same shared pack story as every other node here: city96's WIP lab bench, superseded by ComfyUI_ExtraModels per the README, and only useful with the class-conditional ImageNet checkpoints this pack was written for.

Troubleshooting

There's not much to troubleshoot. The only way to break it is to feed it something that isn't a DITLAB, which the graph UI mostly prevents, or to feed it an empty list - which produces a combined list of whatever it had, and the sampler will happily run on a single element. If your multi-label results look odd, blame the model, not the node: class-conditioned DiT wasn't trained to blend concepts the way a text model was, so the "compromise" it finds can be genuinely bizarre. That's half the fun.

CategoryDiT

Inputs (2)

NameTypeDefaultDescription
class_labels_aDITLAB
class_labels_bDITLAB

Outputs (1)

NameTypeDescription
class_labelsDITLAB