This commit is contained in:
Timothy Jaeryang Baek
2026-02-16 14:13:49 -06:00
parent f1053d94c7
commit 9be45f49e4
2 changed files with 6 additions and 2 deletions
+2
View File
@@ -849,6 +849,7 @@ class EditImageForm(BaseModel):
size: Optional[str] = None size: Optional[str] = None
n: Optional[int] = None n: Optional[int] = None
negative_prompt: Optional[str] = None negative_prompt: Optional[str] = None
background: Optional[str] = None
@router.post("/edit") @router.post("/edit")
@@ -953,6 +954,7 @@ async def image_edits(
"prompt": form_data.prompt, "prompt": form_data.prompt,
**({"n": form_data.n} if form_data.n else {}), **({"n": form_data.n} if form_data.n else {}),
**({"size": size} if size else {}), **({"size": size} if size else {}),
**({"background": form_data.background} if form_data.background else {}),
**( **(
{} {}
if re.match( if re.match(
+4 -2
View File
@@ -241,7 +241,8 @@ export const imageEdits = async (
prompt: string, prompt: string,
model?: string, model?: string,
size?: string, size?: string,
n?: number n?: number,
background?: string
) => { ) => {
let error = null; let error = null;
@@ -258,7 +259,8 @@ export const imageEdits = async (
prompt, prompt,
...(model && { model }), ...(model && { model }),
...(size && { size }), ...(size && { size }),
...(n && { n }) ...(n && { n }),
...(background && { background })
} }
}) })
}) })