Hello community. I am facing some problems with my application for dall-e2 and maybe someone here can brief me a bit, i would appreciate it. I have built an awesome outpainting feature inside my app but it seems like i can't avoid the cors errors that come with the API response. More exactly, the URLs that come from the response taint the canvas unless i save the images on my server. I could actually do that, but it takes a big amount of time in order to save all the photos. The function gets locked for like one minute in total. The response from OpenAI edits take like 30s to finish then another 30s i spend saving the files and I don't think its normal. Maybe there is some way to avoid the cors problem with OpenAI that i dont know of?
I would love to be able to use the openAI images directly into the canvases even tho i save the photos in the background. I hate that i have to lock the funciton for so much time to avoid tainting the canvas 😦
Thanks for your time!
#OpenAI CORS and tainted canvas (*)
9 messages · Page 1 of 1 (latest)
You could probably get the non-url version, the base64 one, then draw that to the canvas. b64_json
Perhaps something like this? https://github.com/ecraft2learn/ai/blob/master/ecraft2learn.js?student&student#L818-L837
I actually tried with the base64 and b64_json and the problems seems to persist. I am looking now at your repo and see whats up 😄 thanks for the reply
That's not my repo, just something I found :) Good luck!
sadly it doesn't help 😦 I am open to any suggestion. I also have a form file in my front-end and if i upload images from there and send to openAI, it works fine even tho the uploaded images don't really saves on the server but rather use the browser cache. Maybe I can do something similar
@fringe ingot Have you found a solution? I got it to work with putting https://cors-anywhere.herokuapp.com/ before the url but I dont think this will work if I host the site
It won't and it's complicated. I still didn't manage to fix it, i save the images on the server for now.
I heard about some libraries for photo manipulation with which you could probably process the image data and that may fix the problem. After i try it I will get back to you, atm im stuck with some python chaos 😄
@iron summit I'm sure there should be a way
Thanks