ModuleNotFoundError: No module named 'annotator'

#1
by killyvera - opened

i try to run in my desktop but i can´t, with this error, any idea?

Hi, @killyvera

I think the following will work.

git clone --recursive https://huggingface.co/spaces/hysts/ControlNet-with-Anything-v4
cd ControlNet-with-Anything-v4
pip install -q -r requirements.txt
cd ControlNet && git apply ../patch && cd ..
python app.py

When trying to do "cd ControlNet && git apply ../patch && cd .." i get the following error, this may be because i am using windows? not too sure
../patch:6: trailing whitespace.
import pathlib
../patch:7: trailing whitespace.

../patch:58: trailing whitespace.
import pathlib
../patch:59: trailing whitespace.

../patch:102: trailing whitespace.
import pathlib
error: patch failed: annotator/hed/init.py:1
error: annotator/hed/init.py: patch does not apply
error: patch failed: annotator/midas/api.py:1
error: annotator/midas/api.py: patch does not apply
error: patch failed: annotator/mlsd/init.py:1
error: annotator/mlsd/init.py: patch does not apply
error: patch failed: annotator/openpose/init.py:1
error: annotator/openpose/init.py: patch does not apply
error: patch failed: annotator/uniformer/init.py:1
error: annotator/uniformer/init.py: patch does not apply
error: patch failed: annotator/util.py:25
error: annotator/util.py: patch does not apply

@MrSnout That seems to be the cause. As I don't have a Windows environment, I can't test it myself and I'm not sure if it will work, but maybe you can just open the file patch and resave it with the correct line endings in the Windows environment before applying git apply ../patch. Or maybe you can manually apply the changes listed in the patch file.

Also, using Google Colab instead of your local environment might be an option. https://huggingface.co/spaces/hysts/ControlNet/discussions/10#6406a3bdfb41c2b4b270f4db

hysts changed discussion status to closed

Sign up or log in to comment