mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-08 03:08:02 +00:00
fix: image gen
This commit is contained in:
parent
c159a1a120
commit
88a5b5ff4c
1 changed files with 5 additions and 2 deletions
|
|
@ -487,10 +487,13 @@ async def image_generations(
|
|||
# image model other than gpt-image-1, which is warned about on settings save
|
||||
|
||||
size = "512x512"
|
||||
if "x" in request.app.state.config.IMAGE_SIZE:
|
||||
if (
|
||||
request.app.state.config.IMAGE_SIZE
|
||||
and "x" in request.app.state.config.IMAGE_SIZE
|
||||
):
|
||||
size = request.app.state.config.IMAGE_SIZE
|
||||
|
||||
if "x" in form_data.size:
|
||||
if form_data.size and "x" in form_data.size:
|
||||
size = form_data.size
|
||||
|
||||
width, height = tuple(map(int, size.split("x")))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue