Open derekcbr opened 10 months ago
You need to do like this. The input file must be a PIL object:
from PIL import Image
image0 = Image.open("C:\city.pang")
unit1 = webuiapi.ControlNetUnit(input_image=image0, module='canny', model='control_canny-fp16 [e3fe7712]')
image0 = Image.open("C:\city.pang") unit1 = webuiapi.ControlNetUnit(input_image=image0, module='canny', model='control_canny-fp16 [e3fe7712]') But it shows an error TypeError: Object of type PngImageFile is not JSON serializable How to get the right input image format?