bes-dev / stable_diffusion.openvino

Apache License 2.0
1.53k stars 208 forks source link

ModuleNotFoundError: No module named 'openvino.runtime' #21

Open inspire-boy opened 1 year ago

inspire-boy commented 1 year ago

Any one know this below?

Ubuntu 20.04 LTS

root@VM-8-7-ubuntu:~/stable_diffusion.openvino# python demo.py --prompt "Street-art painting of Emilia Clarke in style of Banksy, photorealism" Traceback (most recent call last): File "demo.py", line 5, in from stable_diffusion_engine import StableDiffusionEngine File "/root/stable_diffusion.openvino/stable_diffusion_engine.py", line 4, in from openvino.runtime import Core ModuleNotFoundError: No module named 'openvino.runtime'

root@VM-8-7-ubuntu:~/stable_diffusion.openvino# pip install openvino Looking in indexes: https://pypi.mirrors.ustc.edu.cn/simple/ Requirement already satisfied: openvino in /usr/local/lib/python3.8/dist-packages (2021.4.2) Requirement already satisfied: numpy<1.20,>=1.16.6 in /usr/local/lib/python3.8/dist-packages (from openvino) (1.19.5) root@VM-8-7-ubuntu:~/stable_diffusion.openvino#

bes-dev commented 1 year ago

@inspire-boy please, try to:

pip install --upgrade pip
pip install openvino
inspire-boy commented 1 year ago

@inspire-boy please, try to:

pip install --upgrade pip
pip install openvino

Its like everything OK, BUt in my Win10:

PS D:\py\stable_diffusion.openvino> python demo.py --prompt "Street-art painting of Emilia Clarke in style of Banksy, photorealism" ftfy or spacy is not installed using BERT BasicTokenizer instead of ftfy. Traceback (most recent call last): File "D:\py\stable_diffusion.openvino\demo.py", line 74, in main(args) File "D:\py\stable_diffusion.openvino\demo.py", line 31, in main engine = StableDiffusionEngine( File "D:\py\stable_diffusion.openvino\stable_diffusion_engine.py", line 37, in init self._unet = self.core.read_model( RuntimeError: Check 'PartialShape::broadcast_merge_into(pshape, node->get_input_partial_shape(i), autob)' failed at C:\j\workspace\private-ci\ie\build-windows-vs2019@3\b\repos\openvino\src\core\src\op\util\elementwise_args.cpp:30: While validating node 'v1::Multiply Multiply_16273 (onnx::Mul_1660[0]:f32{2,32,32}, Constant_150330[0]:f32{1,1,640}) -> ()' with friendly_name 'Multiply_16273': Argument shapes are inconsistent.

In my ubuntu 20 server:root@VM-8-7-ubuntu:~/stable_diffusion.openvino# python demo.py --prompt "Street-art painting of Emilia Clarke in style of Banksy, photorealism" ftfy or spacy is not installed using BERT BasicTokenizer instead of ftfy. Killed

What's Wrong?^^

inspire-boy commented 1 year ago

my cpu is Intel core(TM) i7-6700 @ 3.4GHz