mix1009 / sdwebuiapi

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

How to generate mask image and use the mask image as the ControlNetUnit class parameter? #134

Open derekcbr opened 10 months ago

derekcbr commented 10 months ago

class ControlNetUnit: def init( self, input_image: Image = None, mask: Image = None, .... ) How to generate mask image and use the mask image as the ControlNetUnit class parameter? r = api.controlnet_detect(images=[img], module='canny') r.image Is using detect function right to generate the mask image?