Update app.py
Browse files
app.py
CHANGED
|
@@ -28,8 +28,8 @@ gpt2_model = GPT2LMHeadModel.from_pretrained("gpt2").to(device)
|
|
| 28 |
dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
| 29 |
pipe = StableDiffusionPipeline.from_pretrained(
|
| 30 |
"runwayml/stable-diffusion-v1-5",
|
| 31 |
-
torch_dtype=
|
| 32 |
-
)
|
| 33 |
pipe = pipe.to(device)
|
| 34 |
|
| 35 |
# Emotion detection for Text-to-Audio
|
|
|
|
| 28 |
dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
| 29 |
pipe = StableDiffusionPipeline.from_pretrained(
|
| 30 |
"runwayml/stable-diffusion-v1-5",
|
| 31 |
+
torch_dtype=torch.float32 # Required for CPU
|
| 32 |
+
).to("cpu")
|
| 33 |
pipe = pipe.to(device)
|
| 34 |
|
| 35 |
# Emotion detection for Text-to-Audio
|