Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inpainting example for the masked image doesn't work #28

Open
KyriaAnnwyn opened this issue Oct 6, 2022 · 2 comments
Open

Inpainting example for the masked image doesn't work #28

KyriaAnnwyn opened this issue Oct 6, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@KyriaAnnwyn
Copy link

Try to test inpainting as in description. I get the error:
...
}} is not valid under any of the given schemas",
"type": "invalid_request_error",
"param": null,
"code": null
}
}

The case with only text prompt works ok.

@ezzcodeezzlife
Copy link
Owner

can you provide more information for this please? @KyriaAnnwyn

@ezzcodeezzlife ezzcodeezzlife added the bug Something isn't working label Oct 11, 2022
@KyriaAnnwyn
Copy link
Author

KyriaAnnwyn commented Oct 12, 2022

I'm trying to run the example from the repo:

# make the right half of a saved image transparent
from PIL import Image, ImageDraw

image = Image.open('my_image.png')
m, n = image.size

area_to_keep = (0, 0, m//2, n)
image_alpha = Image.new("L", image.size, 0)
draw = ImageDraw.Draw(image_alpha)
draw.rectangle(area_to_keep, fill=255)

image_rgba = image.copy()
image_rgba.putalpha(image_alpha)
image_rgba = image_rgba.resize((1024, 1024)) # image must be square and 1024x1024
image_rgba.save('image_with_transparent_right_half.png')

# ask DALL·E to fill-in the transparent right half
generations = dalle.generate_from_masked_image(
    "portal to another dimension, digital art",
    "image_with_transparent_right_half.png",
)

and it fails with the error invalid_request error

The session is ok as the example with text prompt works well.

If you need more information, please specify what kind of information, i'll add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants