kritiksoman / GIMP-ML

AI for GNU Image Manipulation Program
https://kritiksoman.github.io/GIMP-ML-Docs/index.html
MIT License
1.39k stars 126 forks source link

Plugins install but fail in GIMP 2.99.12 on Windows 10 #52

Open dholeman1 opened 1 year ago

dholeman1 commented 1 year ago

I managed to get GIMP-ML installed in GIMP 2.99.12 on Windows 10. The weights were downloaded and installed manually. The plugins load and appear in the layers menu but fail upon first use. I tried several of the plugins with similar results, here is the debug output for the deblur and superresolution plugins:

Traceback (most recent call last): File "C:\GIMP-ML\gimpml\plugins\deblur\deblur.py", line 172, in run result = deblur( File "C:\GIMP-ML\gimpml\plugins\deblur\deblur.py", line 58, in deblur with open(os.path.join(weight_path, "..", "gimp_ml_run.pkl"), "wb") as file: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Kritik Soman\GIMP-ML\weights\..\gimp_ml_run.pkl'

(deblur.py:6540): LibGimp-WARNING **: 01:13:10.440: gimp_procedure_run: no return values, shouldn't happen C:\GIMP-ML\gimpml\plugins\deblur\deblur.py:232: Warning: g_error_new: assertion 'domain != 0' failed Gimp.main(Deblur.gtype, sys.argv) gimp_plug_in_destroy_proxies: ERROR: GimpImage proxy with ID 2 was refed by plug-in, it MUST NOT do that! gimp_plug_in_destroy_proxies: ERROR: GimpLayer proxy with ID 22 was refed by plug-in, it MUST NOT do that!

The modal dialog message was the same for both attempts: Calling error for procedure 'file-png-save': Could not open 'C:\Users\Kritik Soman\GIMP-ML\cache.png' for writing: No such file or directory

demokrit2017 commented 1 year ago

Any solution on this topic? Facing the same issue...

fortunewalla commented 1 year ago

were you able to resolve it?

The obvious problem seems to be that the path C:\Users\Kritik Soman\GIMP-ML\ is hardcoded by the creators Windows user directory.

You need to manually change it to your PC OS user path.

demokrit2017 commented 1 year ago

This seems not to be the problem. GIMP-ML seem to have been coded for GIMP 2.99.6 and there seem to be significant changes from 2.99.6 to the latest version .14. I managed to correct the I18N settings, to get them loaded but there seem to me more issues. So, to get GIMP-ML working, only a downgrade to 2.99.6 seems to be working ( https://download.gimp.org/gimp/v2.99/windows/gimp-2.99.6-setup.exe ). In general the implementation seems to be quite early. To bad, that there is no other AI project on utilizing e.g. the DeepAI image colorizer. There is a very good background removal tool, but this seems to be all. If there would be a fancy plugin, being easy to install and utilizing all the open available APIs (like GIMP-ML is targeting) in an easy way, this could become a real game changer for GIMP. Adobe Photoshop is just starting here and far behind the actual capabilities (not to mention, that only the newest versions offer this integration).

fortunewalla commented 1 year ago

This seems not to be the problem. GIMP-ML seem to have been coded for GIMP 2.99.6 and there seem to be significant changes from 2.99.6 to the latest version .14. I managed to correct the I18N settings, to get them loaded but there seem to me more issues. So, to get GIMP-ML working, only a downgrade to 2.99.6 seems to be working ( https://download.gimp.org/gimp/v2.99/windows/gimp-2.99.6-setup.exe ). In general the implementation seems to be quite early.

got it. Yes, unless the stable release comes, it will be problematic. Does it use the Gimp API?

Seems exciting. Hopefully the developer will be patient with these changes.

zamrokk commented 4 months ago

how to fix this os.path hardcoded issue ?