mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
fix: image gen
This commit is contained in:
@@ -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")))
|
||||
|
||||
Reference in New Issue
Block a user