SANA1.5_1.6B_1024px OpenVINO INT4
Source: Efficient-Large-Model/SANA1.5_1.6B_1024px (export uses Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers)
Pipeline: SanaPipeline / OVDiffusionPipeline — official example guidance_scale=4.5, num_inference_steps=20, 1024x1024.
Quant: NNCF weight-only via OVQuantizer + OVPipelineQuantizationConfig — transformer + text_encoder = OVWeightQuantizationConfig(bits=4,sym=False,group_size=128,group_size_fallback="adjust",ratio=1.0), rest INT8, ov_config=OVConfig(quantization_config=...).
Size: FP16 ~8.5G → INT4 ~3.1G (-63%). See REPORT.md + outputs/benchmark.json.
每組 prompt 皆有 step=5 vs step=20 並列對比 (1024),另附 512px 對照在 examples/*_512_*。
01_hanfu — seed42
Young Chinese woman in red Hanfu, intricate embroidery, impeccable makeup, red floral forehead pattern, elaborate high bun, golden phoenix headdress, soft-lit outdoor night background, silhouetted tiered pagoda, blurred colorful distant lights, photorealistic, ultra detailed, 8k
| steps=5 (11~14s) | steps=20 (35~36s) |
|---|---|
![]() | ![]() |
02_astronaut — seed43
Astronaut in a jungle, cold color palette, muted colors, detailed, 8k, photorealistic, cinematic lighting
| steps=5 | steps=20 |
|---|---|
![]() | ![]() |
03_taipei — seed44
Cyberpunk street in Taipei at night, heavy rain, neon signs with text 'TAIPEI' and Chinese characters '台北', reflections on wet asphalt, crowded night market, cinematic, ultra detailed
| steps=5 | steps=20 |
|---|---|
![]() | ![]() |
04_shiba — seed45
Cute Shiba Inu wearing a tiny astronaut helmet, sitting in a field of sunflowers under a starry sky, dreamy illustration, vibrant colors, high quality
| steps=5 | steps=20 |
|---|---|
![]() | ![]() |
05_ink — seed46
Traditional Chinese ink wash landscape, misty mountains, a small pagoda on a cliff, cranes flying, minimalist, elegant, high aesthetic quality
| steps=5 | steps=20 |
|---|---|
![]() | ![]() |
512px control: examples/*_512_seed*_steps{5,20}.png (same prompt/seed).
Benchmark (Intel Xeon Platinum 8559C, 192 logical CPU, OpenVINO CPU, compile=True, guidance=4.5)
- load+compile: 8.1s, RSS 2.44 GiB → peak ~8.9GiB
- avg step
1.61.9s; step5 total 1114s; step20 total 3539s
| file | total (s) | avg step (s) |
|---|---|---|
| 01_hanfu_1024_seed42_steps5.png | 14.28 | 1.68 |
| 01_hanfu_512_seed42_steps5.png | 13.41 | 1.90 |
| 01_hanfu_1024_seed42_steps20.png | 35.63 | 1.60 |
| 01_hanfu_512_seed42_steps20.png | 35.99 | 1.64 |
| 02_astronaut_1024_seed43_steps5.png | 11.29 | 1.62 |
| 02_astronaut_512_seed43_steps5.png | 11.36 | 1.63 |
| 02_astronaut_1024_seed43_steps20.png | 36.21 | 1.65 |
| 02_astronaut_512_seed43_steps20.png | 35.64 | 1.64 |
| 03_taipei_1024_seed44_steps5.png | 10.97 | 1.60 |
| 03_taipei_512_seed44_steps5.png | 11.15 | 1.60 |
| 03_taipei_1024_seed44_steps20.png | 36.84 | 1.69 |
| 03_taipei_512_seed44_steps20.png | 37.38 | 1.72 |
| 04_shiba_1024_seed45_steps5.png | 11.59 | 1.67 |
| 04_shiba_512_seed45_steps5.png | 12.30 | 1.82 |
| 04_shiba_1024_seed45_steps20.png | 38.83 | 1.76 |
| 04_shiba_512_seed45_steps20.png | 36.65 | 1.66 |
| 05_ink_1024_seed46_steps5.png | 11.74 | 1.70 |
| 05_ink_512_seed46_steps5.png | 11.71 | 1.68 |
| 05_ink_1024_seed46_steps20.png | 36.07 | 1.64 |
| 05_ink_512_seed46_steps20.png | 36.21 | 1.65 |
Full per-step log: outputs/benchmark.json, prompts: outputs/prompts.txt, full report: REPORT.md.
Versions: diffusers 0.37.1, transformers 5.5.4, tokenizers 0.22.2, huggingface-hub 1.21.0, optimum 2.3.0, optimum-intel 2.2.0, openvino 2026.4.0, nncf 3.4.0, torch 2.14.1, pillow 12.3.0, psutil 7.2.2.
Usage
from optimum.intel import OVDiffusionPipeline
import torch
pipe = OVDiffusionPipeline.from_pretrained("HelloSun/SANA1.5_1.6B_1024px-OpenVINO-INT4", compile=True)
image = pipe(prompt="a cyberpunk cat with a neon sign that says \"Sana\"",
num_inference_steps=20, guidance_scale=4.5,
height=1024, width=1024,
generator=torch.Generator().manual_seed(42)).images[0]
image.save("out.png")
# fast preview: num_inference_steps=5
python inference_int4.py --prompt "..." --seed 42 --steps 20 --guidance 4.5 --size 1024 --output out.png
python generate5.py
Reproduce
optimum-cli export openvino -m Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers --task text-to-image --library diffusers --weight-format fp16 ./sana15_1.6b_1024px-ov-fp16
python quantize_int4.py
python generate5.py
Files: quantize_int4.py, generate5.py, inference_int4.py, REPORT.md, outputs/, examples/.









