Skip to content

Commit 869cf9e

Browse files
committed
refac
1 parent 2ddcb30 commit 869cf9e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

backend/open_webui/routers/images.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,11 @@ async def image_generations(
562562
'model': model,
563563
'prompt': form_data.prompt,
564564
'n': form_data.n,
565-
'size': (form_data.size if form_data.size else request.app.state.config.IMAGE_SIZE),
565+
**(
566+
{'size': form_data.size or request.app.state.config.IMAGE_SIZE}
567+
if (form_data.size or request.app.state.config.IMAGE_SIZE)
568+
else {}
569+
),
566570
**(
567571
{}
568572
if re.match(

0 commit comments

Comments
 (0)