AnimeMix v10 LCM OpenVINO INT4 (optimum)
Source: sca255/animemixv10_lcm (SD 1.5 LCM anime model, StableDiffusionPipeline).
Recipe: num_inference_steps=8, guidance_scale=1.5, 1024x1024 (LCM distilled model).
Converted with optimum-intel 2.2.0 / optimum 2.3.0 / openvino 2026.4.0 / nncf 3.4.0:
1. optimum-cli export openvino -m sca255/animemixv10_lcm --task text-to-image --library diffusers --weight-format fp16 ./animemixv10_lcm-ov-fp16
2. OVQuantizer NNCF weight-only INT4 (bits=4, sym=False, group_size=128, fallback=adjust, ratio=1.0) on unet + text_encoder, VAE INT8 default. See quantize_int4.py.
- FP16 OV 3.2G → INT4 OV 0.86G (unet 700M, text_encoder 81M, vae_dec 48M, vae_enc 33M, ~73%↓).
Usage
from optimum.intel import OVDiffusionPipeline
import torch
pipe = OVDiffusionPipeline.from_pretrained("HelloSun/animemixv10_lcm-OpenVINO-INT4", compile=True)
img = pipe("1girl, anime style, masterpiece, best quality",
height=1024, width=1024, num_inference_steps=8, guidance_scale=1.5,
generator=torch.Generator().manual_seed(42)).images[0]
img.save("out.png")
Env: diffusers==0.37.1 transformers==4.57.6 tokenizers==0.22.0 huggingface-hub==0.35.1 optimum==2.3.0 optimum-intel==2.2.0 openvino==2026.4.0 nncf==3.4.0 torch pillow psutil. Full example: inference_int4.py.
5 标准提示词 × 8-step (LCM recipe: 8 steps, guidance 1.5, 1024px, CPU)
01_hanfu — seed 42 — 33.7s
1girl, red hanfu, intricate embroidery, golden phoenix headdress, soft night lighting, tiered pagoda background, lantern lights, anime style, masterpiece, best quality, ultra detailed
02_astronaut — seed 43 — 32.6s
1girl astronaut in lush jungle, cold color palette, detailed foliage, cinematic lighting, anime style, masterpiece, best quality, 8k
03_taipei — seed 44 — 32.3s
1girl in cyberpunk Taipei at night, heavy rain, neon signs 'TAIPEI' and '台北', wet asphalt reflections, crowded night market, anime style, masterpiece, best quality
04_shiba — seed 45 — 34.2s
cute shiba inu wearing tiny astronaut helmet, sunflower field under starry sky, dreamy illustration, vibrant colors, anime style, masterpiece, best quality
05_ink — seed 46 — 33.0s
traditional chinese ink wash landscape, misty mountains, small pagoda on cliff, cranes flying, minimalist, elegant, anime style, masterpiece, best quality
5 额外风格提示词 × 8-step (seeds 47-51)
06_ghibli_style — seed 47 — 34.5s
studio ghibli style, 1girl in floating castle, magical clouds, whimsical atmosphere, detailed background, masterpiece, best quality
07_makoto_shinkai — seed 48 — 34.5s
makoto shinkai style, 1girl under comet sky, breathtaking lighting, detailed clouds, emotional atmosphere, anime style, masterpiece, 8k
08_flat_vector — seed 49 — 37.4s
flat vector illustration, 1girl in modern city, clean geometric shapes, bold colors, minimalist, commercial anime art style, behance trending
09_retro_80s — seed 50 — 41.1s
1980s retro anime, 1girl with neon city background, VHS aesthetic, synthwave colors, cel shaded, nostalgic anime style, masterpiece
10_impasto_thick — seed 51 — 33.1s
thick impasto anime concept art, 1girl with heavy brushstrokes, expressive texture, dramatic lighting, artstation masterpiece, detailed anime style
實驗數據 (CPU 真實能力)
測試環境:
- CPU: Intel Xeon Platinum 8559C, x86_64, 2 sockets x 48 cores x 2 threads = 192 vCPU, KVM
- RAM 2.0Ti, OpenVINO CPU only, openvino 2026.4.0
- 設定: num_inference_steps=8 (LCM recipe), guidance_scale=1.5, 1024x1024
| 項目 |
數據 |
| load+compile |
8.3s |
| 1024px 平均 |
~34.6s/張, 單步 ~4.15s |
| 01 |
33.68s, mean 3.84s, steps [4.66,4.00,4.00,3.81,3.89,3.76,3.86,3.79] |
| 02 |
32.57s, mean 3.84s |
| 03 |
32.34s, mean 3.83s |
| 04 |
34.15s, mean 4.03s |
| 05 |
32.98s, mean 3.91s |
| 06 |
34.45s, mean 4.08s |
| 07 |
34.54s, mean 4.07s |
| 08 |
37.36s, mean 4.38s |
| 09 |
41.10s, mean 4.84s |
| 10 |
33.10s, mean 3.92s |
| 512px 對照 (同10組/seed) |
01:5.47s/0.62s, 02:5.26s/0.60s, 03:5.31s/0.61s, 04:5.55s/0.63s, 05:5.86s/0.67s, 06:5.56s/0.63s, 07:6.60s/0.75s, 08:7.32s/0.84s, 09:5.36s/0.61s, 10:5.24s/0.60s, 平均~5.75s/單步~0.67s (見examples/*_512.png) |
| 模型大小 |
FP16 3.2G → INT4 0.86G (~73%↓) |
首圖首步較慢主因: text_encoder + 首個 UNet warmup. VAE decode + text-encode 已含在 total 內. 純 CPU, OpenVINO 自動多線程.
詳細見 REPORT.md + examples/benchmark.json + examples/prompts.txt.
復現
pip install diffusers==0.37.1 transformers==4.57.6 tokenizers==0.22.0 huggingface-hub==0.35.1 optimum==2.3.0 optimum-intel==2.2.0 openvino==2026.4.0 nncf==3.4.0 torch pillow psutil
optimum-cli export openvino -m sca255/animemixv10_lcm --task text-to-image --library diffusers --weight-format fp16 ./animemixv10_lcm-ov-fp16
python quantize_int4.py
python inference_int4.py
python generate5.py