We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ddcb30 commit 869cf9eCopy full SHA for 869cf9e
1 file changed
backend/open_webui/routers/images.py
@@ -562,7 +562,11 @@ async def image_generations(
562
'model': model,
563
'prompt': form_data.prompt,
564
'n': form_data.n,
565
- 'size': (form_data.size if form_data.size else request.app.state.config.IMAGE_SIZE),
+ **(
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
+ ),
570
**(
571
{}
572
if re.match(
0 commit comments