Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ pipe = KandinskyPipeline.from_pretrained("kandinsky-community/kandinsky-2-1", to
|
|
| 18 |
pipe.to("cuda")
|
| 19 |
|
| 20 |
|
| 21 |
-
|
| 22 |
def squarify_image(img):
|
| 23 |
if(img.height > img.width): bg_size = img.height
|
| 24 |
else: bg_size = img.width
|
|
@@ -27,7 +27,7 @@ def squarify_image(img):
|
|
| 27 |
|
| 28 |
return bg
|
| 29 |
|
| 30 |
-
|
| 31 |
def blend(img1, img2, slider, prompt, negative_prompt):
|
| 32 |
img1.thumbnail((1024, 1024))
|
| 33 |
img2.thumbnail((1024, 1024))
|
|
|
|
| 18 |
pipe.to("cuda")
|
| 19 |
|
| 20 |
|
| 21 |
+
@spaces.GPU()
|
| 22 |
def squarify_image(img):
|
| 23 |
if(img.height > img.width): bg_size = img.height
|
| 24 |
else: bg_size = img.width
|
|
|
|
| 27 |
|
| 28 |
return bg
|
| 29 |
|
| 30 |
+
@spaces.GPU()
|
| 31 |
def blend(img1, img2, slider, prompt, negative_prompt):
|
| 32 |
img1.thumbnail((1024, 1024))
|
| 33 |
img2.thumbnail((1024, 1024))
|