kritiksoman / GIMP-ML

AI for GNU Image Manipulation Program
https://github.com/kritiksoman/tmp/blob/master/GIMP-ML%20Presentation.pdf
MIT License
1.41k stars 133 forks source link

"plug-ins must be installed in subdirectories" #50

Open Nosserkrasser opened 2 years ago

Nosserkrasser commented 2 years ago

First, thank you for your hard work bringing this plugin to Gimp.

I followed the installation guide and got it to work. But after restarting my computer, ML no longer shows up in the menu, and when I start Gimp from the terminal I get the following messages:

Skipping potential plug-in '/home/username/gimpenv3/lib/python3.10/site-packages/gimpml/plugins/init.py': plug-ins must be installed in subdirectories. Skipping potential plug-in '/home/username/gimpenv3/lib/python3.10/site-packages/gimpml/plugins/plugin_utils.py': plug-ins must be installed in subdirectories.

Any ideas what that means and how to fix it?

OS: Manjaro Linux Gimp 2.99.12

rplawate commented 1 year ago

I had the same issue. Resolved after downgrading to Gimp version 2.99.6. Download links as follow Windows users can use this link for GIMP installation: https://download.gimp.org/gimp/v2.99/windows/gimp-2.99.6-setup.exe

Nosserkrasser commented 1 year ago

Thank you :-) I'll give that a try.

differentprogramming commented 1 year ago

I downgraded to 2.99.6 on windows. It did not get rid of this error, but it added new errors. GIMP-ML appears in the Layer menu, but running any part of it causes an error that says "inference failed" and says to look at a log file that doesn't exist.

I tried both with and without gpu set on.

This is the output I get:

This is a development version of GIMP. Debug messages may appear here.

GIMP-Warning: Bad interpreter referenced in interpreter file C:\Program Files\GIMP 2.99\lib\gimp\2.99\interpreters\gimp-script-fu-interpreter.interp: C:\Program Files\GIMP 2.99\bin\gimp-script-fu-interpreter-3.0.exe

GIMP-Warning: Bad interpreter referenced in interpreter file C:\Program Files\GIMP 2.99\lib\gimp\2.99\interpreters\gimp-script-fu-interpreter.interp: C:\Program Files\GIMP 2.99\bin\gimp-script-fu-interpreter-3.0.exe

GIMP-Warning: Bad interpreter referenced in interpreter file C:\Program Files\GIMP 2.99\lib\gimp\2.99\interpreters\gimp-script-fu-interpreter.interp: C:\Program Files\GIMP 2.99\bin\gimp-script-fu-interpreter-3.0.exe

GIMP-Warning: Bad interpreter referenced in interpreter file C:\Program Files\GIMP 2.99\lib\gimp\2.99\interpreters\gimp-script-fu-interpreter.interp: C:\Program Files\GIMP 2.99\bin\gimp-script-fu-interpreter-3.0.exe

GIMP-Warning: Bad binary format string in interpreter file C:\Program Files\GIMP 2.99\lib\gimp\2.99\interpreters\gimp-script-fu-interpreter.interp

set device 'System Aggregated Pointer' to mode: disabled Skipping potential plug-in 'C:\local\gimpenv3\lib\site-packages\gimpml\plugins\plugin_utils.py': plug-ins must be installed in subdirectories. Skipping potential plug-in 'C:\local\gimpenv3\lib\site-packages\gimpml\plugins__init__.py': plug-ins must be installed in subdirectories. GIMP-Error: Unable to run plug-in "goat-exercise-gjs.js" (C:\Program Files\GIMP 2.99\lib\gimp\2.99\extensions\org.gimp.extension.goat-exercises\goat-exercise-gjs.js)

Failed to execute child process (No such file or directory)

dholeman1 commented 1 year ago

This problem is related to changes in Gimp 2.99

Basically you just follow the pattern below for each plugin .py file. I got them to install once I made the changes but do be careful about tabs/spaces as python is picky.

def do_query_procedures(self): self.set_translation_domain( "gimp30-python", Gio.file_new_for_path(Gimp.locale_directory()) ) return ["superresolution"]

To this:

def do_query_procedures(self): return ["superresolution"]

def do_set_i18n(self, procname): return True, 'gimp30-python', None

differentprogramming commented 1 year ago

I did all that, every call still failed.

jordanmalecki commented 1 year ago

This problem is related to changes in Gimp 2.99

Basically you just follow the pattern below for each plugin .py file. I got them to install once I made the changes but do be careful about tabs/spaces as python is picky.

def do_query_procedures(self): self.set_translation_domain( "gimp30-python", Gio.file_new_for_path(Gimp.locale_directory()) ) return ["superresolution"]

To this:

def do_query_procedures(self): return ["superresolution"]

def do_set_i18n(self, procname): return True, 'gimp30-python', None

This worked for me.

...there are two places the plugins will appear: ~/gimpenv3/lib/python3.10/site-packages/gimpml/plugins and ~/GIMP-ML/gimpml/plugins

The error disappeared and GIMP-ML was added to the layout menu after I made the changes to ~/gimpenv3/lib/python3.10/site-packages/gimpml/plugins path.

lorgal commented 1 year ago

This problem is related to changes in Gimp 2.99

Basically you just follow the pattern below for each plugin .py file. I got them to install once I made the changes but do be careful about tabs/spaces as python is picky.

def do_query_procedures(self): self.set_translation_domain( "gimp30-python", Gio.file_new_for_path(Gimp.locale_directory()) ) return ["superresolution"]

To this:

def do_query_procedures(self): return ["superresolution"]

def do_set_i18n(self, procname): return True, 'gimp30-python', None

Thanks a lot! With spaces, no tabs! Worked for me