Instructions to use ixim/ERNIE-Image-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ixim/ERNIE-Image-INT8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ixim/ERNIE-Image-INT8", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Formal Benchmark Overview
Variant Summary
| Variant | Avg Latency (ms) | Avg Peak VRAM (MiB) | vs Base Latency | vs Base Peak VRAM |
|---|---|---|---|---|
| transformer-int8 + pe-bf16 + use_pe=true | 78053 | 28516 | +0 | +0 |
| transformer-int8 + pe-int8 + use_pe=true | 81412 | 28721 | +3359 | +205 |
| transformer-int8 + use_pe=false | 60287 | 28339 | -17766 | -177 |
| ERNIE-Image-Turbo Reference | 32535 | 35255 | -45518 | +6739 |
Notes
pe-int8is a runtime-quantized benchmark-only variant and does not change the packaged release precision matrix.- Peak VRAM is the peak reserved CUDA memory of the current PyTorch process during each generation call.
- The prompt suite contains 7 prompts, including the added portrait case
zh_portrait_studio_east_asian.