Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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,
|