intel / openvino-ai-plugins-gimp

GIMP AI plugins with OpenVINO Backend
Apache License 2.0
447 stars 49 forks source link

linux installation problems due to instructions #69

Closed Bobcatie closed 7 months ago

Bobcatie commented 8 months ago

Im starting a new issue as i have managed to successfully install openvino but im still having some difficulty following the Linux instructions

This plugin is tested on Ubuntu 22.04. Building GIMP from source is recommended.

  1. Install Dependencies

this direction is very clear.

  1. Clone, build, and install babl
  2. Clone, build, and install gegl
  3. Clone, build, and install Gimp

Are the packages nested or are they all built in the downloads folder?

  1. Install Plugins

    Clone this repo

    git clone https://github.com/intel/openvino-ai-plugins-gimp.git

Where should this repo be placed? Nested or in the downloads folder?

Setup the environment Note that you will need to do these steps everytime you start GIMP

source /opt/intel/openvino/setupvars.sh export GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/girepository-1.0:/usr/local/lib/x86_64-linux-gnu/girepository-1.0

From which directory location should you run both of these commands?

Run install script, and download models. The following steps will create the virtual environment "gimpenv3", install all required packages and will also walk you through models setup.

chmod +x openvino-ai-plugins-gimp/install.sh source /opt/intel/openvino/setupvars.sh ./openvino-ai-plugins-gimp/install.sh

Again from which directory location should you run both of these commands?

You will be prompted to setup the AI models used with OpenVINO™. Choose the models that you would like to setup, keeping in mind that choosing to download all of them may take time and considerable disk space. You can re-run "run install script" step later again to install & setup models that you may have missed.

what are the necessary models needed to install@

I ened up selecting all and here is the list of contents inside a folder called "Downloads/gimpenv3/lib/python3.10/site-packages"

