Static-shape OpenVINO reshape for Stable Diffusion CPU inference
Convert a Stable Diffusion pipeline to OpenVINO via Optimum Intel, then reshape the exported pipeline to a fixed batch size and fixed image height/width when your application only uses a small set of resolutions. This enables the runtime to use a static input shape rather than dynamic shapes.
Discovered 2026-11-10 · Sources checked 2026-11-10
Why it matters
With dynamic shapes, the model must accommodate varying image sizes and batch configurations, which can add overhead. Fixing the input resolution (and batch) lets the pipeline be specialized for that configuration, improving inference speed in the reported setup.
What changed
Replaced the default OpenVINO pipeline usage (supporting dynamic input shapes) with a call that reshapes the pipeline to a specific fixed resolution (e.g., 512x512) and batch settings.
Where it helps
- Content pipelines that always generate 512x512 images
- Batch image generation with a fixed batch size on CPU servers
- Applications with a small set of supported output resolutions
- Low-latency synthetic data generation using Stable Diffusion on Intel CPUs
Evidence & reproduction
Reproduction not evaluated. A linked paper or repository does not establish independent reproduction.
Limitations & open questions
Best suited when you can restrict generation to a limited number of resolutions; otherwise you may need to maintain multiple reshaped pipeline instances (one per resolution).
Sources
- Accelerating Stable Diffusion Inference on Intel CPUs ↗
Hugging Face · primary · Published 2023-03-28 · Checked 2026-11-10
