Instructions to use Efficient-Large-Model/Sana_1600M_4Kpx_BF16_diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Sana
How to use Efficient-Large-Model/Sana_1600M_4Kpx_BF16_diffusers with Sana:
# Load the model and infer image from text import torch from app.sana_pipeline import SanaPipeline from torchvision.utils import save_image sana = SanaPipeline("configs/sana_config/1024ms/Sana_1600M_img1024.yaml") sana.from_pretrained("hf://Efficient-Large-Model/Sana_1600M_4Kpx_BF16_diffusers") image = sana( prompt='a cyberpunk cat with a neon sign that says "Sana"', height=1024, width=1024, guidance_scale=5.0, pag_guidance_scale=2.0, num_inference_steps=18, ) - Notebooks
- Google Colab
- Kaggle
| { | |
| "_class_name": "SanaTransformer2DModel", | |
| "_diffusers_version": "0.33.0.dev0", | |
| "attention_bias": false, | |
| "attention_head_dim": 32, | |
| "caption_channels": 2304, | |
| "cross_attention_dim": 2240, | |
| "cross_attention_head_dim": 112, | |
| "dropout": 0.0, | |
| "in_channels": 32, | |
| "interpolation_scale": 2.0, | |
| "mlp_ratio": 2.5, | |
| "norm_elementwise_affine": false, | |
| "norm_eps": 1e-06, | |
| "num_attention_heads": 70, | |
| "num_cross_attention_heads": 20, | |
| "num_layers": 20, | |
| "out_channels": 32, | |
| "patch_size": 1, | |
| "sample_size": 128 | |
| } | |