fast-stable-diffusion
fast-stable-diffusion copied to clipboard
RunPod - Img2Img API fails when mask is sent in payload - Unexpected input. mask is not a valid input option.
Runpod Img2Img API fails when mask is sent in the payload. Observed this behavior just today. Worked without any issues before. Appreciate if anyone can guide me in the right direction. Thanks
`import requests url = "https://api.runpod.ai/v2/XXX/runsync" headers = { "Content-Type": "application/json", "Authorization": "Bearer XXXX", }
data = {
"input": {
"api": {
"method": "POST",
"endpoint": "/sdapi/v1/img2img"
},
"payload": {
"init_images": [inputiimage],
"mask":B64STRING,
"prompt": "rigid body dynamics",
"negative_prompt": "",
"seed": -1,
"denoising_strength": .75,
"steps": 40,
"cfg_scale": 7,
"width": 480,
"height": 853,
"sampler_name": "Euler a",
"inpaint_full_res" :False,
"inpaint_full_res_padding" :32,
"inpainting_mask_invert" :0,
"n_iter" :1,
}
}
}
s = requests.Session() res = s.post(url, headers=headers, json=data)`
{'delayTime': 738, 'error': 'Unexpected input. mask is not a valid input option.', 'executionTime': 1542, 'id': 'sync-xxx', 'status': 'FAILED'}
Check your mask b64 string