TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.5k stars 1.31k forks source link

Error loading script: controlnet.py #2883

Open KyotoLyon opened 2 months ago

KyotoLyon commented 2 months ago

ControlNet preprocessor location: /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads ** Error loading script: controlnet.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 527, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 16, in import scripts.preprocessor as preprocessor_init # noqa File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/init.py", line 9, in from .mobile_sam import File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/mobile_sam.py", line 1, in from annotator.mobile_sam import SamDetector_Aux File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/mobile_sam/init.py", line 12, in from controlnet_aux import SamDetector ModuleNotFoundError: No module named 'controlnet_aux'

This error is happening repeatedly. I can open the SD, but it does not activate the Controlnet extension. How can I fix it?

slap1996 commented 2 months ago

The same error here! Controlnet no longer appears in the webui :(

ControlNet preprocessor location: /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads ** Error loading script: controlnet.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 508, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 16, in import scripts.preprocessor as preprocessor_init # noqa File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/init.py", line 9, in from .mobile_sam import File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/mobile_sam.py", line 1, in from annotator.mobile_sam import SamDetector_Aux File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/mobile_sam/init.py", line 12, in from controlnet_aux import SamDetector ModuleNotFoundError: No module named 'controlnet_aux'

mcqx4 commented 2 months ago

Use command !pip install controlnet_aux above the Start Stable Diffusion cell and it should work!

slap1996 commented 2 months ago

Use command !pip install controlnet_aux above the Start Stable Diffusion cell and it should work!

It works! Thanks :)

-For those who don't know, above start stable diffusion between lines, if you place the cursor, a "+code" button appears, click on it and add the command:

!pip install controlnet_aux

Miga1991 commented 2 months ago

Use command !pip install controlnet_aux above the Start Stable Diffusion cell and it should work!

Thanks 👍

hcatGitHub commented 2 months ago

-For those who don't know, above start stable diffusion between lines, if you place the cursor, a "+code" button appears, click on it and add the command:

!pip install controlnet_aux

Thanks for showing how to run the command. It works. Does it mean I need to run the command every time I start a1111?

KyotoLyon commented 2 months ago

It worked here. Will I need to use this command every time?

nqdior commented 2 months ago

I am an Admin of the Japanese Stability AI user community. One user enquired about this issue, to which I responded. He said that he had installed controlnet-aux and received the following error.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
xformers 0.0.26.post1 requires torch==2.3.0, but you have torch 2.3.1+cu121 which is incompatible.

This issue relates to the following tickets https://github.com/facebookresearch/xformers/issues/1052

Response measures:

!pip install xformers==0.0.27
!pip install controlnet-aux

regards,

slap1996 commented 2 months ago

-For those who don't know, above start stable diffusion between lines, if you place the cursor, a "+code" button appears, click on it and add the command: !pip install controlnet_aux

Thanks for showing how to run the command. It works. Does it mean I need to run the command every time I start a1111?

It worked here. Will I need to use this command every time?

Apparently yes, I don't see that they have fixed it :/

@TheLastBen

.

brunovianna commented 2 months ago

They fixed it in the last commit https://github.com/TheLastBen/fast-stable-diffusion/commit/8460e97693433001c3c65e81323384cd6c9da8b4