dit_xlarge_2(pretrained: bool | str = False, weights: DiTXLarge2Weights | None = None, overrides: object = {})DiT-XL/2 — the XL backbone at patch 2.
Model Size
Parameters
pretrainedbool or str= FalseLoad a released checkpoint.
True takes IMAGENET1K_256;
"IMAGENET1K_512" selects the 512-pixel model and moves
sample_size to the 64-side latent it was trained on. These
are the only two DiT checkpoints ever published, and they are
CC-BY-NC-4.0.An explicit tag, taking precedence over
pretrained.**overridesobject= {}Optional
DiTConfig field overrides.Returns
DiTModelThe denoising network.
Notes
Reference: Peebles and Xie, "Scalable Diffusion Models with Transformers", ICCV, 2023 (arXiv:2212.09748), Table 1 — 28 layers, hidden 1152, 16 heads.
Reports 2.27 FID with classifier-free guidance at scale 1.50 on ImageNet 256x256 — the state of the art when published, and 3.04 at 512x512 with the same config over a 64-wide latent.
Examples
>>> from lucid.models import dit_xlarge_2
>>> config = dit_xlarge_2().config
>>> config.depth, config.hidden_size, config.patch_size
(28, 1152, 2)