I want to use two controlnets in the api. #1421
Replies: 2 comments 3 replies
-
Do you also get a successful (i.e. status 200) output payload response from the API? If so, I seem to be a having similar problem with the img2img API endpoint. I am not getting the same results with the API as I would with the webUI while using the same settings/parameters in both cases. From a few hours of testing, comparing results between the webui and the API (with the same settings/parameters), it seems to me that in my case, my image output seems to apply the img2img model/settings, but completely ignores and doesn't apply the ControlNet model/settings I specified in the payload (even though it confirms that it supposedly does so in the output payload in the "info" key/section of the output payload; the "info" section indicates "ControlNet 0", the canny model, and "ControlNet 1", the depth model, each with their correct respective settings indicated). Below you'll be able to find my input payload to the API, with the base64 string being replaced with an actual base64 string upon actually sending the input payload (to reiterate, I am able to get a response back from the API with this input payload, but it isn't the response I need or expected). I apologize if I'm missing anything or interpreting something incorrectly as I'd definitely consider myself a "noob" and my technical coding knowledge is pretty limited, but any help is greatly appreciated!!! I've been scavenging around for answers with no success yet { |
Beta Was this translation helpful? Give feedback.
-
You need to set You can use this extension to display the API payload after WebUI generation: Here is my ControlNet payload that enables 2 units of lineart.
|
Beta Was this translation helpful? Give feedback.
-
I want to use two controlnets in the api. I used the following method, but the generated picture has a strange effect. Is there something wrong with my wording? Or is it api bug?
A1111 payload
payload = {
"prompt": '',
"negative_prompt": "",
"batch_size": 1,
"steps": 20,
"cfg_scale": 7,
"alwayson_scripts": {
"controlnet": {
"args": [
{
"input_image": encoded_image,
"module": "canny",
"model": "control_v11p_sd15_canny [d14c016b]",
},
{
"input_image": encoded_image2,
"module": "t2ia_style_clipvision",
"model": "t2iadapter_style_sd14v1 [202e85cc]",
}
]
}
}
}
Beta Was this translation helpful? Give feedback.
All reactions