Closed benjiebob closed 1 year ago
Thanks you for your first issue in dalle2-in-python
Yes. Still facing the same issue. Request to take a look at the inpainting / masked images demo. Thanks!
I am also experiencing this issue. I get the same error above when I upload a webp (with quite a long wait time).
If I upload the file as a PNG, I get the following error (with a normal/shorter wait time).
{'type': 'error', 'message': 'Your task failed. Sorry about that! Please try again.', 'code': 'task_failed'}
Looking at the actual API requests on the web UI, I believe that the uploaded image should be a PNG. The header in the image and masked_image fields look like a PNG to me, i.e. iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAYAAAB/...
.
However, even as a PNG I still get the error. Also, I note that now the default value of inpainting_batch_size
is 4 on the web UI, however changing this on the Python side still doesn't fix the error.
Printing out the response, I can see that my images are successfully uploaded to the https://openailabsprodscus.blob.core.windows.net
server (and are stored as webp). My conclusion is that PNG is the right format to use here, but there's something else going on.
Okay, I think I've figured out the issue. The API expects square 1024x1024 images in the PNG format. I have put in a PR that clarifies this in the README
solved in #27 thanks everyone for the inputs
Describe the bug Running example inpainting code results in the following error:
To Reproduce Steps to reproduce the behavior:
dalle = Dalle2(token)
image = Image.open('my_image.png')
with the path to the image file.png
with.webp
extension ingenerate_from_masked_image
call. This seems a bug.Expected behavior DALLE-2 should accept the uploaded image and inpaint according to the text description.
Other notes