Views
No views yet

| Images | ![]() | ![]() | ![]() | ![]() |
|---|---|---|---|---|
| prompt | A hot air balloon in the shape of a heart. Grand Canyon | a melting apple | A middle-aged woman of Asian descent, her dark hair streaked with silver, appears fractured and splintered, intricately embedded within a sea of broken porcelain. The porcelain glistens with splatter paint patterns in a harmonious blend of glossy and matte blues, greens, oranges, and reds, capturing her dance in a surreal juxtaposition of movement and stillness. Her skin tone, a light hue like the porcelain, adds an almost mystical quality to her form. | Modern luxury contemporary luxury home interiors house, in the style of mimicking ruined materials, ray tracing, haunting houses, and stone, capture the essence of nature, gray and bronze, dynamic outdoor shots. |
generative-models Github repository (https://github.com/NVlabs/Sana),
which is more suitable for both training and inference and for which most advanced diffusion sampler like Flow-DPM-Solver is integrated.
MIT Han-Lab provides free Sana inference.1import torch
2from app.sana_pipeline import SanaPipeline
3from torchvision.utils import save_image
4
5device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
6generator = torch.Generator(device=device).manual_seed(42)
7
8sana = SanaPipeline("configs/sana_config/4096ms/Sana_1600M_img4096_bf16.yaml")
9sana.from_pretrained("hf://Efficient-Large-Model/Sana_1600M_4Kpx_BF16/checkpoints/Sana_1600M_4Kpx_BF16.pth")
10prompt = 'a cyberpunk cat with a neon sign that says "Sana"'
11
12image = sana(
13 prompt=prompt,
14 height=4096,
15 width=4096,
16 guidance_scale=5.0,
17 pag_guidance_scale=2.0,
18 num_inference_steps=20,
19 generator=generator,
20)
21save_image(image, 'output/sana_4K.png', nrow=1, normalize=True, value_range=(-1, 1))