To a person needs GUI
Solution in this post doesn't provide GUI. If GUI is required, recommend to install as GIMP plugin. The next post introduces its how-to.
FYI, regardless of with or without GUI, time for image output has no change.
|Windows 11 Pro 22H2
|Intel Core i7-6650U
SD card: 32GB (D drive in this post)
Container and WSL are not used in this post. On limited resource environment, it is better run SDOV directly than to use them. Actually, SDOV can run stably even on a PC with RAM=8GB.
Computational resource assignment is done by Windows OS to them, and it sometime causes OOM kill, which a process is killed forcibly due to out of memory. Although there are workaround to avoid it, they are not recommended.
You should not try to circumvent these safeguards by manually setting --oom-score-adj to an extreme negative number on the daemon or a container, or by setting --oom-kill-disable on a container.
To proceed the work below, following tools are required. "version" is the one in this post.
|Visual Studio 2022
Visual Studio and C++ build tools
C++ builder is required to install Python packages. This tool is included in Visual Studio, or "Build Tools for Visual Studio". In advance of starting procedure below, one of both must be installed with appropriate options.
Tools > Get Tools and Features...
Python 3.11 is in progress and will be available in 2023.0 release.
In this post, all works are done under the next folder. Call this folder as "project folder" in this post.
If the name of Python virtual environment is "myenv", its path will be
and cloned SDOV will be downloaded under the next folder. Call this folder "SDOV folder" in this post.
Images are also output there as
If the same named flle is existed, it is overwritten.
Use GitHub Desktop to clone (download) SDOV,
or run the next command at the project folder. The folder of SDOV is automatically created.
- use latest numpy
- add "openvino-dev"
- use scipy older than version 1.9.0
🔎Descriptions of new "requirements.txt"
diffusers==0.2.4 ftfy==6.1.1 huggingface_hub==0.9.0 numpy opencv-python==18.104.22.168 openvino==2022.3.0 openvino-dev[onnx,pytorch]==2022.3.0 piexif==1.1.3 pillow==9.0.1 scipy<1.9.0 streamlit_drawable_canvas==0.9.1 streamlit==1.12.0 tqdm==4.64.0 transformers==4.16.2 watchdog==2.1.9
Run next commands to enter the project folder, create Python virtual environment "myenv", and enter there.
cd d:\2023\testrun\ python -m venv myenv .\myenv\Scripts\Activate.ps1
Run next commands to enter the SDOV folder and install required packages.
cd .\stable_diffusion.openvino\ python -m pip install --upgrade pip pip install -r ./requirements.txt
Run Stable Diffusion
Run the command with prompts the picture you want. "Example Text-To-Image" on "bes-dev/stable_diffusion.openvino" is
python demo.py --prompt "Street-art painting of Emilia Clarke in style of Banksy, photorealism"
After some downloads of models, it will output images as them.
The image at the top of this post is based on this command.
python demo.py --prompt "Stable Diffusion on 8GB Windows PC, no GPU, no container"
They were output around 10min.