multimodalart HF Staff commited on
Commit
fda30a2
·
verified ·
1 Parent(s): 6a3ec9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -326,6 +326,9 @@ def infer_relight(
326
  if len(pil_images) == 0:
327
  raise gr.Error("Please upload an image first.")
328
 
 
 
 
329
  result = pipe(
330
  image=pil_images,
331
  prompt=final_prompt,
 
326
  if len(pil_images) == 0:
327
  raise gr.Error("Please upload an image first.")
328
 
329
+ if height != 0 and width != 0:
330
+ pil_images[0] = pil_images[0].resize((width, height), Image.LANCZOS)
331
+
332
  result = pipe(
333
  image=pil_images,
334
  prompt=final_prompt,