Views
No views yet
1import torch
2from diffusers import DiffusionPipeline
3
4pipe = DiffusionPipeline.from_pretrained(
5 "clark-labs/clark-air-sana-1.6b-gemlite-2bit", trust_remote_code=True, torch_dtype=torch.bfloat16
6).to("cuda")
7
8img = pipe("a corgi astronaut floating in space, photorealistic, 8k",
9 num_inference_steps=20, guidance_scale=4.5).images[0]
10img.save("out.png")trust_remote_code=True is required: the transformer is a custom component
(ClarkAirSanaGemliteTransformer) that builds the GemLite kernels on load. The 4-bit text
encoder loads automatically from its embedded quantization_config.gemlite, bitsandbytes, diffusers >= 0.38, transformers, accelerate, torch, safetensors.| Component | Format | Size |
|---|---|---|
transformer/ | GemLite INT2, ternary trunk + bf16 islands | 519 MB |
text_encoder/ | Gemma-2, bitsandbytes NF4 | 2.1 GB |
vae/ | DC-AE (AutoencoderDC), bf16 | 596 MB |
tokenizer/ + scheduler/ | — | 33 MB |
clark_air_sana_gemlite_2bit.safetensors + load_clark_air_gemlite.py —
a single-file packed transformer with a minimal loader, for when you already have a Sana
pipeline and just want to swap in the gemlite trunk. The from_pretrained route above is the
self-contained option.