I need to use the edit images, but when i upload the image, it doesn’t give me an error back, it returns the same image that i sended, i tried tha variations to check if the problem was the image, but it returns variations like it should, the problem seems to be with edit
response = client.images.edit(parameters: { prompt: "Add a cat next to the dog", image: "#{image_path}", mask: "#{image_mask_path}" , n: 1 , size: '512x512' })
of course, i’m using ruby on rails, the code where i make the call is this one
as i mentioned before when i try the same code with variations (not passing a promtp obviously, it work fine)
def make_api_call
image_path = Rails.root.join('app', 'assets', 'images', 'dog1.png')
image_mask_path = Rails.root.join('app', 'assets', 'images', 'mask.png')
client = OpenAI::Client.new(access_token: openai_api_key)
response = client.images.edit(parameters: {
prompt: "Add a cat next to the dog",
image: "#{image_path}",
mask: "#{image_mask_path}",
n: 1 ,
size: '512x512'
})
puts '<<<<<<'
puts '<<<<<<'
puts "response: #{response}"
end
i also encountered the the same issue the edit image api return the same image, other time it return image that is far from the prompt description. if you found the problem kindly share it with me. thanks
Ooops, that doesn’t look like I envisioned at all - perhaps DALL-E 2 edits can fix up my $0.08 image for $0.02?
Mask off an area, which will become a second image of only 100% transparent alpha channel where I draw, sending a 32 bit RGBA file for the mask specification…