Spaces:
Running
Running
fix GPU decorator, add missing arg
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ from game_of_life import GameOfLife
|
|
10 |
from utils import resize_image, generate_image_from_grid
|
11 |
|
12 |
|
13 |
-
@spaces.
|
14 |
def init_controlnet(device: str) -> QRControlNet:
|
15 |
return QRControlNet(device=device)
|
16 |
|
@@ -112,10 +112,10 @@ def generate(
|
|
112 |
|
113 |
|
114 |
device = "cuda"
|
115 |
-
#
|
116 |
-
#
|
117 |
print(f"Using {device=}")
|
118 |
-
controlnet = init_controlnet()
|
119 |
|
120 |
|
121 |
source_image = gr.Image(label="Source Image", type="pil", value="sky-gol-image.jpeg")
|
|
|
10 |
from utils import resize_image, generate_image_from_grid
|
11 |
|
12 |
|
13 |
+
@spaces.GPU
|
14 |
def init_controlnet(device: str) -> QRControlNet:
|
15 |
return QRControlNet(device=device)
|
16 |
|
|
|
112 |
|
113 |
|
114 |
device = "cuda"
|
115 |
+
# device = "mps"
|
116 |
+
# device = "cpu"
|
117 |
print(f"Using {device=}")
|
118 |
+
controlnet = init_controlnet(device=device)
|
119 |
|
120 |
|
121 |
source_image = gr.Image(label="Source Image", type="pil", value="sky-gol-image.jpeg")
|