bes-dev / stable_diffusion.openvino

Apache License 2.0
1.53k stars 207 forks source link

Description of installation doesn't work for Ubuntu Lunar Lobster #159

Open CarlFink opened 9 months ago

CarlFink commented 9 months ago

I tried to install according to the instructions here: https://github.com/bes-dev/stable_diffusion.openvino

I used pipx to install OpenVino, because Debian-based distros complain if you install applications using pip.

Pipx complained that it "could not find a version that satisfies the requirement openvino-dev[onnx,pytorch]==2022.3.0" and listed available versions. I installed 2023.0.2. After completing the listed process (barring requirements.txt not wanting to install) I tried the example for txt-to-img to find ... that there is no demo.py. I then upgraded to 2023.1.0. Nothing changed. Where did demo.py come from? I note that you don't actually say to install Stable Diffusion anywhere. I'm sure that's supposed to happen.

brmarkus commented 9 months ago

Directly under "https://github.com/bes-dev/stable_diffusion.openvino" (using a browser) there you can find demo.py:

image

The demo is part of this repo, not part of OpenVINO.

You might try to install this repo in a Docker container to overcome hurdles with Debian, pipx, missing dependencies.

CarlFink commented 9 months ago

Thank you, @brmarkus.

I did download that. Then I also manually grabbed stable_diffusion_engine.py. None of this is difficult, I just wish it was explicitly stated in the instructions (along with updating the openvino version, since the version listed on the top page here is no longer available).

However, then I had a new problem. (You had to expect that.) I'm attaching a script capture, but Python complains about the capitalization of the word "true" (or True) and fails when I try to run demo.py. That particular line of Python is, frankly, much too long to make debugging easy. I count 9 occurrences of the word "true" and don't know which one is being referred to. I'm not a skilled Python dev--I've barely played with it, only ever getting one simple program into production.

Is this maybe a version incompatibility? That box is running Python 3.11.

And again, thank you. True.txt

brmarkus commented 9 months ago

It sounds like you haven't cloned this GIT repo, yet.

First, you need to clone the repo, e.g. via "git clone https://github.com/bes-dev/stable_diffusion.openvino.git" - then you will get all the files needed - actually all the files you can see in the screenshot: image

The OpenVINO version mentioned, "2022.3.0", does still exist (I'm speaking from Ubuntu perspective) - however, a newer version is always recommended (as long the version number is not too different, otherwise incompatibilities could be possible).

Depending on your environment (Debian? Ubuntu? Within a Docker container using which operating-system as a base?) and especially which Python version you are using (often there are different versions installed like Python v2.x and v3.x side-by-side) - then problems could be possible.

Python indeed expects boolean constants as True and False...

From your attached "True.txt" it looks like your downloaded file(s) look very wrong - you might have downloaded the HTML-files instead of the Python files? Please try again via cloning the repo.