hybrid-dit-176m

A 176M-parameter text-to-image latent diffusion model at 256ร—256, trained with Dew.

Try it in your browser: the hybrid-dit-176m Space runs this model on a shared CPU host, from an editable cell.

Architecture Dew's hybrid_dit: 16 blocks of width 768, 12 heads, patch size 2; S5 state-space blocks and attention blocks in a 3:1 ratio, zigzag scan order, 2D spatial fusion
Parameters 175,640,848 (the denoiser; the text encoder and VAE are separate)
Resolution 256ร—256, denoised as 32ร—32ร—4 latents
Text conditioning CLIP ViT-L/14 (openai/clip-vit-large-patch14) text encoder, frozen
Autoencoder Stable Diffusion VAE (pcuenq/sd-vae-ft-mse-flax), frozen
Diffusion EDM parameterization
Training 1,350,000 steps at batch size 128 on laion12m_coco: LAION-Aesthetics 12M (aesthetic score โ‰ฅ 6) and MS-COCO 2017
Weights The exponential moving average of the training weights (decay 0.999)

Use

Install Dew from GitHub at a commit this model is tested with (add the [cuda13] extra on an NVIDIA GPU):

pip install "dewml @ git+https://github.com/AshishKumar4/dew@e51ace7452e0956aa15e95bec33e7011d6327690"

Then sample:

from dew.sampling import CFG, DPMSolverMultistep, TextToImage

pipe = TextToImage.from_pretrained("dewml/hybrid-dit-176m")
images = pipe(["a red fox in a snowy forest"], key=0, steps=20,
              solver=DPMSolverMultistep(), guidance=CFG(5.0)).host().images

images is a float array in [-1, 1] of shape [prompts, 256, 256, 3]; dew.artifacts.uint8_pixels converts it to 8-bit pixels.

Files

This is a Dew run directory: run.json records the model, the text encoder, the VAE and the training configuration, and 1350000/ is the checkpoint TextToImage.from_run and from_pretrained read. The checkpoint holds the weights, including the text encoder's and the VAE's, and no optimizer state: it samples, and does not resume training.

Limitations

The model draws at 256ร—256. It learned from web images and their alt text, with the biases that data has, and it sometimes draws the flat white or black bands of letterboxed images.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using dewml/hybrid-dit-176m 1