Cannot import name 'OVStableDiffusionPipeline' from 'optimum.intel.openvino'

#1
by samabogbog - opened

C:\Python310\lib\importlib\util.py:247: DeprecationWarning: The openvino.runtime module is deprecated and will be removed in the 2026.0 release. Please replace openvino.runtime with openvino.
self.spec.loader.exec_module(self)
C:\Python310\lib\importlib\util.py:247: DeprecationWarning: The openvino.runtime module is deprecated and will be removed in the 2026.0 release. Please replace openvino.runtime with openvino.
self.spec.loader.exec_module(self)
C:\Python310\lib\importlib\util.py:247: DeprecationWarning: The openvino.runtime module is deprecated and will be removed in the 2026.0 release. Please replace openvino.runtime with openvino.
self.spec.loader.exec_module(self)
Traceback (most recent call last):
File "C:.pytemp\optimum\gen.py", line 1, in
from optimum.intel.openvino import OVStableDiffusionPipeline
ImportError: cannot import name 'OVStableDiffusionPipeline' from 'optimum.intel.openvino' (C:.pytemp\optimum\venv\lib\site-packages\optimum\intel\openvino_init_.py)

Code :
from optimum.intel.openvino import OVDiffusionPipeline

model_id = "OpenVINO/LCM_Dreamshaper_v7-fp16-ov"
pipeline = OVDiffusionPipeline.from_pretrained(model_id)

prompt = "sailing ship in storm by Rembrandt"
images = pipeline(prompt, num_inference_steps=4).images

Sign up or log in to comment