Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -688,7 +688,7 @@ def generate_map(location_names):
|
|
688 |
map_html = m._repr_html_()
|
689 |
return map_html
|
690 |
|
691 |
-
|
692 |
pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2", torch_dtype=torch.float16)
|
693 |
pipe.to(device)
|
694 |
|
|
|
688 |
map_html = m._repr_html_()
|
689 |
return map_html
|
690 |
|
691 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
692 |
pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2", torch_dtype=torch.float16)
|
693 |
pipe.to(device)
|
694 |
|