Instructions to use facebook/DiT-XL-2-256 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use facebook/DiT-XL-2-256 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("facebook/DiT-XL-2-256", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
|
Download README.md from facebook/DiT-XL-2-256: direct link, hf CLI and curl.
- Browser
- Download file 732 Bytes
-
https://huggingface.co/facebook/DiT-XL-2-256/resolve/main/README.md
- Command line
-
hf download hf://facebook/DiT-XL-2-256/README.md
-
curl -L -o README.md https://huggingface.co/facebook/DiT-XL-2-256/resolve/main/README.md
732 Bytes
metadata
license: cc-by-nc-4.0
Scalable Diffusion Models with Transformers (DiT)
Abstract
We train latent diffusion models, replacing the commonly-used U-Net backbone with a transformer that operates on latent patches. We analyze the scalability of our Diffusion Transformers (DiTs) through the lens of forward pass complexity as measured by Gflops. We find that DiTs with higher Gflops---through increased transformer depth/width or increased number of input tokens---consistently have lower FID. In addition to good scalability properties, our DiT-XL/2 models outperform all prior diffusion models on the class-conditional ImageNet 512×512 and 256×256 benchmarks, achieving a state-of-the-art FID of 2.27 on the latter.