Fix OpenVINO GPU Reshape Error & Disable model compilation for CPU EP #491
+649
−566
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.
Fix OpenVINO GPU Reshape Error

A prior PR introduced explicit free dimension overrides (batch, channels, height, width) to help NVTensorRTRTX (TensorRT EP) initialize models with dynamic dimensions. In our current pipeline the VAE latent input size is effectively static (e.g. 64×64 for 512×512 output), so height/width do not need overriding. Leaving them in place is harmless for most EPs, but OpenVINO GPU applies additional graph optimizations that, with these overrides present, transform a transpose + reshape sequence incorrectly and result in an impossible reshape (element count mismatch).
Root Cause Details
Actual model latent spatial dims are already constant; the overrides re‑assert values the optimizer no longer treats as purely static.
Current Mitigation
We have commented out the height/width overrides; initialization succeeds on OpenVINO GPU. No other EP shows negative impact from their removal.
Disable model compilation for CPU EP
The CPU Execution Provider in ONNX Runtime does not implement EPContext model compilation, so invoking compilation on the CPU EP will fail. We removed the [Compile model] checkbox when the user selects the CPU EP.