Nodes/Extra Models for ComfyUI/Hunyuan DiT Size Conditioning (advanced)
ComfyUI Node

Hunyuan DiT Size Conditioning (advanced)

Hunyuan DiT Size Conditioning (advanced)

By city96·Created 3 years ago·Updated 2 years ago· 537
Hunyuan DiT Size Conditioning (advanced)
  • cond
  • cond
width1024
height1024

The "(advanced)" tag in the display name is doing real work - this is the kind of node most people wire in once with sensible defaults and never think about again, rather than something you tune per-generation. It's the Hunyuan DiT equivalent of what PixArt Resolution Conditioning does elsewhere in this same pack, and conceptually similar to SDXL's own width/height/crop conditioning: feeding the model explicit resolution information as part of its conditioning signal, not just as the shape of the latent tensor.

If you've used SDXL and know roughly what its size-conditioning inputs are for, the instinct transfers here reasonably well - DiT-family architectures inherited that same idea of telling the model "here's the resolution context you're working in" as an explicit signal alongside the text embedding. The specifics of exactly how Hunyuan DiT's architecture uses this "source size" value aren't spelled out in the pack's own documentation beyond the node existing, so treat the mechanism as "resolution-aware conditioning, same family as PixArt's" rather than something with fully documented internals.

Inputs. Three, all required. cond is the conditioning output from Hunyuan DiT Text Encode. width and height are plain integers, both defaulting to 1024, ranging 0 to 8192, stepping by 16 - note the step size is coarser than PixArt Resolution Conditioning's (which steps by 1), which is a small but real difference if you're used to that sibling node.

Output. cond - same conditioning, resolution folded in, ready for your KSampler.

Where it fits. Right after Hunyuan DiT Text Encode, right before the sampler: Hunyuan DiT Text Encoder LoaderHunyuan DiT Text EncodeHunyuan DiT Size Conditioning (advanced) → KSampler. Set width/height to match whatever resolution your actual latent is - the same values feeding your EmptyLatentImage, not arbitrary numbers.

Installing the pack. ComfyUI Manager: search "Extra Models for ComfyUI." Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/city96/ComfyUI_ExtraModels

then pip install -r requirements.txt and restart.

Practical guidance. Leave this at your actual generation resolution and move on - there's no evidence in this pack's documentation that deviating from your real width/height buys you anything, and the "(advanced)" naming is a reasonable signal from the author that tweaking it isn't where your effort is best spent. If you're troubleshooting a Hunyuan DiT workflow and considering whether this node is the source of a problem, it's a fairly low-suspicion node - mismatched width/height here versus your actual latent shape is the only failure mode worth checking, and even that is more likely to produce subtly-off output than a hard error. This whole corner of the pack (Hunyuan DiT support generally) is flagged WIP by its own maintainer, so if something behaves unexpectedly, it's worth remembering you're on a less-traveled path than PixArt within the same node collection.

CategoryExtraModels/HunyuanDiT

Inputs (3)

NameTypeDefaultDescription
condCONDITIONING
widthINT10240–8192
heightINT10240–8192

Outputs (1)

NameTypeDescription
condCONDITIONING