intel / openvino-ai-plugins-gimp

GIMP AI plugins with OpenVINO Backend
Apache License 2.0
422 stars 47 forks source link

Gimp plugins present but inoperable #95

Closed DavidRieman closed 3 months ago

DavidRieman commented 3 months ago

Hi, I've recently followed the Windows setup instructions carefully. I'm at the try it out point in the setup and the Layer -> OpenVINO-AI-Plugins menu appears but none of the options work. (The InPainting one is always greyed out even for new RGB image too.) When I click the options, some error output appears in the console log that I used to launch Gimp with. Here's the full console output after having clicked on two of the plugin menus:

D:\GIT\openvino-ai-plugins-gimp>call "C:\Program Files\openvino_toolkit\setupvars.bat"
Python 3.11.2
[setupvars.bat] OpenVINO environment initialized
This is a development version of GIMP.  Debug messages may appear here.

gimp_font_factory_load_names: 614 unsupported fonts were ignored. Set the GIMP_DEBUG_FONTS environment variable for a listing.
set device 'System Aggregated Pointer' to mode: disabled
Skipping potential plug-in 'D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\plugin_utils.py': plug-ins must be installed in subdirectories.
Skipping potential plug-in 'D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\__init__.py': plug-ins must be installed in subdirectories.
Traceback (most recent call last):
  File "D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\stable-diffusion-ov\stable-diffusion-ov.py", line 445, in run
    save_image(image, list_layers, os.path.join(config_path_output["weight_path"], "..", "layer_init_image.png"))
  File "D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\stable-diffusion-ov\..\plugin_utils.py", line 50, in save_image
    Gimp.get_pdb().run_procedure(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PDB' object has no attribute 'run_procedure'. Did you mean: 'lookup_procedure'?

(stable-diffusion-ov.py:2544): LibGimp-WARNING **: 01:09:53.731: _gimp_procedure_run_array: no return values, shouldn't happen
D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\stable-diffusion-ov\stable-diffusion-ov.py:1087: Warning: g_error_new: assertion 'domain != 0' failed
  Gimp.main(StableDiffusion.__gtype__, sys.argv)
Traceback (most recent call last):
  File "D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\superresolution-ov\superresolution-ov.py", line 169, in run
    scale = args.index(0)
            ^^^^^^^^^^
AttributeError: 'GimpProcedureConfig-superresolution-ov' object has no attribute 'index'

(superresolution-ov.py:7124): LibGimp-WARNING **: 01:12:06.495: _gimp_procedure_run_array: no return values, shouldn't happen
D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\superresolution-ov\superresolution-ov.py:347: Warning: g_error_new: assertion 'domain != 0' failed
  Gimp.main(Superresolution.__gtype__, sys.argv)

Any idea what I might have done wrong, or info I can find to help troubleshoot? Thanks.

arisha07 commented 3 months ago

Please try with Python 3.10 version and see if the error resolves. Thank you.

DavidRieman commented 3 months ago

I've uninstalled Python and installed the directly from the link in the readme (even though that version is lacking in security updates). I still get the same types of errors:

D:\GIT\openvino-ai-plugins-gimp>call "C:\Program Files\openvino_toolkit\setupvars.bat"
Python 3.9.13
[setupvars.bat] OpenVINO environment initialized
This is a development version of GIMP.  Debug messages may appear here.

gimp_font_factory_load_names: 614 unsupported fonts were ignored. Set the GIMP_DEBUG_FONTS environment variable for a listing.
set device 'System Aggregated Pointer' to mode: disabled
Skipping potential plug-in 'D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\plugin_utils.py': plug-ins must be installed in subdirectories.
Skipping potential plug-in 'D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\__init__.py': plug-ins must be installed in subdirectories.
Traceback (most recent call last):
  File "D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\stable-diffusion-ov\stable-diffusion-ov.py", line 445, in run
    save_image(image, list_layers, os.path.join(config_path_output["weight_path"], "..", "layer_init_image.png"))
  File "D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\stable-diffusion-ov\..\plugin_utils.py", line 50, in save_image
    Gimp.get_pdb().run_procedure(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PDB' object has no attribute 'run_procedure'. Did you mean: 'lookup_procedure'?

(stable-diffusion-ov.py:1148): LibGimp-WARNING **: 17:14:34.647: _gimp_procedure_run_array: no return values, shouldn't happen
D:\GIT\gimpenv3\Lib\site-packages\gimpopenvino\plugins\stable-diffusion-ov\stable-diffusion-ov.py:1087: Warning: g_error_new: assertion 'domain != 0' failed
  Gimp.main(StableDiffusion.__gtype__, sys.argv)

Any more troubleshooting ideas?

arisha07 commented 3 months ago

What is the gimp version you are using and which OS is this ?

jorgearova commented 3 months ago

Had the same issue described here. Solved changing the version to python 3.10 but specifically what did the major change was degrading to the 2.99.10 version of GIMP. Version 2.99.18 version was generating multiple issues with Python and the Stable Diffusion plugin.

arisha07 commented 3 months ago

Yes for GIMP version please use 2.99.10 or 2.99.14. Closing this issue for now.