TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.51k stars 1.31k forks source link

RunPod - Img2Img API fails when mask is sent in payload - Unexpected input. mask is not a valid input option. #2680

Open janghaludu opened 10 months ago

janghaludu commented 10 months ago

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'}

TheLastBen commented 9 months ago

Check your mask b64 string