accelerate
accelerate-0.25.0.dist-info
altair
altair-5.2.0.dist-info
attr
attrs
attrs-23.1.0.dist-info
beautifulsoup4-4.12.2.dist-info
blinker
blinker-1.7.0.dist-info
bs4
cachetools
cachetools-5.3.2.dist-info
certifi
certifi-2023.11.17.dist-info
CHANGELOG.md
charset_normalizer
charset_normalizer-3.3.2.dist-info
click
click-8.1.7.dist-info
contourpy
contourpy-1.2.0.dist-info
controlnet_aux
controlnet_aux-0.0.7.dist-info
cv2
cycler
cycler-0.12.1.dist-info
dateutil
diffusers
diffusers-0.22.0.dist-info
_distutils_hack
distutils-precedence.pth
einops
einops-0.7.0.dist-info
filelock
filelock-3.13.1.dist-info
fontTools
fonttools-4.46.0.dist-info
fsspec
fsspec-2023.12.2.dist-info
ftfy
ftfy-6.1.1.dist-info
functorch
gdown
gdown-4.7.1.dist-info
gimpopenvino
gimpopenvino-0.0.1.dist-info
git
gitdb
gitdb-4.0.11.dist-info
GitPython-3.1.40.dist-info
google
huggingface_hub
huggingface_hub-0.19.4.dist-info
idna
idna-3.6.dist-info
imageio
imageio-2.33.1.dist-info
importlib_metadata
importlib_metadata-7.0.0.dist-info
isympy.py
jinja2
Jinja2-3.1.2.dist-info
jsonschema
jsonschema-4.20.0.dist-info
jsonschema_specifications
jsonschema_specifications-2023.11.2.dist-info
kiwisolver
kiwisolver-1.4.5.dist-info
lazy_loader
lazy_loader-0.3.dist-info
markdown_it
markdown_it_py-3.0.0.dist-info
markupsafe
MarkupSafe-2.1.3.dist-info
matplotlib
matplotlib-3.8.2.dist-info
mdurl
mdurl-0.1.2.dist-info
mpl_toolkits
mpmath
mpmath-1.3.0.dist-info
networkx
networkx-3.2.1.dist-info
ngraph
numpy
numpy-1.26.2.dist-info
numpy.libs
nvfuser
nvidia
nvidia_cublas_cu12-12.1.3.1.dist-info
nvidia_cuda_cupti_cu12-12.1.105.dist-info
nvidia_cuda_nvrtc_cu12-12.1.105.dist-info
nvidia_cuda_runtime_cu12-12.1.105.dist-info
nvidia_cudnn_cu12-8.9.2.26.dist-info
nvidia_cufft_cu12-11.0.2.54.dist-info
nvidia_curand_cu12-10.3.2.106.dist-info
nvidia_cusolver_cu12-11.4.5.107.dist-info
nvidia_cusparse_cu12-12.1.0.106.dist-info
nvidia_nccl_cu12-2.18.1.dist-info
nvidia_nvjitlink_cu12-12.3.101.dist-info
nvidia_nvtx_cu12-12.1.105.dist-info
opencv_python-3.4.18.65.dist-info
opencv_python.libs
openvino
openvino-2023.1.0.dist-info
openvino_telemetry
openvino_telemetry-2023.2.1.dist-info
packaging
packaging-23.2.dist-info
pandas
pandas-2.1.4.dist-info
PIL
Pillow-10.1.0.dist-info
Pillow.libs
pip
pip-23.3.1.dist-info
pip-23.3.1.virtualenv
pkg_resources
protobuf-3.20.3.dist-info
protobuf-3.20.3-py3.10-nspkg.pth
psutil
psutil-5.9.6.dist-info
pyarrow
pyarrow-14.0.1.dist-info
__pycache__
pydeck
pydeck-0.8.1b0.dist-info
pygments
pygments-2.17.2.dist-info
pylab.py
pympler
Pympler-1.0.1.dist-info
_pyngraph.cpython-310-x86_64-linux-gnu.so
pyparsing
pyparsing-3.1.1.dist-info
PySocks-1.7.1.dist-info
python_dateutil-2.8.2.dist-info
pytz
pytz-2023.3.post1.dist-info
PyYAML-6.0.1.dist-info
README.md
referencing
referencing-0.32.0.dist-info
regex
regex-2023.10.3.dist-info
requests
requests-2.31.0.dist-info
rich
rich-13.7.0.dist-info
rpds
rpds_py-0.13.2.dist-info
safetensors
safetensors-0.3.2.dist-info
scikit_image-0.22.0.dist-info
scipy
scipy-1.11.4.dist-info
scipy.libs
semver
semver-3.0.2.dist-info
setuptools
setuptools-69.0.2.dist-info
setuptools-69.0.2.virtualenv
six-1.16.0.dist-info
six.py
skimage
smmap
smmap-5.0.1.dist-info
sockshandler.py
socks.py
soupsieve
soupsieve-2.5.dist-info
streamlit
streamlit-1.12.0.dist-info
sympy
sympy-1.12.dist-info
tifffile
tifffile-2023.12.9.dist-info
timm
timm-0.4.5.dist-info
tlz
tokenizers
tokenizers-0.13.3.dist-info
tokenizers.libs
toml
toml-0.10.2.dist-info
toolz
toolz-0.12.0.dist-info
torch
torch-2.1.1.dist-info
torchgen
torchvision
torchvision-0.16.1.dist-info
torchvision.libs
tornado
tornado-6.4.dist-info
tqdm
tqdm-4.64.0.dist-info
transformers
transformers-4.31.0.dist-info
triton
triton-2.1.0.dist-info
typing-3.7.4.3.dist-info
typing_extensions-4.9.0.dist-info
typing_extensions.py
typing.py
tzdata
tzdata-2023.3.dist-info
tzlocal
tzlocal-5.2.dist-info
urllib3
urllib3-2.1.0.dist-info
validators
validators-0.22.0.dist-info
_virtualenv.pth
_virtualenv.py
watchdog
watchdog-2.1.9.dist-info
wcwidth
wcwidth-0.2.12.dist-info
wheel
wheel-0.42.0.dist-info
wheel-0.42.0.virtualenv
_yaml
yaml
zipp
zipp-3.17.0.dist-info

Start the GIMP application (gimp-2.99), and add the gimpenv3 path that was printed when running the above step to the list of plugin folders [Edit-> Preferences-> Folders-> Plugins].

