Spaces:
Runtime error
Runtime error
Commit
·
ad32b78
1
Parent(s):
f786e98
Update app.py
Browse files
app.py
CHANGED
|
@@ -91,6 +91,8 @@ def predict_images(dict, depth, prompt="", negative_prompt="", guidance_scale=7.
|
|
| 91 |
if negative_prompt == "":
|
| 92 |
negative_prompt = None
|
| 93 |
|
|
|
|
|
|
|
| 94 |
init_image = cv2.resize(dict["image"], (512, 512))
|
| 95 |
|
| 96 |
mask = Image.fromarray(cv2.resize(dict["mask"], (512, 512))[:,:,0])
|
|
@@ -116,7 +118,7 @@ def predict_images(dict, depth, prompt="", negative_prompt="", guidance_scale=7.
|
|
| 116 |
output_depth_vis = output_depth_vis.astype("uint8")
|
| 117 |
output_depth = Image.fromarray(output_depth_vis)
|
| 118 |
|
| 119 |
-
return output.rgb[0], output_depth, gr.update(visible=True)
|
| 120 |
|
| 121 |
|
| 122 |
css = '''
|
|
|
|
| 91 |
if negative_prompt == "":
|
| 92 |
negative_prompt = None
|
| 93 |
|
| 94 |
+
og_size = dict["image"].shape[:2]
|
| 95 |
+
|
| 96 |
init_image = cv2.resize(dict["image"], (512, 512))
|
| 97 |
|
| 98 |
mask = Image.fromarray(cv2.resize(dict["mask"], (512, 512))[:,:,0])
|
|
|
|
| 118 |
output_depth_vis = output_depth_vis.astype("uint8")
|
| 119 |
output_depth = Image.fromarray(output_depth_vis)
|
| 120 |
|
| 121 |
+
return output.rgb[0].resize(og_size), output_depth.resize(og_size), gr.update(visible=True)
|
| 122 |
|
| 123 |
|
| 124 |
css = '''
|