issue: for gpt-image-1 "auto" option for resulotion should be available #5354

Closed
opened 2025-11-11 16:18:23 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @Hulkmaster on GitHub (May 27, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

latest

Ollama Version (if applicable)

No response

Operating System

macos

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

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

Originally created by @Hulkmaster on GitHub (May 27, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version latest ### Ollama Version (if applicable) _No response_ ### Operating System macos ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### 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_
GiteaMirror added the bug label 2025-11-11 16:18:23 -06:00
Author
Owner

@tjbck commented on GitHub (May 27, 2025):

You can manually input.

@tjbck commented on GitHub (May 27, 2025): You can manually input.
Author
Owner

@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

@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
Author
Owner

@rgaricano commented on GitHub (Jun 22, 2025):

make a PR adding it:

replacing
b5f4c85bb1/backend/open_webui/routers/images.py (L306)
with

if form_data.IMAGE_SIZE == "auto" or re.match(pattern, form_data.IMAGE_SIZE):
    request.app.state.config.IMAGE_SIZE = form_data.IMAGE_SIZE

and solve how to set this width/height;
b5f4c85bb1/backend/open_webui/routers/images.py (L474)
setting both to auto too???

@rgaricano commented on GitHub (Jun 22, 2025): make a PR adding it: replacing https://github.com/open-webui/open-webui/blob/b5f4c85bb196c16a775802907aedd87366f58b0f/backend/open_webui/routers/images.py#L306 with ``` if form_data.IMAGE_SIZE == "auto" or re.match(pattern, form_data.IMAGE_SIZE): request.app.state.config.IMAGE_SIZE = form_data.IMAGE_SIZE ``` and solve how to set this width/height; https://github.com/open-webui/open-webui/blob/b5f4c85bb196c16a775802907aedd87366f58b0f/backend/open_webui/routers/images.py#L474 setting both to auto too???
Author
Owner

@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): 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.
Author
Owner

@prilosac commented on GitHub (Jun 22, 2025):

PR created https://github.com/open-webui/open-webui/pull/15220

@prilosac commented on GitHub (Jun 22, 2025): PR created https://github.com/open-webui/open-webui/pull/15220
Author
Owner

@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)

@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)
Author
Owner

@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, height to None, None in this case, but I personally think reverting to the default is more aligned with the user intent of choosing "auto".

@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, height` to `None, None` in this case, but I personally think reverting to the default is more aligned with the user intent of choosing "auto".
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5354