Yujun-Shi / DragDiffusion

[CVPR2024, Highlight] Official code for DragDiffusion
https://yujun-shi.github.io/projects/dragdiffusion.html
Apache License 2.0
1.13k stars 82 forks source link

ModuleNotFoundError: No module named 'cv2' #36

Closed christopherquenneville closed 11 months ago

christopherquenneville commented 11 months ago

C:\StableDiffusion\DragDiffusion>python drag_ui.py Traceback (most recent call last): File "C:\StableDiffusion\DragDiffusion\drag_ui.py", line 22, in from utils.ui_utils import get_points, undo_points File "C:\StableDiffusion\DragDiffusion\utils\ui_utils.py", line 2, in import cv2 ModuleNotFoundError: No module named 'cv2'

I am getting this error from CMD when trying to launch the GUI script.

Am I missing something?

Thanks for your help in advance, Good day

christopherquenneville commented 11 months ago

It looks like opencv-contrib-python 4.3.0.36 was yanked https://pypi.org/project/opencv-contrib-python/4.3.0.36/

It's part of the environment.yaml

christopherquenneville commented 11 months ago

Fixed my problem by installing the following: pip install opencv-python

And then I also had to install others: pip install einops pip install pytorch-lightning pip install accelerate pip install transformers