ShiftHackZ / Stable-Diffusion-Android

Stable Diffusion AI client app for Android
https://sdai.moroz.cc
GNU Affero General Public License v3.0
678 stars 67 forks source link

Http 400 error with Open AI Dall-e-2 and Dall-e-3 #322

Open derei opened 1 week ago

derei commented 1 week ago

Title is self-explanatory. Could you please check if Open AI is implemented correctly? Here is a discussion regarding a similar experience, perhaps it could provide some hints: https://community.openai.com/t/getting-400-error-trying-to-generate-image-with-dalle-3/508710/4

ShiftHackZ commented 1 week ago

Http 400 means that OpenAI server was not happy with the payload from SDAI app. Could you please attach the txt2img form that you used in SDAI app that produces error?

derei commented 1 week ago

@ShiftHackZ there was nothing special about it: I selected one of the AI Dall-E models, provided a simple prompt, j(ust something to test if it works, i can't even remember what), and left the other settings as they are: 1024x1024, Batch:1

(and no, I didn't forget to add the api key 😜. Just sayin')

ShiftHackZ commented 1 week ago

Checked with dalle-2, dalle-3 models on my API key, have no issue. Here is a process of my testing: https://www.youtube.com/watch?v=pHUGTJQ8Kjc

But in your case server still may return 400, so if you are on 0.6.3 or newer version, please unlock the developer mode in SDAI app using this instuction: https://github.com/ShiftHackZ/Stable-Diffusion-Android/wiki/Developer-mode#how-to-enter-developer-mode

Then navigate to Settings -> Developer mode -> View logs, try to look for the failure HTTP 400 logs (if unable to find, try to reproduce the 400 and view the logs again). If you will manage to find error message, please post it here, but make sure you not leaking your open ai api key. Thanks.