bes-dev / stable_diffusion.openvino

Apache License 2.0
1.53k stars 208 forks source link

Is there someone meet this Error? #30

Open inspire-boy opened 1 year ago

inspire-boy commented 1 year ago

Windows 10 / Intel I7-6700 / Python 3.8.5 / pip 20.3.3

(ldc) D:\py2\stable_diffusion.openvino>python demo.py --prompt "Photo of Emilia Clarke with a bright red hair" --init-image ./data/input.png --mask ./data/mask.png --strength 0.5
Traceback (most recent call last):
  File "demo.py", line 74, in <module>
    main(args)
  File "demo.py", line 31, in main
    engine = StableDiffusionEngine(
  File "D:\py2\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.

PS: pip list

(ldc) D:\py2\stable_diffusion.openvino>pip list Package Version Location


absl-py 1.2.0 addict 2.4.0 aiohttp 3.8.1 aiosignal 1.2.0 albumentations 0.4.3 altair 4.2.0 antlr4-python3-runtime 4.8 async-timeout 4.0.2 attrs 22.1.0 backports.zoneinfo 0.2.1 blinker 1.5 brotlipy 0.7.0 cachetools 5.2.0 certifi 2022.6.15 cffi 1.15.1 charset-normalizer 2.0.4 click 8.1.3 clip 1.0 d:\py2\stable-diffusion-cpu\src\clip colorama 0.4.5 commonmark 0.9.1 cryptography 37.0.1 decorator 5.1.1 defusedxml 0.7.1 diffusers 0.2.4 editdistance 0.6.0 einops 0.3.0 entrypoints 0.4 fast-ctc-decode 0.3.2 filelock 3.8.0 flatbuffers 2.0.7 frozenlist 1.3.1 fsspec 2022.8.2 ftfy 6.1.1 future 0.18.2 gitdb 4.0.9 GitPython 3.1.27 google-auth 2.11.0 google-auth-oauthlib 0.4.6 grpcio 1.48.1 huggingface-hub 0.9.0 hyperopt 0.1.2 idna 3.3 imagecodecs 2022.2.22 imageio 2.9.0 imageio-ffmpeg 0.4.2 imgaug 0.2.6 importlib-metadata 4.12.0 importlib-resources 5.9.0 invisible-watermark 0.1.5 Jinja2 3.1.2 joblib 1.1.0 jsonschema 4.15.0 jstyleson 0.0.2 kornia 0.6.0 latent-diffusion 0.0.1 d:\py2\stable-diffusion-cpu lmdb 1.3.0 Markdown 3.4.1 MarkupSafe 2.1.1 mkl-fft 1.3.1 mkl-random 1.2.2 mkl-service 2.4.0 multidict 6.0.2 networkx 2.8.6 nibabel 4.0.2 nltk 3.7 numpy 1.19.5 oauthlib 3.2.0 omegaconf 2.1.1 onnx 1.12.0 onnxruntime 1.10.0 opencv-python 4.5.5.64 opencv-python-headless 4.6.0.66 openvino 2022.1.0 openvino-dev 2022.1.0 openvino-telemetry 2022.1.1 packaging 21.3 pandas 1.1.5 parasail 1.2.4 Pillow 9.2.0 pip 20.3.3 pkgutil-resolve-name 1.3.10 progress 1.6 protobuf 3.19.4 pudb 2019.2 py-cpuinfo 8.0.0 pyarrow 9.0.0 pyasn1 0.4.8 pyasn1-modules 0.2.8 pyclipper 1.3.0.post3 pycparser 2.21 pydeck 0.8.0b1 pyDeprecate 0.3.1 pydicom 2.3.0 Pygments 2.13.0 pymongo 4.2.0 Pympler 1.0.1 pyOpenSSL 22.0.0 pyparsing 3.0.9 pyrsistent 0.18.1 PySocks 1.7.1 python-dateutil 2.8.2 pytorch-lightning 1.4.2 pytz 2022.2.1 pytz-deprecation-shim 0.1.0.post0 PyWavelets 1.3.0 PyYAML 6.0 rawpy 0.17.2 regex 2022.8.17 requests 2.28.1 requests-oauthlib 1.3.1 rich 12.5.1 rsa 4.9 sacremoses 0.0.53 scikit-image 0.19.3 scikit-learn 0.24.2 scipy 1.5.4 semver 2.13.0 sentencepiece 0.1.97 setuptools 63.4.1 Shapely 1.8.4 six 1.16.0 smmap 5.0.0 streamlit 1.12.0 taming-transformers 0.0.1 d:\py2\stable-diffusion-cpu\src\taming-transformers tensorboard 2.10.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 test-tube 0.7.5 texttable 1.6.3 threadpoolctl 3.1.0 tifffile 2021.11.2 tokenizers 0.10.3 toml 0.10.2 toolz 0.12.0 torch 1.11.0 torch-fidelity 0.3.0 torchmetrics 0.6.0 torchvision 0.12.0 tornado 6.2 tqdm 4.64.0 transformers 4.16.2 typing-extensions 4.3.0 tzdata 2022.2 tzlocal 4.2 urllib3 1.26.11 urwid 2.1.2 validators 0.20.0 watchdog 2.1.9 wcwidth 0.2.5 Werkzeug 2.2.2 wheel 0.37.1 win-inet-pton 1.1.0 wincertstore 0.2 yamlloader 1.1.0 yarl 1.8.1 zipp 3.8.1

Drake53 commented 1 year ago

Seeing the exception my first thought was maybe openvino doesn't support your CPU, so I checked the requirements and it says 6th to 12th generation is supported. Yours is 6th gen so it should be supported, but maybe since it's the earliest supported generation it doesn't have all the required features? Maybe someone with the same CPU can confirm this. I have no clue otherwise, I'm new to all this.

inspire-boy commented 1 year ago

Seeing the exception my first thought was maybe openvino doesn't support your CPU, so I checked the requirements and it says 6th to 12th generation is supported. Yours is 6th gen so it should be supported, but maybe since it's the earliest supported generation it doesn't have all the required features? Maybe someone with the same CPU can confirm this. I have no clue otherwise, I'm new to all this.

Thanks! I try it in vmware ubuntu 20 in this computer, the same CPU,it works!