Spaces:
Runtime error
Runtime error
root
commited on
Commit
•
a32d6c4
1
Parent(s):
88a21ad
force sd to use cuda
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def generate_music(desc):
|
|
28 |
|
29 |
@spaces.GPU
|
30 |
def generate_pic(desc):
|
31 |
-
device = "cuda" if torch.cuda.is_available() else "cpu"
|
32 |
sd_pipe.to(device)
|
33 |
return sd_pipe(prompt=desc).images[0]
|
34 |
|
|
|
28 |
|
29 |
@spaces.GPU
|
30 |
def generate_pic(desc):
|
31 |
+
device = "cuda" #if torch.cuda.is_available() else "cpu"
|
32 |
sd_pipe.to(device)
|
33 |
return sd_pipe(prompt=desc).images[0]
|
34 |
|