kiri-art / docker-diffusers-api

Diffusers / Stable Diffusion in docker with a REST API, supporting various models, pipelines & schedulers.
https://kiri.art/
MIT License
202 stars 94 forks source link

inpaint error #27

Open xuechengjinxiu opened 1 year ago

xuechengjinxiu commented 1 year ago

I try to run this project locally with Docker, but every time I use the inpaint function, the model input parameters from frontend to the backend are wrong in the dev branch. I want to know how your backend inpaint model is used. At the same time, in main branch I met mask_image and image in tensor.cat error, and image input channels Inconsistent error

gadicc commented 1 year ago

Hey, @xuechengjinxiu... Welcome and thanks for the issue! I have some big changes coming and definitely intend to improve the docs with better examples. In the meantime, try with one of these inputs (they differ slightly based on the model being used):

https://github.com/kiri-art/docker-diffusers-api/blob/5c7c2f6a57c15651d2901d4f62b04bf70fd53e01/test.py#L246-L276

(you can also run these tests automatically like e.g. python test.py inpaint-sd which will use those default values above)

I know also that diffusers library made some changes about how image vs init_image is handled... (it's meant to still work and give a deprecation warning, but I think it was broken for a while and I'm sure which version we're using in dev branch), so I hope this all works. In our next release, we'll have automated testing for a lot of this stuff, it's what I'm busy working on now :sweat_smile: