sd-webui-controlnet icon indicating copy to clipboard operation
sd-webui-controlnet copied to clipboard

[Bug]: AttributeError: 'bool' object has no attribute 'enabled'

Open 519571754 opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

What happened?

Error running process: D:\code\stable_diffusion_new_up\extensions\sd-webui-controlnet\scripts\controlnet.py Traceback (most recent call last): File "D:\code\stable_diffusion_new_up\modules\scripts.py", line 418, in process script.process(p, *script_args) File "D:\code\stable_diffusion_new_up\extensions\sd-webui-controlnet\scripts\controlnet.py", line 984, in process self.enabled_units = self.get_enabled_units(p) File "D:\code\stable_diffusion_new_up\extensions\sd-webui-controlnet\scripts\controlnet.py", line 943, in get_enabled_units unit = self.parse_remote_call(p, unit, idx) File "D:\code\stable_diffusion_new_up\extensions\sd-webui-controlnet\scripts\controlnet.py", line 795, in parse_remote_call unit.enabled = selector(p, "control_net_enabled", unit.enabled, idx, strict=True) AttributeError: 'bool' object has no attribute 'enabled'

Steps to reproduce the problem

  1. start sd-webui
  2. apply controlnet1.1.173 version
  3. apply "generate" button in txt2img

What should have happened?

normal behavior should be controlnet be executed successfully

Commit where the problem happens

webui: controlnet:

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

no

Console logs

Error running process: D:\code\stable_diffusion_new_up\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
  File "D:\code\stable_diffusion_new_up\modules\scripts.py", line 418, in process
    script.process(p, *script_args)
  File "D:\code\stable_diffusion_new_up\extensions\sd-webui-controlnet\scripts\controlnet.py", line 984, in process
    self.enabled_units = self.get_enabled_units(p)
  File "D:\code\stable_diffusion_new_up\extensions\sd-webui-controlnet\scripts\controlnet.py", line 943, in get_enabled_units
    unit = self.parse_remote_call(p, unit, idx)
  File "D:\code\stable_diffusion_new_up\extensions\sd-webui-controlnet\scripts\controlnet.py", line 795, in parse_remote_call
    unit.enabled = selector(p, "control_net_enabled", unit.enabled, idx, strict=True)
AttributeError: 'bool' object has no attribute 'enabled'

Additional information

No response

519571754 avatar May 15 '23 08:05 519571754

same error here i tryed: -reinstall the extention -redownload models from various sources -delete venv and regenerate -commit a older branch

none of this solved

4lt3r3go avatar May 15 '23 14:05 4lt3r3go

same error here i tryed: -reinstall the extention -redownload models from various sources -delete venv and regenerate -commit a older branch

none of this solved

me too,now my controlnet is not working anymore

519571754 avatar May 16 '23 02:05 519571754

hi we cannot reproduce this problem. help wanted if anyone can provide steps to get the broken environment

lllyasviel avatar May 16 '23 04:05 lllyasviel

hi we cannot reproduce this problem. help wanted if anyone can provide steps to get the broken environment

Thank you for your reply,I just updated the [AUTOMATIC1111/stable diffsuion webui] version normally,also updated sd-controlnet to the latest version. I used the latest version of [AUTOMATIC1111/stable diffsuion webui].version=89f9faa633. sd-controlnet version=d831043cb8. I didn't do anything,Just launch it and use it. I found that other people can use the [AUTOMATIC1111/stable diffsuion webui] version normally, is last week's version, or even earlier, I don't know if it is because of this problem

519571754 avatar May 16 '23 05:05 519571754

Yeah, I also experienced this when using ControlNet version 1.1.170 and trying to use it via API. Here's an example of the payload:

payload = { "sampler_name": "DPM++ 2M Karras", "prompt": _prompt, "negative_prompt": _negatice, "enable_hr": True, "denoising_strength": 0.7, "hr_scale": 1, "hr_upscaler": "4x-UltraSharp", "restore_faces": True, "seed": -1, "batch_size": 1, "n_iter": 1, "steps": 20, "cfg_scale": 8, "width": 512, "height": 768, "alwayson_scripts": { "controlnet": { "args": [ { "input_image": base64_string, "module": "openpose_full", "model": "control_v11p_sd15_openpose [cab727d4]" } ] } } }

vianseto avatar May 16 '23 06:05 vianseto

I got this error right after installing the SegmentAnything extension. Disabled the extension and everything worked fine again.

MaroMariano avatar May 16 '23 10:05 MaroMariano

removing [sd-webui-segment-anything] solved someone also sayd that removing [SD-CN-Animation] may solve too

4lt3r3go avatar May 16 '23 15:05 4lt3r3go

Disabling SD-CN resolved the issue for me

zivky avatar May 16 '23 16:05 zivky

removing [sd-webui-segment-anything] solved someone also sayd that removing [SD-CN-Animation] may solve too

thanks,this works for me

519571754 avatar May 17 '23 02:05 519571754

I don't have SD-CN-Animation extension, but I still encounter the error.

vianseto avatar May 17 '23 07:05 vianseto

I removed [sd-webui-segment-anything] and I did not install [SD-CN-Animation], but the issue still persists. My web UI uses multi controlnet (3 of them), and the issue was resolved after I reduced the number to 1.

jolin102525 avatar May 19 '23 02:05 jolin102525

It seems the issue persists after all when I use img2img, but it works fine when I'm using txt2img

zivky avatar May 21 '23 12:05 zivky

check your controlnet count in ui setting and parameter count dismatch?

JERRYZFC avatar May 22 '23 06:05 JERRYZFC

setting "Multi ControlNet: Max models amount" back to 1 in Settings->ControlNet solved my problem

apoot9999 avatar May 26 '23 06:05 apoot9999

updating or reinstalling automatic1111 worked for me and no longer caused any problems

vianseto avatar May 27 '23 00:05 vianseto

I got this error right after installing the SegmentAnything extension. Disabled the extension and everything worked fine again.

Thankyou, that solved it for me.

BautistaBunge avatar Jun 09 '23 16:06 BautistaBunge