Update app.py
Browse files
app.py
CHANGED
|
@@ -4,9 +4,9 @@ import torch
|
|
| 4 |
|
| 5 |
# Load the Stable Diffusion model
|
| 6 |
pipe = StableDiffusionPipeline.from_pretrained(
|
| 7 |
-
"runwayml/stable-diffusion-v1-5"
|
| 8 |
-
torch_dtype=torch.float16
|
| 9 |
)
|
|
|
|
| 10 |
pipe.to("cuda" if torch.cuda.is_available() else "cpu")
|
| 11 |
|
| 12 |
# Define the image generation function
|
|
|
|
| 4 |
|
| 5 |
# Load the Stable Diffusion model
|
| 6 |
pipe = StableDiffusionPipeline.from_pretrained(
|
| 7 |
+
"runwayml/stable-diffusion-v1-5"
|
|
|
|
| 8 |
)
|
| 9 |
+
|
| 10 |
pipe.to("cuda" if torch.cuda.is_available() else "cpu")
|
| 11 |
|
| 12 |
# Define the image generation function
|