ERNIE-Image on Intel CPU/iGPU via OpenVINO: Complete Deployment Guide for Non-NVIDIA Users
Most discussions about running ERNIE-Image assume you have an NVIDIA GPU. But what if you're on an Intel platform — Xeon CPUs in the data center, Iris Xe integrated graphics on a laptop, or an Arc discrete GPU? OpenVINO provides a complete deployment path. This guide covers everything from environment setup to INT4 quantization, including real-world performance data and common troubleshooting tips.
AI image generation has become dramatically more accessible in the past year, but hardware requirements remain a significant barrier. ERNIE-Image, an 8B-parameter Diffusion Transformer model, officially recommends 24GB VRAM on NVIDIA GPUs. However, the reality is that countless developers use Intel-based hardware — data center Xeon processors, Intel Core laptops with Iris Xe graphics, and Arc-powered workstations.
Intel's OpenVINO provided Day-0 support for ERNIE-Image on the very day of its release. From day one, Intel users could run this model on their hardware — but the documentation is scattered across multiple sources, and real-world performance data has been largely anecdotal.
OpenVINO Deployment Overview
OpenVINO (Open Visual Inference & Neural Network Optimization) is Intel's open-source deep learning inference optimization toolkit. For ERNIE-Image, it provides a complete export and inference pipeline.
Three core steps:
- Export: Convert PyTorch weights to OpenVINO IR format
- Quantize: Compress to FP16/INT8/INT4 via NNCF
- Infer: Run inference using the
OVErnieImagePipelineAPI
Both ERNIE-Image Base (50 inference steps) and ERNIE-Image Turbo (8 inference steps) are supported.
Environment Setup
Clone the Repository
git clone https://github.com/openvino-dev-samples/optimum-intel.git
cd optimum-intel
git checkout ernie-image
git checkout d0e7fc2aea503755e2cb265e5f0b31dbe270cfc8
Create Virtual Environment and Install Dependencies
python -m venv ernie_env
source ernie_env/bin/activate
pip install "git+https://github.com/huggingface/optimum.git@ec676fd4e0b1440e91549e7a1aa82e0de85e79b5"
pip install "git+https://github.com/HsiaWinter/diffusers.git@5024bc795df15ee46509646a9fc23761aa759bc8"
pip install transformers==4.57.6
pip install openvino==2026.0.0
pip install openvino-tokenizers==2026.0.0.0
pip install nncf==3.0.0
pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cpu
Version compatibility is critical here. Both diffusers and optimum must use the specified commits to avoid issues like the missing scaling_factor attribute.
Prepare Original Model Weights
After downloading ERNIE-Image weights from HuggingFace, the directory should look like:
ERNIE-Image/
├── model_index.json
├── scheduler/
├── text_encoder/
├── tokenizer/
├── transformer/
└── vae/
Exporting to OpenVINO IR Format
FP16 Export
optimum-cli export openvino \
--model /path/to/ERNIE-Image \
--task text-to-image \
--weight-format fp16 \
./ernie_image_fp16
INT4 Quantized Export
optimum-cli export openvino \
--model /path/to/ERNIE-Image \
--task text-to-image \
--weight-format int4 \
./ernie_image_int4
The INT4 output includes model_index.json, openvino_config.json, scheduler, tokenizer, text_encoder, transformer, vae_encoder, and vae_decoder. Model size drops from ~16GB to approximately 4GB.
Running Inference
CPU Inference
from optimum.intel import OVErnieImagePipeline
import torch
pipe = OVErnieImagePipeline.from_pretrained(
"./ernie_image_int4",
device="CPU",
)
generator = torch.Generator("cpu").manual_seed(42)
result = pipe(
prompt="a cute cat sitting on a colorful cushion, studio lighting, high quality",
num_inference_steps=20,
height=512,
width=512,
generator=generator,
)
result.images[0].save("output.png")
GPU (iGPU / Arc) Inference
Simply change the device parameter to "GPU":
pipe = OVErnieImagePipeline.from_pretrained(
"./ernie_image_int4",
device="GPU",
)
Turbo Model Inference
ERNIE-Image-Turbo requires only 8 inference steps, significantly reducing latency:
pipe = OVErnieImagePipeline.from_pretrained(
"./ernie_image_turbo_int4",
device="CPU",
)
result = pipe(
prompt="cinematic photo of a samurai in the rain, neon lights",
num_inference_steps=8,
height=512,
width=512,
)
Parameter Recommendations
| Parameter | Base Model | Turbo Model |
|---|---|---|
num_inference_steps |
50 | 8 |
height / width |
Multiples of 64 (512/1024) | Multiples of 64 (512/1024) |
guidance_scale |
≤ 5.0 | 1.0 (Turbo default) |
Real-World Performance Data
Community-reported performance data (GitHub Issue #3426):
Hardware: Intel i7-1355U + Iris Xe iGPU + 16GB RAM
| Model | Quantization | Device | Generation Time | Notes |
|---|---|---|---|---|
| ERNIE-Image-Turbo | INT4 | Iris Xe iGPU | ~16 minutes (121s/step × 8 steps) | Very slow |
| SDXL | INT4 | Same hardware | Smooth | Baseline |
| Z-Image Turbo | INT4 | Same hardware | Smooth | Baseline |
| FLUX Fill | INT4 | Same hardware | Smooth | Baseline |
Key finding: DiT architecture performs significantly worse on iGPUs compared to UNet-based models (SDXL, Z-Image). The 8B-parameter DiT Transformer is heavily constrained by memory bandwidth on low-power integrated GPUs.
Better hardware options:
- Intel Arc A770 (16GB VRAM): Expected 5-10x faster than iGPU
- Intel Xeon server CPUs: Suitable for batch inference
- Intel Core Ultra (Meteor Lake/Lunar Lake) NPU: Awaiting OpenVINO optimization
Troubleshooting
1. Missing scaling_factor Warning
The `scaling_factor` attribute is missing from the VAE decoder configuration.
Cause: Version incompatibility between optimum and diffusers. Use the exact commits specified in the setup commands above.
Fix: Reinstall the specified versions of optimum and diffusers, then re-export the model.
2. Extremely Slow Inference
If INT4 Turbo takes 16 minutes per image on iGPU:
- Try switching to CPU inference (may be faster in some scenarios)
- Use an Arc discrete GPU
- Lower resolution to 512×512
3. Out of Memory (OOM)
INT4 quantization significantly reduces memory requirements. If still hitting OOM:
- Enable
enable_model_cpu_offload() - Reduce batch size to 1
- Use 512×512 resolution
OpenVINO + ComfyUI Integration
The community has implemented OpenVINO integration with ComfyUI. Using INT4-quantized ERNIE-Image, inference runs on Intel CPU/iGPU/Arc GPU through standard ComfyUI nodes.
Workflow highlights:
- Load INT4 OpenVINO model
- Use standard ComfyUI node chain
- Generate locally on Intel hardware
This is a critical alternative for ComfyUI users without NVIDIA GPUs.
Summary
| Aspect | Assessment |
|---|---|
| Best for | CPU batch inference, Arc GPU users, edge devices |
| Not for | Low-end iGPU (Iris Xe class) real-time inference |
| Optimal hardware | Intel Arc A770 / Xeon servers |
| Quantization | INT4 compresses model to ~4GB with acceptable quality loss |
| Ecosystem maturity | Day-0 support, community actively optimizing |
If you have an Intel Arc GPU or need to run ERNIE-Image on CPU-only servers, OpenVINO is the most mature solution available today. For Iris Xe class integrated graphics users, waiting for further OpenVINO inference optimizations — or using a cloud API — is the more practical path for now.