intel / openvino-ai-plugins-gimp

GIMP AI plugins with OpenVINO Backend
Apache License 2.0
486 stars 52 forks source link

help with windows installation #8

Closed fajterini closed 1 year ago

fajterini commented 1 year ago

Hi can you help me with installation on windows 11?

I have this error running install.bat from main, python 3.10.11

ERROR: Invalid requirement: 'openvino-ai-plugins-gimp\.' Hint: It looks like a path. File 'openvino-ai-plugins-gimp.' does not exist. openvino-ai-plugins-gimp Installed Traceback (most recent call last): File "", line 1, in File "C:\Temp\openvino-ai-plugins-gimp-main\gimpopenvino__init__.py", line 1, in from .tools.complete_install import setup_python_weights File "C:\Temp\openvino-ai-plugins-gimp-main\gimpopenvino\tools\complete_install.py", line 13, in import gdown ModuleNotFoundError: No module named 'gdown' openvino-ai-plugins-gimp Setup Ended PS C:\Temp\openvino-ai-plugins-gimp-main>

I have fixed this with changes to line 6 but still got ERROR: Invalid requirement: 'openvino-ai-plugins-gimp\.' Hint: It looks like a path. File 'openvino-ai-plugins-gimp.' does not exist.

gimpenv3\Scripts\python.exe -m pip install  transformers==4.23.0 diffusers==0.2.4 tqdm==4.64.0 openvino==2022.3.0 huggingface_hub streamlit==1.12.0 watchdog==2.1.9 ftfy==6.1.1 gdown

Also I have some other questions and suggestions ...

Another question ? Is also GIMP 2.99.14 supported ??

Thanks

arisha07 commented 1 year ago

can you try renaming the folder openvino-ai-plugins-gimp-main to openvino-ai-plugins-gimp and run install.bat this way ---> openvino-ai-plugins-gimp\install.bat from your C:\Temp directory.

GIMP 2.99.14 is not supported as of yet.

fajterini commented 1 year ago

In install. bat this is causing the error it ask to install python module from non exzistig folder

gimpenv3\Scripts\python.exe -m pip install openvino-ai-plugins-gimp\.

I have modified the install.bat file to fix missing gdown pip package and also openvino-ai-plugins-gimp installation. Also at and I copy weights to user folder but still it's not working for me ... in GIMP when using plugins it end with error message "interference not successful"

:<<BATCH @echo off echo **** openvino-ai-plugins-gimp Setup started **** set var_PWD=%cd% python -m pip install virtualenv python -m virtualenv gimpenv3 gimpenv3\Scripts\python.exe -m pip install transformers==4.23.0 diffusers==0.2.4 tqdm==4.64.0 openvino==2022.3.0 huggingface_hub streamlit==1.12.0 watchdog==2.1.9 ftfy==6.1.1 gdown gimpenv3\Scripts\python.exe -m pip install %var_PWD% echo *** openvino-ai-plugins-gimp Installed *** gimpenv3\Scripts\python.exe -c "import gimpopenvino; gimpopenvino.setup_python_weights()" echo **** openvino-ai-plugins-gimp Setup Ended **** echo **** copy weights folder to user profile %HOMEPATH%\openvino-ai-plugins-gimp\weights\ **** Xcopy /E /I .\weights %HOMEPATH%\openvino-ai-plugins-gimp\weights\ exit /b BATCH

fajterini commented 1 year ago

I have created PR for installation also I have used line from @multiflexi PR to change, this way it works :

gimpenv3\Scripts\python.exe -m pip install openvino-ai-plugins-gimp\.

gimpenv3\Scripts\python.exe -m pip install .

fajterini commented 1 year ago

Hi @arisha07

I see you have pushed multiple changes and updated installation documentation and install.bat file. But it's still not working for me :(

still needed to replace in install.bat gimpenv3\Scripts\python.exe -m pip install openvino-ai-plugins-gimp\. with gimpenv3\Scripts\python.exe -m pip install .

Also can you explain how to do this step in readme file ? Download Stable-Diffusion-1.4 models from https://huggingface.co/bes-dev/stable-diffusion-v1-4-openvino/tree/main and place it in %userprofile%\openvino-ai-plugins-gimp\weights\stable-diffusion-ov\stable-diffusion-1.4

I was using this command in the end to directly copy required files:
git clone https://huggingface.co/bes-dev/stable-diffusion-v1-4-openvino/ %HOMEPATH%\weights\stable-diffusion-ov\stable-diffusion-1.4

I Also replaced %userprofile% with it %HOMEPATH% because %USERPROFILE% doesn't work for me in powershell 7.x cmd.

RyanMetcalfeInt8 commented 1 year ago

Hi @fajterini, which directory are you running install.bat from? Right now, install.bat assumes that you are running it from one directory up. So, if you ran git clone https://github.com/intel/openvino-ai-plugins-gimp.git within C:\Temp folder, then you should run: openvino-ai-plugins-gimp\install.bat

Is that what you're doing?

fajterini commented 1 year ago

Ok looks like the problem is results of this line depends from where the file install.bat is run :( gimpenv3\Scripts\python.exe -m pip install openvino-ai-plugins-gimp.

because i was running install.bat directly from openvino-ai-plugins-gimp it was not working, but there needs to be way how to fix this that it will run correctly.

So this issue was probably on my side.

RyanMetcalfeInt8 commented 1 year ago

Ok looks like the problem is results of this line depends from where the file install.bat is run :(

Correct.

because i was running install.bat directly from openvino-ai-plugins-gimp it was not working, but there needs to be way how to fix this that it will run correctly.

Yes, we are working on a change-set that will allow install.bat to be run from within openvino-ai-plugins-gimp.

fajterini commented 1 year ago

Closing issue was caused by running install.bat directly from inside folder. But the installation should be more normal user proof ;)
Also i think you should also update the step 3 with this command git clone https://huggingface.co/bes-dev/stable-diffusion-v1-4-openvino/ %HOMEPATH%\weights\stable-diffusion-ov\stable-diffusion-1.4

Thanks :)

RyanMetcalfeInt8 commented 1 year ago

Thanks for the feedback on %homepath% -- we'll switch to that.