Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing libpng16 #254

Open
TommyV6 opened this issue Oct 27, 2024 · 6 comments
Open

Missing libpng16 #254

TommyV6 opened this issue Oct 27, 2024 · 6 comments

Comments

@TommyV6
Copy link

TommyV6 commented Oct 27, 2024

I`m trying to install fluxgym and got:
<<PINOKIO_SHELL>>eval "$(conda shell.bash hook)" && conda deactivate && conda deactivate && conda deactivate && conda activate base && source /mnt/ssd2tb/pinokio/api/fluxgym.git/env/bin/activate /mnt/ssd2tb/pinokio/api/fluxgym.git/env && python app.py

Traceback (most recent call last):
File "/mnt/ssd2tb/pinokio/api/fluxgym.git/app.py", line 19, in
from library import flux_train_utils, huggingface_util
File "/mnt/ssd2tb/pinokio/api/fluxgym.git/sd-scripts/library/flux_train_utils.py", line 17, in
from library import flux_models, flux_utils, strategy_base, train_util
File "/mnt/ssd2tb/pinokio/api/fluxgym.git/sd-scripts/library/flux_utils.py", line 15, in
from library.utils import setup_logging, MemoryEfficientSafeOpen
File "/mnt/ssd2tb/pinokio/api/fluxgym.git/sd-scripts/library/utils.py", line 13, in
import cv2
File "/mnt/ssd2tb/pinokio/api/fluxgym.git/env/lib/python3.10/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/mnt/ssd2tb/pinokio/api/fluxgym.git/env/lib/python3.10/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/mnt/ssd2tb/pinokio/bin/miniconda/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libpng16-1bde1c40.so.16.43.0: cannot open shared object file: No such file or directory
(env) (base) <<PINOKIO_SHELL>>

I got libpng16 in system but in version extra/libpng 1.6.44-1
in webui i see only ENOENT: no such file or directory, stat '/mnt/ssd2tb/pinokio/api/fluxgym.git/{{input.event[0]}}'
I`m runing up-to-date Arch.

@top7
Copy link

top7 commented Nov 14, 2024

the same for me

@JuanReagan
Copy link

Same problem on Ubuntu 22.04.5 LTS

@ibobak
Copy link

ibobak commented Dec 10, 2024

I am getting the same, Ubuntu 22.04

@ibobak
Copy link

ibobak commented Dec 10, 2024

I found a fix. if you are using pinokio with fluxgym and with forge, then pay attention to the library opencv_python

which is installed in both environments:

/home/YOUR_USER/ai/pinokio/api/fluxgym.git/env/ 

and in

/home/YOUR_USER/ai/pinokio/api/stable-diffusion-webui-forge.git/app/venv/ 

If we do

source bin/activate

In each of them and then

pip list | grep cv

then for fluxgym it will print


opencv-python             4.8.1.78
opencv-python-headless    4.10.0.84

If you do the same for stable-diffusion-webui-forge.git , it will print the same version - 4.10.0.84. In this library the required so file
libpng16-1bde1c40.so.16.43.0 is located.

So, the solution is to run the command

pip install opencv-python==4.10.0.84

in the gluxgym's environment, after which it starts working

@ibobak
Copy link

ibobak commented Dec 10, 2024

For developers: it would be good if you explicitly set this version in the requirements.txt

@aero-create
Copy link

Only registered to say thank you. It worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants