arshad1234321 commited on
Commit
ae1e3e1
·
verified ·
1 Parent(s): 5b84497

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=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