Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ControlNet web api no longer working after latest update #2982

Open
1 task done
marcsyp opened this issue Jul 6, 2024 · 6 comments
Open
1 task done

[Bug]: ControlNet web api no longer working after latest update #2982

marcsyp opened this issue Jul 6, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@marcsyp
Copy link

marcsyp commented Jul 6, 2024

Is there an existing issue for this?

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

What happened?

I recently updated my server-based webui + ControlNet from 1.9.3 to 1.9.4 and 1.1.443 to 1.1.449, respectively. Now ControlNet is completely broken. Using my original request schema:

"alwayson_scripts": {
"controlnet": {
"args": [
{
"module": "pidinet_scribble",
"model": "control_v11p_sd15_scribble [d4ba51ff]",
"weight": 0.4,
"resize_mode": 2,
"lowvram": false,
"processor_res": 400.0,
"guidance_start": 0,
"guidance_end": 0.4,
"control_mode": 0,
"pixel_perfect": false,
"threshold_a": 0.0,
"threshold_b": 0.5,
"input_image": "iVBORw0KGgoAAAANSUhEUgAAAwAAAAIACAYAAAA19gs6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwA
...
owAAAABJRU5ErkJggg=="
},

After the update, I get a 500 Internal Server Error with validation errors for both control_mode and resize_mode, as if they no longer accept int and require the string argument. After changing both control_mode and resize_mode arguments to the appropriate strings, ControlNet doesn't throw a validation error, but controlnet has zero effect and returns no preprocessor results. I also tried adding a PNG header to the input_image string (which has never been required before), but no effect.

Any ideas?

Steps to reproduce the problem

Upgrade as above. Send an API request with the documented API.

What should have happened?

ControlNet should work

Commit where the problem happens

webui: 1.9.4
controlnet: 1.1.449

What browsers do you use to access the UI ?

No response

Command Line Arguments

lots

List of enabled extensions

lots, I did add InpaintAnything since that last update. Would that have an effect? I'm not using it in the API, my api calls have not changed since the update.

Console logs

Can't access the logs at the moment, they're behind my corporate firewall and I'm on PTO.

Additional information

No response

@huchenlei
Copy link
Collaborator

huchenlei commented Jul 6, 2024

Make sure you pass enabled: True in each ControlNet unit payload

@huchenlei
Copy link
Collaborator

The breaking change is documented in #2847

@marcsyp
Copy link
Author

marcsyp commented Jul 6, 2024

Oh wow -- ok, thank you, that really helped. I got everything through intuition and scraping around, but I never would have gotten the "enabled" change. Note that the API wiki is out of date, I would recommend updating that when big breaking changes like this are made. Hard to discover/plan for breaking changes in an issues comment.

Thank you for your quick response!! I had to have this working again by Monday so I can sleep better this weekend.

Cheers.

@marcsyp
Copy link
Author

marcsyp commented Jul 6, 2024

Note to others that the "input_image" param has changed to "image" in the CN Unit

@huchenlei
Copy link
Collaborator

Note to others that the "input_image" param has changed to "image" in the CN Unit

Yes. I kept input_image alias.

Wiki page is updated to reflect the change made in 1.1.448: https://github.com/Mikubill/sd-webui-controlnet/wiki/API

@huchenlei
Copy link
Collaborator

TODO: Make API units enabled by default

@huchenlei huchenlei self-assigned this Jul 9, 2024
@huchenlei huchenlei added the bug Something isn't working label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants