sd-webui-controlnet
sd-webui-controlnet copied to clipboard
[Bug]: mlsd module does not work using Automatic1111 and posting to /controlnet/detect API
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?
Using Automatic1111's API, I can't get the mid mask using controlnet/detect. I get an "info" "Success" with a black image. If I try using another module like canny or hed, everything works fine. If I use msd from the webui, it's fine too. Only using the API do I run into the problem. This was tested on Ubuntu 22.04
Steps to reproduce the problem
- Launch Automatic1111 webui.sh --api
- Navigate to: http://127.0.0.1:7860/docs
- Expand the /controlnet/detect accoridan and fill in the json object and make sure your controlnet_module is set to mlsd
- Click on Execute
- You'll find that it will succeed and the returned image will be solid black.
- Try it again with canny, you'll see that it will succeed and the mask will be correct for canny.
What should have happened?
I should have receved the mlsd mask as I do when I run webui.sh without the --api argument and use the UI.
Commit where the problem happens
webui: master/0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8 controlnet: main/e5ed9fccdc4fbbe5ec4aae134371683528f7bd60
What browsers do you use to access the UI ?
Google Chrome, Apple Safari
Command Line Arguments
. webui.sh --app
Console logs
There are not console logs but here is the response:
{
"images": [
"iVBORw0KGgoAAAANSUhEUgAAAsAAAAIACAAAAACprIWHAAABdElEQVR4nO3BMQEAAADCoPVP7W8GoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAN4JLAAGBmhxGAAAAAElFTkSuQmCC"
],
"info": "Success"
}
Additional information
No response
Try setting controlnet_threshold_a = 0 and controlnet_threshold_a = 0. I think that they are 64 by default which does result in a black image.
Try setting controlnet_threshold_a = 0 and controlnet_threshold_a = 0. I think that they are 64 by default which does result in a black image.
Thanks, that worked! Sorry for the trouble.
@kft334 I tried setting the thresh_a = 0 and thresh_b=0 once and both as 0.1 another time. But in both cases it was not following the mlsd detected lines