simota1987/Sana_Sprint
0
SANA-Sprint 0.6B for Local Dream (MNN)
1024×1024 in 1–2 steps, running entirely on-device through MNN (CPU + OpenCL). No NPU required, so this also works on non-Snapdragon devices.
Measured on a Snapdragon 8 Gen 3 (SM8650), 1024px / 2 steps:
≈ 29 s with the prompt cached, ≈ 60 s for a brand-new prompt.
Layout
SANA marker file: tells Local Dream this is a SANA model dir
dit.mnn (+ .weight) SANA-Sprint DiT, fp16
vae_decoder.mnn DC-AE decoder, full 1024px (CPU path)
vae_decoder_tile.mnn DC-AE decoder, 640px tile (GPU path; optional)
gemma/
tokenizer.json
token_emb.bin [256000, 2304] fp16 embedding table, looked up on CPU
gemma_meta.json
gemma_chunk0..3.mnn (+ .weight) the 26 layers, split four waysPlace the whole directory under Local Dream's models folder; it appears as a custom model.
Licensing
- The DiT and DC-AE are converted from Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers, which is Apache-2.0.
gemma/is Gemma-2-2B-IT, governed by the Gemma Terms of Use and the Gemma Prohibited Use Policy. Those terms apply to this copy as well — this part is not Apache-2.0.
Notes on the conversion
Three things are easy to get wrong and are baked into these files:
- The text encoder runs over 506 tokens, not 300. SANA prepends a fixed 208-token instruction, runs Gemma over
208 + 300 − 2positions, and only then selects[0] + last 299. - The encoder is split into four chunks on purpose. Each boundary acts as an fp32 checkpoint; merged into fewer, longer graphs, MNN's fp16 error compounds badly — the same 13 layers differ by 44% as one graph vs two.
- The DiT's linear attention is rewritten for fp16:
valueis scaled (notquery, which would drag the attention denominator under the clamp) and the denominator is clamped at the smallest fp16 normal. Both are exactly neutral in fp32; without them some prompts decode to a fully black image.
