Repository: stable-diffusion-webui
Issue: AttributeError: 'UiControlNetUnit' object has no attribute 'enable'[Bug]: at last version
Labels: bug-report

### Checklist

- [ ] The issue exists after disabling all extensions
- [ ] The issue exists on a clean installation of webui
- [x] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

txt2img an img2img not generate images

AttributeError: 'UiControlNetUnit' object has no attribute 'enable'

### Steps to reproduce the problem

1 strats generate image
2. Error AttributeError: 'UiControlNetUnit' object has no attribute 'enable'

### What should have happened?

must generait image

### What browsers do you use to access the UI ?

Microsoft Edge

### Sysinfo

[sysinfo-2024-04-22-20-16.json](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/15068302/sysinfo-2024-04-22-20-16.json)
[sysinfo-2024-04-22-20-16.json](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/15068327/sysinfo-2024-04-22-20-16.json)


### Console logs

```Shell
venv "C:\Users\Server17\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.9.3
Commit hash: 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0
Launching Web UI with arguments:
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
[-] ADetailer initialized. version: 24.4.2, num models: 10
ControlNet preprocessor location: C:\Users\Server17\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-04-22 23:19:34,355 - ControlNet - INFO - ControlNet v1.1.445
2024-04-22 23:19:34,459 - ControlNet - INFO - ControlNet v1.1.445
Loading weights [0724518c6b] from C:\Users\Server17\stable-diffusion-webui\models\Stable-diffusion\juggernautXL_v7Rundiffusion.safetensors
*** Error calling: C:\Users\Server17\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py/ui
    Traceback (most recent call last):
      File "C:\Users\Server17\stable-diffusion-webui\modules\scripts.py", line 528, in wrap_call
        return func(*args, **kwargs)
      File "C:\Users\Server17\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py", line 43, in ui
        from scripts.animatediff_mm import mm_animatediff as motion_module
    ModuleNotFoundError: No module named 'scripts.animatediff_mm'

---
*** Error calling: C:\Users\Server17\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py/ui
Creating model from config: C:\Users\Server17\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
    Traceback (most recent call last):
      File "C:\Users\Server17\stable-diffusion-webui\modules\scripts.py", line 528, in wrap_call
        return func(*args, **kwargs)
      File "C:\Users\Server17\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py", line 43, in ui
        from scripts.animatediff_mm import mm_animatediff as motion_module
    ModuleNotFoundError: No module named 'scripts.animatediff_mm'

---
2024-04-22 23:19:34,819 - ControlNet - INFO - ControlNet UI callback registered.
*Deforum ControlNet support: enabled*
2024-04-22 23:19:35,480 - ControlNetFastload - INFO - Load Controlnet Fastload Filter on isRemote=None and accessLevel=2
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 11.9s (prepare environment: 1.8s, import torch: 2.5s, import gradio: 0.5s, setup paths: 0.9s, initialize shared: 1.8s, other imports: 0.5s, load scripts: 2.6s, create ui: 1.0s, gradio launch: 0.4s).
Applying attention optimization: Doggettx... done.
Model loaded in 7.9s (load weights from disk: 0.2s, create model: 1.0s, apply weights to model: 5.3s, calculate empty prompt: 1.3s).
*** Error running before_process: C:\Users\Server17\stable-diffusion-webui\extensions\sd-webui-animatediff\scripts\animatediff.py
    Traceback (most recent call last):
      File "C:\Users\Server17\stable-diffusion-webui\modules\scripts.py", line 817, in before_process
        script.before_process(p, *script_args)
    TypeError: AnimateDiffScript.before_process() missing 1 required positional argument: 'params'

---
*** Error completing request
*** Arguments: ('task(i3dnr7t5d4r3ero)', <gradio.routes.Request object at 0x000001CC629B78E0>, 'tiny cute bunny, vibrant diffraction, highly detailed, intricate, ultra hd, sharp photo, crepuscular rays, in focus', 'nsfw, nude', [], 1, 1, 7, 512, 512, True, 0.35, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 25, 'Euler a', 'Automatic', False, '', 0.8, 977459588, False, -1, 0, 0, 0, False, False, {'ad_model': 'face_yolov8n.pt', 'ad_model_classes': '', 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_model_classes': '', 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), False, 'Load Only', None, '', 'Send to txt2img', 'Send to img2img', 'Run', None, [], None, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False, None, None, False, None, None, False, None, None, False, 50) {}
    Traceback (most recent call last):
      File "C:\Users\Server17\stable-diffusion-webui\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\Users\Server17\stable-diffusion-webui\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\Users\Server17\stable-diffusion-webui\modules\txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "C:\Users\Server17\stable-diffusion-webui\modules\processing.py", line 845, in process_images
        res = process_images_inner(p)
      File "C:\Users\Server17\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 47, in processing_process_images_hijack
        if ad_params and ad_params.enable:
    AttributeError: 'UiControlNetUnit' object has no attribute 'enable'

---
```


### Additional information

I updated stable diffusion automtic from v1.90 to v1.93