DitCheckpointLoader
DitCheckpointLoader
- model
Worth knowing going in: this isn't a text-to-image model in the sense you're probably used to. "DiT" here means the original Facebook Research paper model - the diffusion transformer architecture, from the 2022 "Scalable Diffusion Models with Transformers" work - trained purely on ImageNet's 1000 object classes with no prompts at all. It's the architecture that PixArt, Sana, HunyuanDiT, and eventually SD3 and Flux all trace their lineage back to, but the original itself is a research artifact: you don't type a description, you pick a class label off a list (see DiTCondLabelSelect, this pack's node for exactly that), and it generates an image of that class.
If you came here expecting SDXL-style prompting and got confused why there's no text box in sight, that's why - this is closer to a teaching example of the architecture than a production image generator, and it's genuinely useful for exactly that: understanding what a "bare" DiT does before layers of text conditioning get bolted onto it.
Inputs. Three, all required. ckpt_name is a dropdown from your checkpoints folder. model picks the DiT variant using the original paper's naming: size (Small, Base, Large, XL) slash patch size (2, 4, or 8) - twelve combinations total, from S/8 up to XL/2. Smaller patch sizes generally mean more compute for finer detail; XL/2 is the flagship configuration from the paper. image_size is either 256 or 512 - DiT's outputs are capped there, no higher-resolution variants exist in this implementation.
Output. MODEL, into your KSampler.
Getting weights. Either the original checkpoints from the DiT repo, or the author's own converted FP16 safetensor versions on HuggingFace - the latter being the more convenient path since they're already in ComfyUI-friendly format. Whichever you grab, they go in your checkpoints folder; the README notes that if you had them sitting in a ComfyUI/models/dit folder from an older setup, you'll need to move them.
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.
The rest of a working DiT graph. Model here, then DiTCondLabelSelect for your positive class label and DiTCondLabelEmpty for the negative - the README is emphatic on this last point: "Make sure to use the Empty label conditioning for the Negative input of the KSampler!" Skipping it or wiring something else into negative is the most common way people break DiT generation. DiT shares SD1.5's latent space, so a standard SD1.5 VAE and EmptyLatentImage work fine - no special VAE needed here, unlike Sana. Runs in FP16 but doesn't have much beyond that in the way of optimization, so don't expect the speed of a more modern architecture. ConditioningCombine nodes reportedly work if you want to blend multiple class labels; the "area" conditioning nodes don't, since the model can't handle the dynamic input dimensions those rely on.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| ckpt_name | COMBO | 0 options: | |
| model | COMBO | 12 options: XL/2, XL/4, XL/8, L/2, L/4, L/8, +6 | |
| image_size | COMBO | 2 options: 256, 512 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |