feat: support stable diffusion v1-5 with openvino#282
Merged
ziyuanguo1998 merged 23 commits intomainfrom Apr 10, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an AITK workflow/recipe to optimize and evaluate Stable Diffusion v1-5 using OpenVINO (Intel CPU/GPU), including new Olive pass configuration for OpenVINO IO updates and encapsulation, plus model registry/runtime updates.
Changes:
- Add an OpenVINO workflow (
sd_ov_workflow.py+ JSON + UI.json.config) and register it in the model project metadata. - Extend per-submodel Olive configs to include
OpenVINOIoUpdate+OpenVINOEncapsulationand adjust UNet example inputs for static shapes. - Update OpenVINO saving logic to emit a Diffusers ONNX pipeline layout, and update the global model list to include Intel CPU/GPU runtimes for SD v1-5.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sd-legacy-stable-diffusion-v1-5/aitk/user_script.py | Adjust UNet OpenVINO example inputs to batch=1 and float32 timestep for static-shape workflows. |
| sd-legacy-stable-diffusion-v1-5/aitk/stable_diffusion.py | Pass the PyTorch pipeline into the OpenVINO “save model info” step. |
| sd-legacy-stable-diffusion-v1-5/aitk/sd_utils/ov.py | Major OpenVINO path changes: config rewriting, submodel artifact handling, and pipeline saving. |
| sd-legacy-stable-diffusion-v1-5/aitk/sd_utils/onnx_patch.py | Add is_ov_save mode to copy OV/ONNX artifacts during save_pretrained. |
| sd-legacy-stable-diffusion-v1-5/aitk/sd_ov_workflow.py | New workflow entrypoint to run conversion/optimization and (re)use the existing evaluator path. |
| sd-legacy-stable-diffusion-v1-5/aitk/sd_ov_workflow.json.config | New AITK UI config for OpenVINO workflow with CPU/GPU runtime selection. |
| sd-legacy-stable-diffusion-v1-5/aitk/sd_ov_workflow.json | New Olive workflow wrapper config pointing at the AITK python workflow script. |
| sd-legacy-stable-diffusion-v1-5/aitk/model_project.config | Register sd_ov_workflow.json as a template in the project. |
| sd-legacy-stable-diffusion-v1-5/aitk/info.yml | Add OpenVINO recipe metadata for cpu/gpu devices. |
| sd-legacy-stable-diffusion-v1-5/aitk/config_vae_encoder.json | Add OpenVINO IO update + encapsulation passes for VAE encoder. |
| sd-legacy-stable-diffusion-v1-5/aitk/config_vae_decoder.json | Add OpenVINO IO update + encapsulation passes for VAE decoder. |
| sd-legacy-stable-diffusion-v1-5/aitk/config_unet.json | Add OpenVINO IO update + encapsulation passes for UNet. |
| sd-legacy-stable-diffusion-v1-5/aitk/config_text_encoder.json | Add OpenVINO IO update + encapsulation passes for text encoder. |
| sd-legacy-stable-diffusion-v1-5/aitk/config_safety_checker.json | Add OpenVINO IO update + encapsulation passes for safety checker (even though OpenVINO path disables it). |
| .aitk/requirements/requirements-IntelNPU-SD.txt | Add SD-specific requirements set for Intel NPU environments. |
| .aitk/configs/model_list.json | Add IntelCPU/IntelGPU runtimes for SD v1-5 in the model registry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
xieofxie
reviewed
Apr 1, 2026
xieofxie
reviewed
Apr 1, 2026
xieofxie
reviewed
Apr 1, 2026
xieofxie
reviewed
Apr 10, 2026
xieofxie
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.