I’m currently working with the OpenAI client SDK to edit an image. My goal is to edit only a specific part of the image. To achieve this, I’m providing a mask as required by OpenAI—in the form of an alpha channel mask.
However, despite following the instructions, the entire input image is being regenerated, rather than just inpainting the specified masked area.
Could anyone please guide me on this? I’d really appreciate any help or insights.
Thank you!
return openai.images.edit(
model=“gpt-image-1”,
prompt=prompt,
mask=mask,
image=images,
n=1,
)