Traceback (most recent call last):
File "/root/PromptFix/scripts/../process_images_json.py", line 23, in
from stable_diffusion.ldm.hfp import extract_high_freq_component, sobel_operator
File "/root/PromptFix/stable_diffusion/ldm/hfp.py", line 2, in
import cv2
File "/opt/conda/envs/promptfix/lib/python3.10/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/opt/conda/envs/promptfix/lib/python3.10/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/opt/conda/envs/promptfix/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
If you encounter this issue: 如果你遇到了这个问题:
Traceback (most recent call last): File "/root/PromptFix/scripts/../process_images_json.py", line 23, in
from stable_diffusion.ldm.hfp import extract_high_freq_component, sobel_operator
File "/root/PromptFix/stable_diffusion/ldm/hfp.py", line 2, in
import cv2
File "/opt/conda/envs/promptfix/lib/python3.10/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/opt/conda/envs/promptfix/lib/python3.10/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/opt/conda/envs/promptfix/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
This can resolve it. 这可以解决: