Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
from diffusers import KandinskyPriorPipeline, KandinskyPipeline
|
| 3 |
from diffusers.utils import load_image
|
| 4 |
import torch
|
|
@@ -12,7 +13,7 @@ pipe_prior.to("cuda")
|
|
| 12 |
pipe = KandinskyPipeline.from_pretrained("kandinsky-community/kandinsky-2-1", torch_dtype=torch.float16)
|
| 13 |
pipe.to("cuda")
|
| 14 |
|
| 15 |
-
|
| 16 |
def blend(img1, img2, slider):
|
| 17 |
# add all the conditions we want to interpolate, can be either text or image
|
| 18 |
images_texts = [img1, img2]
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import spaces
|
| 3 |
from diffusers import KandinskyPriorPipeline, KandinskyPipeline
|
| 4 |
from diffusers.utils import load_image
|
| 5 |
import torch
|
|
|
|
| 13 |
pipe = KandinskyPipeline.from_pretrained("kandinsky-community/kandinsky-2-1", torch_dtype=torch.float16)
|
| 14 |
pipe.to("cuda")
|
| 15 |
|
| 16 |
+
@spaces.GPU()
|
| 17 |
def blend(img1, img2, slider):
|
| 18 |
# add all the conditions we want to interpolate, can be either text or image
|
| 19 |
images_texts = [img1, img2]
|