Mikubill / sd-webui-controlnet

WebUI extension for ControlNet
GNU General Public License v3.0
16.99k stars 1.96k forks source link

[Bug]: ControlNet Script Load Error: Conflicting Argument and Missing Modules #2984

Closed Farkandro closed 3 months ago

Farkandro commented 3 months ago

Is there an existing issue for this?

What happened?

It's not working for me, I don't know because I'm new to these codes, but I tried everything and reinstalled it too.

Steps to reproduce the problem

I just updated it and reinstalled it as well.

What should have happened?

work

Commit where the problem happens

webui: controlnet:

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

python launch.py --listen --xformers --enable-insecure-extension-access --ngrok

List of enabled extensions

Control net??

Console logs

*** Error running preload() for /home/studio-lab-user/stable-diffusion-webui/extensions/sd-webui-controlnet/preload.py
    Traceback (most recent call last):
      File "/home/studio-lab-user/stable-diffusion-webui/modules/script_loading.py", line 32, in preload_extensions
        module.preload(parser)
      File "/home/studio-lab-user/stable-diffusion-webui/extensions/sd-webui-controlnet/preload.py", line 2, in preload
        parser.add_argument(
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/argparse.py", line 1441, in add_argument
        return self._add_action(action)
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/argparse.py", line 1806, in _add_action
        self._optionals._add_action(action)
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/argparse.py", line 1643, in _add_action
        action = super(_ArgumentGroup, self)._add_action(action)
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/argparse.py", line 1455, in _add_action
        self._check_conflict(action)
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/argparse.py", line 1592, in _check_conflict
        conflict_handler(action, confl_optionals)
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/argparse.py", line 1601, in _handle_conflict_error
        raise ArgumentError(action, message % conflict_string)
    argparse.ArgumentError: argument --controlnet-dir: conflicting option string: --controlnet-dir

---
ngrok authtoken detected, trying to connect...
ngrok connected to localhost:7860! URL: https://41ff-3-136-172-40.ngrok-free.app
You can use this link after the launch is complete.
2024-07-06 14:58:11,732 - ControlNet - INFO - ControlNet v1.1.410
ControlNet preprocessor location: /home/studio-lab-user/stable-diffusion-webui/extensions/CN-v11400/annotator/downloads
2024-07-06 14:58:11,845 - ControlNet - INFO - ControlNet v1.1.410
[-] ADetailer initialized. version: 23.8.1, num models: 9
*** Error loading script: api.py
    Traceback (most recent call last):
      File "/home/studio-lab-user/stable-diffusion-webui/modules/scripts.py", line 508, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/studio-lab-user/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "/home/studio-lab-user/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/api.py", line 22, in <module>
        from annotator.openpose.animalpose import draw_animalposes
    ModuleNotFoundError: No module named 'annotator.openpose.animalpose'

---
*** Error loading script: controlnet.py
    Traceback (most recent call last):
      File "/home/studio-lab-user/stable-diffusion-webui/modules/scripts.py", line 508, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/studio-lab-user/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "/home/studio-lab-user/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 16, in <module>
        import scripts.preprocessor as preprocessor_init  # noqa
      File "/home/studio-lab-user/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/__init__.py", line 1, in <module>
        from .teed import *
      File "/home/studio-lab-user/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/teed.py", line 4, in <module>
        from annotator.teed import TEEDDetector
    ModuleNotFoundError: No module named 'annotator.teed'

Additional information

No response

huchenlei commented 3 months ago

v1.1.410 is a very old verion. Please update to lastest version. Thanks!

Farkandro commented 3 months ago

Excuse me, how do I update it? installing it doesn't it update? Why did I install it again and the same thing happens to me?

Farkandro commented 3 months ago

I update it manually and the same thing keeps happening to me.

You can use this link after the launch is complete. 2024-07-07 15:33:22,712 - ControlNet - INFO - ControlNet v1.1.410 ControlNet preprocessor location: /home/studio-lab-user/stable-diffusion-webui/extensions/CN-v11400/annotator/downloads 2024-07-07 15:33:22,837 - ControlNet - INFO - ControlNet v1.1.410 [-] ADetailer initialized. version: 23.8.1, num models: 9 *** Error loading script: api.py Traceback (most recent call last): File "/home/studio-lab-user/stable-diffusion-webui/modules/scripts.py", line 508, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/home/studio-lab-user/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/home/studio-lab-user/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/api.py", line 19, in from annotator.openpose.animalpose import draw_animalposes ModuleNotFoundError: No module named 'annotator.openpose.animalpose'


*** Error loading script: controlnet.py Traceback (most recent call last): File "/home/studio-lab-user/stable-diffusion-webui/modules/scripts.py", line 508, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/home/studio-lab-user/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/home/studio-lab-user/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 20, in from scripts.utils import load_state_dict, get_unique_axis0, align_dim_latent ImportError: cannot import name 'align_dim_latent' from 'scripts.utils' (/home/studio-lab-user/stable-diffusion-webui/extensions/CN-v11400/scripts/utils.py)


2024-07-07 15:33:23,998 - ControlNet - INFO - ControlNet v1.1.436 *** Error loading script: global_state.py Traceback (most recent call last): File "/home/studio-lab-user/stable-diffusion-webui/modules/scripts.py", line 508, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/home/studio-lab-user/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/home/studio-lab-user/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/global_state.py", line 57, in "depth_hand_refiner": g_hand_refiner_model.run_model, NameError: name 'g_hand_refiner_model' is not defined


Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu. Loading weights [67ab2fd8ec] from /home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/ponyDiffusionV6XL_v6StartWithThisOne.safetensors /home/studio-lab-user/stable-diffusion-webui/modules/gradio_extensons.py:25: GradioDeprecationWarning: optional parameter is deprecated, and it has no effect res = original_IOComponent_init(self, *args, **kwargs) Running on local URL: http://0.0.0.0:7860/

huchenlei commented 3 months ago

Your local files are probably corrupted. Please delete the sd-webui-controlnet folder and clone the main branch of this repo.