You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running api_txt2img.py as is returns this:
Traceback (most recent call last):
File "D:\Documents\AI\ImgGen\a1111_1.9.3\stable-diffusion-webui\extensions\sd-webui-controlnet\example\txt2img_example\api_txt2img.py", line 74, in<module>
result = output['images'][0]
KeyError: 'images'
Modifying it to print(output) instead returns this:
{'error': 'ValidationError', 'detail': '', 'body': '', 'errors': "2 validation errors for ControlNetUnit\nresize_mode\n (type=assertion_error)\ncontrol_mode\n value is not a valid enumeration member; permitted: 'Balanced', 'My prompt is more important', 'ControlNet is more important' (type=type_error.enum; enum_values=[<ControlMode.BALANCED: 'Balanced'>, <ControlMode.PROMPT: 'My prompt is more important'>, <ControlMode.CONTROL: 'ControlNet is more important'>])"}
### Additional information
_No response_
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
What happened?
Pull request #2847 broke backwards compatibility with
"control_mode": 0,
, which is used in the examples.It also broke the documentation at https://github.com/Mikubill/sd-webui-controlnet/wiki/API#controlnetunitrequest-json-object for what values are expected.
Steps to reproduce the problem
Try to run the example api code that's provided in this repo.
What should have happened?
The code should work, not return an error.
Commit where the problem happens
webui: 1c0a0c4
controlnet: 59c4349
What browsers do you use to access the UI ?
No response
Command Line Arguments
List of enabled extensions
Console logs
Modifying it to
print(output)
instead returns this:The text was updated successfully, but these errors were encountered: