lkwq007 / stablediffusion-infinity

Outpainting with Stable Diffusion on an infinite canvas
Apache License 2.0
3.82k stars 300 forks source link

[Bug] Cannot open the app - opencv2/imgcodecs.hpp: No such file or directory #213

Open GovenorKratos opened 1 month ago

GovenorKratos commented 1 month ago

Describe the bug I followed the setup guide in this repo. I am a noob when it comes to Python, and this is my first time using Conda.

To Reproduce Steps to reproduce the behavior: Follow the guide, by copying and pasting each command. Then jump into the conda environment and run "python app.py".

Expected behavior The app was meant to open, but instead I get fatal error: opencv2/imgcodecs.hpp: No such file or directory

Desktop (please complete the following information):

Additional context I am a noob when it comes to this sort of stuff. If I haven't added correct information or anything is missing, feel free to tell me.

GovenorKratos commented 1 month ago

The full output - This is everything I got from the ouput on the terminal: (Sorry about the formatting)

**Compiling and loading c extensions from "/home/redacted/stablediffusion-infinity/PyPatchMatch". rm -rf build/obj libpatchmatch.so Package opencv4 was not found in the pkg-config search path. Perhaps you should add the directory containing opencv4.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv4', required by 'virtual:world', not found mkdir: created directory 'build/obj' mkdir: created directory 'build/obj/csrc/' [dep] csrc/inpaint.cpp ... Package opencv4 was not found in the pkg-config search path. Perhaps you should add the directory containingopencv4.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv4', required by 'virtual:world', not found [dep] csrc/masked_image.cpp ... Package opencv4 was not found in the pkg-config search path. Perhaps you should add the directory containing opencv4.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv4', required by 'virtual:world', not found [dep] csrc/nnf.cpp ... Package opencv4 was not found in the pkg-config search path. Perhaps you should add the directory containingopencv4.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv4', required by 'virtual:world', not found [dep] csrc/pyinterface.cpp ... Package opencv4 was not found in the pkg-config search path. Perhaps you should add the directory containing `opencv4.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv4', required by 'virtual:world', not found [CC] csrc/inpaint.cpp ... csrc/inpaint.cpp:3:10: fatal error: opencv2/imgcodecs.hpp: No such file or directory 3 | #include <opencv2/imgcodecs.hpp> | ^~~~~~~ compilation terminated. make: * [Makefile:33: build/obj/csrc/inpaint.o] Error 1 patch_match compiling failed, will fall back to edge_pad No module named 'fpie' so PhotometricCorrection is disabled Traceback (most recent call last): File "/home/redacted/stablediffusion-infinity/app.py", line 1123, in setup_button.click( TypeError: EventListener._setup..event_trigger() got an unexpected keyword argument '_js' (sd-inf) Redacted@Redacted:~/stablediffusion-infinity$ pip install opencv4 ERROR: Could not find a version that satisfies the requirement opencv4 (from versions: none) ERROR: No matching distribution found for opencv4