Instructions to use latentdivergence/sana-sprint-text with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Sana
How to use latentdivergence/sana-sprint-text 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://latentdivergence/sana-sprint-text") 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
sana-sprint-text
The Gemma-2-2B-IT prompt encoder of SANA-Sprint 0.6B, prepared for on-device use in Latent Studio:
text/prefix_kv.bin,text/prefix_hidden.bin: Gemma keys/values and hidden states of SANA's fixed ~200-token instruction prefix, precomputed (fp16), so the phone only runs Gemma over the user's prompt.text/gemma_tail.onnx(+.data): Gemma-2 decoder over the prompt tokens attending to that prefix; weight-only int8 MatMuls (block 32). Inputsinputs_embeds [1,T,2304],past_k/past_v [26,1,4,P,256],start; output final hidden states.text/embed_q8.bin+embed_scale.bin: the token embedding table, int8 per row.text/gemma_tokenizer.bin: Gemma's BPE tokenizer compiled to a compact binary.
Verified against the diffusers SanaSprintPipeline: embeddings cosine 0.9999 (int8), and the same images seed for seed.
License
Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms, including the Gemma Prohibited Use Policy. By using these files you agree to them.
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support