Which folder should I point to? my installation had many locations printed. I tried "/Downloads/gimpenv3/lib/python3.10/site-packages/gimpopenvino/plugins"

Restart GIMP, and you should see 'OpenVINO-AI-Plugins' show up in 'Layer' menu

Im not seeing anything.

source /opt/intel/openvino/setupvars.sh export GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/girepository-1.0:/usr/local/lib/x86_64-linux-gnu/girepository-1.0 gimp-2.99

What are these commands for?

gblong1 commented 8 months ago

Hi @Bobcatie -

Im starting a new issue as i have managed to successfully install openvino but im still having some difficulty following the Linux instructions

This plugin is tested on Ubuntu 22.04. Building GIMP from source is recommended.

  1. Install Dependencies

this direction is very clear.

  1. Clone, build, and install babl
  2. Clone, build, and install gegl
  3. Clone, build, and install Gimp

Are the packages nested or are they all built in the downloads folder?

You should clone them each to their own directory, but they don't need to be in a specific directory. Since you are building from source, the sudo ninja -C _build install step should place the libraries in the correct places in the Linux filesystem.

  1. Install Plugins Clone this repo git clone https://github.com/intel/openvino-ai-plugins-gimp.git

Where should this repo be placed? Nested or in the downloads folder?

Again, it depends on your preference. You can put them anywhere you want. In general, they shouldn't be nested under any other cloned directory (good for keeping projects separate). I, personally, would create a gimp folder under $HOME, and then clone everything there at the same level. It all depends on how you like to have your filesystem organized.

Setup the environment Note that you will need to do these steps everytime you start GIMP source /opt/intel/openvino/setupvars.sh export GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/girepository-1.0:/usr/local/lib/x86_64-linux-gnu/girepository-1.0

From which directory location should you run both of these commands?

Because the full path is specified, you can run them from any location. They are setting the environment for your terminal.

Run install script, and download models. The following steps will create the virtual environment "gimpenv3", install all required packages and will also walk you through models setup. chmod +x openvino-ai-plugins-gimp/install.sh source /opt/intel/openvino/setupvars.sh ./openvino-ai-plugins-gimp/install.sh

Again from which directory location should you run both of these commands?

You should run this from the directory where you cloned this repository. For example, if you created a /home/u/gimp directory and cloned the repo there, you would now have /home/u/gimp/openvino-ai-plugins-gimp directory. So the commands above would run from /home/u/gimp directory.

Full example:

cd $HOME
mkdir gimp
cd ./gimp
git clone http://github.com/intel/openvino-ai-plugins-gimp
chmod +x ./openvino-ai-plugins-gimp/install.sh
./openvino-ai-plugins-gimp/install.sh

You will be prompted to setup the AI models used with OpenVINO™. Choose the models that you would like to setup, keeping in mind that choosing to download all of them may take time and considerable disk space. You can re-run "run install script" step later again to install & setup models that you may have missed.

what are the necessary models needed to install@

This depends on what versions of Stable Diffusion you want to run. If you choose all, they will be installed under $HOME/openvino-ai-plugins-gimp/weights/stable-diffusion-ov

I ened up selecting all and here is the list of contents inside a folder called "Downloads/gimpenv3/lib/python3.10/site-packages"

These are the python packages, not the stable diffusion models.

Start the GIMP application (gimp-2.99), and add the gimpenv3 path that was printed when running the above step to the list of plugin folders [Edit-> Preferences-> Folders-> Plugins].

Which folder should I point to? my installation had many locations printed. I tried "/Downloads/gimpenv3/lib/python3.10/site-packages/gimpopenvino/plugins"

That looks correct.

Restart GIMP, and you should see 'OpenVINO-AI-Plugins' show up in 'Layer' menu

Im not seeing anything.

Please double check that you ran the

source /opt/intel/openvino/setupvars.sh
export GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/girepository-1.0:/usr/local/lib/x86_64-linux-gnu/girepository-1.0
gimp-2.99

What are these commands for?

These commands setup the openvino environment, and set the TYPELIB path so that GIMP can correctly display the plugin UI.

EDIT: Formatting

gblong1 commented 7 months ago

Hi @Bobcatie - hopefully you were able to resolve your issues. Let me know if you have any additional problems and we can help you out.