intel / openvino-ai-plugins-gimp

GIMP AI plugins with OpenVINO Backend
Apache License 2.0
512 stars 55 forks source link

pkgconfig errors during build on Ubuntu 22.04 #112

Closed sr99622 closed 5 months ago

sr99622 commented 7 months ago

During gegl build, this error was encountered

[859/1263] Generating gegl/Gegl-0.4.gir with a custom command
Package babl-0.1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `babl-0.1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'babl-0.1' found

The file /usr/local/lib/x86_64-linux-gnu/pkgconfig/babl.pc was renamed to babl-0.1.pc and then gegl build success

Then during gimp build

meson.build:366:0: ERROR: Could not generate cargs for gegl-0.4:
Package babl was not found in the pkg-config search path.
Perhaps you should add the directory containing `babl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'babl', required by 'gegl-0.4', not found

File above was changed back to babl.pc and gimp build success, and then open vino extensions were found in layers. There were some other instances of the babl-0.1.pc not found, but they didn't seem to affect the build ?

Edit: Tried re-building with symlink babl-0.1.pc to babl.pc and compiled without the same error. There was this error however after gimp install

Successfully installed gimpopenvino-0.0.1
*** openvino-ai-plugins-gimp Installed ***

##########

chmod: cannot access '/home/stephen/GIMP/gimpenv3/lib/python3.10/site-packages/gimpopenvino/plugins/inpainting-ov/inpainting-ov.py': No such file or directory
chmod: cannot access '/home/stephen/GIMP/gimpenv3/lib/python3.10/site-packages/gimpopenvino/plugins/fast-style-transfer-ov/fast-style-transfer-ov.py': No such file or directory
NOTE ! >> Please add this path to Preferences --> Plug-ins in GIMP :  /home/stephen/GIMP/gimpenv3/lib/python3.10/site-packages/gimpopenvino/plugins

##########

Added the path as shown in gimp. There are three selections in the openvino ai plugins menu option, semantic segmentation, stable diffusion and superresolution. Stable Diffusion and semantic segmentation seem to be working but superresolution fails with error

Traceback (most recent call last):
  File "/home/stephen/GIMP/gimpenv3/lib/python3.10/site-packages/gimpopenvino/plugins/superresolution-ov/../../tools/superresolution-ov.py", line 53, in <module>
    output = get_sr(image, s, model_name=model_name, weight_path=weight_path, device=device)
  File "/home/stephen/GIMP/gimpenv3/lib/python3.10/site-packages/gimpopenvino/plugins/superresolution-ov/../../tools/superresolution-ov.py", line 23, in get_sr
    out = run(img, os.path.join(weight_path, "superresolution-ov", "realesrgan.xml"), device, model_name)
  File "/home/stephen/GIMP/gimpenv3/lib/python3.10/site-packages/gimpopenvino/tools/openvino_common/superes_run_ov.py", line 66, in run
    core.set_property({'CACHE_DIR': os.path.join(model_path, '..','cache')})
RuntimeError: Exception from src/inference/src/cpp/core.cpp:208:
Couldn't create directory [/home/stephen/openvino-ai-plugins-gimp/weights/superresolution-ov/realesrgan.xml/..], err=Not a directory)

Tried testing a few stable diffusion models, during one of these (some control-...) the system froze and had to power down to re-boot. Then when re-starting gimp a bunch of error messages in the terminal, and stable diffusion would not start with error

Plug-in crashed: "stable-diffusion-ov.py"
(/home/stephen/GIMP/gimpenv3/lib/python3.10/site-packages/gimpopenvino/plugins/stable-diffusion-ov/stable-diffusion-ov.py)

The dying plug-in may have messed up GIMP's internal state. You may want to save your images and restart GIMP to be on the safe side.

For reference the CPU is an Intel i5-12400, GPU A380, 16 GB RAM, stable diffusion not coming back after re-boot

gblong1 commented 6 months ago

Hi @sr99622 - looks like there is some permission issue with /home/stephen directory. Can you check that you have write permissions? Looks like the installation failed and directory creation failed.

gblong1 commented 5 months ago

Hi @sr99622 - were you able to solve this issue?

gblong1 commented 5 months ago

closing due to lack of activity. if you continue to have trouble, please file a new issue. thanks!