mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 19:38:46 -05:00
issue: for gpt-image-1 "auto" option for resulotion should be available #5354
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Hulkmaster on GitHub (May 27, 2025).
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
latest
Ollama Version (if applicable)
No response
Operating System
macos
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
I am available to set "auto" for resolution for gpt-image-1
Actual Behavior
i cannot
Steps to Reproduce
go to admin panel -> settings -> image -> try to put "auto" -> get error
try to generate image with gpt-image-1 with 512x512 -> get error that among options there is "auto"
Logs & Screenshots
nothing to share
Additional Information
No response
@tjbck commented on GitHub (May 27, 2025):
You can manually input.
@prilosac commented on GitHub (Jun 22, 2025):
@tjbck manual input doesn't help here - OpenWebUI refuses to save settings saying "auto" is not a valid option
@rgaricano commented on GitHub (Jun 22, 2025):
make a PR adding it:
replacing
b5f4c85bb1/backend/open_webui/routers/images.py (L306)with
and solve how to set this width/height;
b5f4c85bb1/backend/open_webui/routers/images.py (L474)setting both to auto too???
@prilosac commented on GitHub (Jun 22, 2025):
I will look into making said PR. Interesting that this option is described as available in the documentation despite being non-functional, I thought ImageGen in general was broken due to this issue.
What do you mean by "setting both to auto"? Should only one size be auto, e.g. "autox1024"? The documentation says to use simply "auto", so I was following instructions.
@prilosac commented on GitHub (Jun 22, 2025):
PR created https://github.com/open-webui/open-webui/pull/15220
@rgaricano commented on GitHub (Jun 22, 2025):
I saw it, just one question:
if the idea is when auto just set a default 512x512, why don't setup those defaults in IMAGE_SIZE var env config?
(that is used if is setted & not other is specified)
@prilosac commented on GitHub (Jun 23, 2025):
@rgaricano IMAGE_SIZE does default to 512x512 if there is no environment variable set.
The intention here is to pass "auto" literally to the API call, since the OpenAI endpoint for the 'gpt-image-1' model accepts that parameter directly, no specific size needed (see: https://platform.openai.com/docs/api-reference/images/create)
However, saving the settings doesn't validate that the image size the user set is valid for the chosen model (this is how it already works). Per my change, if the user tries to set "auto" with anything but "gpt-image-1" they will be warned, but the settings will still save. In this case, the 512x512 fallback will allow OpenWebUI to attempt to use that default if the model is set to something that doesn't support "auto".
I think it would also be reasonable to set
width, heighttoNone, Nonein this case, but I personally think reverting to the default is more aligned with the user intent of choosing "auto".