stable_diffusion.openvino
stable_diffusion.openvino copied to clipboard
Documenting installation issues
I'm just documenting some issues I ran into while installing, and what the fixes were!
Openvino version cannot be found.
Problem:
ERROR: Could not find a version that satisfies the requirement openvino==2022.1.0 (from -r requirements.txt (line 6)) (from versions: 2021.3.0, 2021.4.0, 2021.4.1, 2021.4.2)
ERROR: No matching distribution found for openvino==2022.1.0 (from -r requirements.txt (line 6))
Solution: Upgrade pip.
> pip install --upgrade pip
> pip install -r requirements.txt
Character encoding issues.
Problem:
> python stable_diffusion.py --prompt "Street-art painting of Emilia Clarke in style of Banksy, photorealism"
File "stable_diffusion.py", line 92
SyntaxError: Non-ASCII character '\xce' in file stable_diffusion.py on line 92, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Solution: Add the following to the top of stable_diffusion.py: # -*- coding: utf-8 -*-
> nano stable_diffusion.py
No module named numpy.
Problem:
> python stable_diffusion.py --prompt "Street-art painting of Emilia Clarke in st
yle of Banksy, photorealism"
Traceback (most recent call last):
File "stable_diffusion.py", line 6, in <module>
import numpy as np
ImportError: No module named numpy
Solution: Ensure you are using python3.
> python -V
Python 2.7.18
> python3 stable_diffusion.py --prompt "Street-art painting of Emilia Clarke in style of Banksy, photorealism"
Upgrading pip did not help for me with openvino:
Collecting numpy==1.19.5
Using cached numpy-1.19.5.zip (7.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting opencv-python==4.5.5.64
Using cached opencv_python-4.5.5.64-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (60.5 MB)
Collecting transformers==4.16.2
Using cached transformers-4.16.2-py3-none-any.whl (3.5 MB)
Collecting diffusers==0.2.4
Using cached diffusers-0.2.4-py3-none-any.whl (112 kB)
Collecting tqdm==4.64.0
Using cached tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
ERROR: Could not find a version that satisfies the requirement openvino==2022.1.0 (from versions: none)
ERROR: No matching distribution found for openvino==2022.1.0
(venv) df@Kepler:~/test/stable_diffusion.openvino$ pip --version
pip 22.2.2 from /home/df/test/stable_diffusion.openvino/venv/lib/python3.10/site-packages/pip (python 3.10)```
OpenVINO does not support Python 3.10. 3.9 works.
Upgrading pip worked for me.
@dankrad OpenVINO doesn't support python > 3.9 and Ubuntu >= 22.04, so if you have one of them, pip willn't find openvino package compatible to your environment
@mathiasfoster thanks, we'll update our readme following your tips
I am installing in OpenSuse Tumbleweed running under WSL.
I had Python 3.9 and the corresponding pip version. I used:
pip3.9 install --user -r requirements.txt
I got " ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory" error. libglib was installed. My assumption is that using pip --user means some paths are not set up correctly.
Fixed it by changing opencv-python to opencv-python-headless in requirements.txt
Found the fix in: https://github.com/aws/studio-lab-examples/issues/14
Now the script runs correctly.
I had to install libomp-dev on ubuntu.
Now I get these errors:
import: unable to open X server `' @ error/import.c/ImportImageCommand/356.
import: unable to open X server `' @ error/import.c/ImportImageCommand/356.
from: can't read /var/mail/stable_diffusion_engine
from: can't read /var/mail/diffusers
import: unable to open X server `' @ error/import.c/ImportImageCommand/356.
import: unable to open X server `' @ error/import.c/ImportImageCommand/356.
./demo.py: 13: Syntax error: "(" unexpected
I am running the demo script on a headless linux machine. Edit: fixed by running python3 demo.py ... instead of ./demo.py ....
i keep getting the
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "/Users/lunar/Desktop/stable_diffusion.openvino-master/demo_web.py", line 12, in <module>
from stable_diffusion_engine import StableDiffusionEngine
File "/Users/lunar/Desktop/stable_diffusion.openvino-master/stable_diffusion_engine.py", line 5, in <module>
from openvino.runtime import Core
ModuleNotFoundError: No module named 'openvino'
error, any help? OS: macos 10.15.7 Core: i7 6600U vPro RAM: 16GB ive tried all of the above and nothing has worked so far.