Spaces:
Runtime error
Runtime error
Check if cuda is available
Browse files
app.py
CHANGED
@@ -7,7 +7,10 @@ pipe = StableDiffusionPipeline.from_pretrained(
|
|
7 |
safety_checker=None,
|
8 |
torch_dtype=torch.float16,
|
9 |
use_safetensors=True,
|
10 |
-
)
|
|
|
|
|
|
|
11 |
|
12 |
|
13 |
def generate_image(text):
|
|
|
7 |
safety_checker=None,
|
8 |
torch_dtype=torch.float16,
|
9 |
use_safetensors=True,
|
10 |
+
)
|
11 |
+
|
12 |
+
if torch.cuda.is_available():
|
13 |
+
pipe.to("cuda")
|
14 |
|
15 |
|
16 |
def generate_image(text):
|