Spaces:
Running
Running
add duration
Browse files
app.py
CHANGED
@@ -10,7 +10,9 @@ from game_of_life import GameOfLife
|
|
10 |
from utils import resize_image, generate_image_from_grid
|
11 |
|
12 |
|
13 |
-
device = "cuda"
|
|
|
|
|
14 |
print(f"Using {device=}")
|
15 |
controlnet = QRControlNet(device=device)
|
16 |
|
@@ -64,7 +66,7 @@ def make_gif(images: list[Image.Image], gif_path):
|
|
64 |
return gif_path
|
65 |
|
66 |
|
67 |
-
@spaces.GPU
|
68 |
def generate(
|
69 |
source_image,
|
70 |
prompt,
|
|
|
10 |
from utils import resize_image, generate_image_from_grid
|
11 |
|
12 |
|
13 |
+
device = "cuda"
|
14 |
+
# device = "mps"
|
15 |
+
# device = "cpu"
|
16 |
print(f"Using {device=}")
|
17 |
controlnet = QRControlNet(device=device)
|
18 |
|
|
|
66 |
return gif_path
|
67 |
|
68 |
|
69 |
+
@spaces.GPU(duration=120)
|
70 |
def generate(
|
71 |
source_image,
|
72 |
prompt,
|