Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,8 @@ pipeline = pipeline.to("cuda")
|
|
13 |
|
14 |
def predict(mask_img):
|
15 |
prompt = "a green frog, highly detailed, natural lighting"
|
|
|
|
|
16 |
image = pipeline(prompt=prompt,
|
17 |
num_inference_steps=35,
|
18 |
image=mask_img["image"].convert("RGB"),
|
@@ -20,7 +22,7 @@ def predict(mask_img):
|
|
20 |
guidance_scale=9
|
21 |
).images[0]
|
22 |
|
23 |
-
return image
|
24 |
|
25 |
demo = gr.Interface(
|
26 |
fn=predict,
|
|
|
13 |
|
14 |
def predict(mask_img):
|
15 |
prompt = "a green frog, highly detailed, natural lighting"
|
16 |
+
# get size of the input image
|
17 |
+
size = mask_img["image"].size
|
18 |
image = pipeline(prompt=prompt,
|
19 |
num_inference_steps=35,
|
20 |
image=mask_img["image"].convert("RGB"),
|
|
|
22 |
guidance_scale=9
|
23 |
).images[0]
|
24 |
|
25 |
+
return image.resize(size)
|
26 |
|
27 |
demo = gr.Interface(
|
28 |
fn=predict,
|