mix1009 / sdwebuiapi

Python API client for AUTOMATIC1111/stable-diffusion-webui
MIT License
1.35k stars 181 forks source link

control_mode of ControlNetUnit is array, rather than string #158

Closed Zhangyangrui916 closed 5 months ago

Zhangyangrui916 commented 5 months ago

Today I noticed that the inpainting result of api is different from webui. It turned out that when using controlnet, the type of control_mode is wrong (array rather than str)

first: the wireshark shows control_mode is an array wireshark

second: forcing it to be 'Balanced' rather than ['Balanced'] solved the problem. Now api is almost the same with webui. image

why ['Balanced'] would deteriate the influence of controlnet but do not throw error remains question

mix1009 commented 5 months ago

Could you test with the new version 0.9.10 There was a bug in 0.9.9 related to "Balanced" mode. Thank you.

Zhangyangrui916 commented 5 months ago

test OK。 I tried to fix it too, but never thought that a little comma will make it a tuple。 Good job