openai / openai-cookbook

Examples and guides for using the OpenAI API
https://cookbook.openai.com
MIT License
57.51k stars 9.08k forks source link

DALL-E-2 Edit demo does not work #951

Open nickums opened 6 months ago

nickums commented 6 months ago

I am trying the demonstration code (as below) for DALL-E-2 Edit
as given in https://platform.openai.com/docs/guides/images/usage?context=node

I am on python3.8 windows10. The input image and mask files are as provided, but the output file does not contain any edit.

from openai import OpenAI client = OpenAI()

response = client.images.edit(( model="dall-e-2", image=open("sunlit_lounge.png", "rb"), mask=open("mask.png", "rb"), prompt="A sunlit indoor lounge area with a pool containing a flamingo", n=1, size="1024x1024" )

ARajgor commented 6 months ago

can show the output image you got? mask image should have mask (means alpha channel should be zero) and saved as png.

nickums commented 6 months ago

there is no error as such, the unmodified image is returned.

On Sun, 24 Dec 2023 at 12:12, ayush rajgor @.***> wrote:

can show the error you got?

— Reply to this email directly, view it on GitHub https://github.com/openai/openai-cookbook/issues/951#issuecomment-1868502465, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADYVMFJF4WZYZGUM7U4UTK3YLAL4VAVCNFSM6AAAAABBACKBOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGUYDENBWGU . You are receiving this because you authored the thread.Message ID: @.***>

-- Nick "Mac" McElwaine

horw commented 6 months ago

Hello, actually there is also an issue with extra ( in function usage. client.images.edit(( https://github.com/openai/openai-openapi/issues/154#issue-2068663624

nickums commented 6 months ago

Ok, thanks for the clarification. actually the second ( is not in my code.

On Sat, 6 Jan 2024 at 14:41, Igor Udot @.***> wrote:

Hello, actually there is also an issue with extra ( in function usage. client.images.edit(( openai/openai-openapi#154 (comment) https://github.com/openai/openai-openapi/issues/154#issue-2068663624

— Reply to this email directly, view it on GitHub https://github.com/openai/openai-cookbook/issues/951#issuecomment-1879716359, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADYVMFJDQJKUQ7N6TTRETITYNFPBFAVCNFSM6AAAAABBACKBOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZZG4YTMMZVHE . You are receiving this because you authored the thread.Message ID: @.***>

-- Nick "Mac" McElwaine

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

nickums commented 4 months ago

I still do not have a resolution for this.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

nickums commented 1 month ago

sdshmkh ha mentioned the issue which is still outstanding