hatmanstack commited on
Commit
1f31289
1 Parent(s): 1963e4b

Outpainting fix

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -209,13 +209,15 @@ def outpainting(image, mask_prompt=None, mask_image=None, text=None, negative_te
209
  # Prepare the outPaintingParams dictionary
210
  out_painting_params = {
211
  "image": input_image,
212
- "outPaintingMode": outpainting_mode,
213
- "maskPrompt": mask_prompt or "" # Ensure maskPrompt is always included
214
  }
215
 
216
  # Conditionally add parameters if they are not None
 
217
  if mask_image_encoded:
218
  out_painting_params["maskImage"] = mask_image_encoded
 
 
219
  if text:
220
  out_painting_params["text"] = text
221
  if negative_text:
 
209
  # Prepare the outPaintingParams dictionary
210
  out_painting_params = {
211
  "image": input_image,
212
+ "outPaintingMode": outpainting_mode
 
213
  }
214
 
215
  # Conditionally add parameters if they are not None
216
+
217
  if mask_image_encoded:
218
  out_painting_params["maskImage"] = mask_image_encoded
219
+ elif mask_prompt:
220
+ out_painting_params["maskPrompt"] = mask_prompt
221
  if text:
222
  out_painting_params["text"] = text
223
  if negative_text: