inoculatemedia commited on
Commit
94d1d4a
·
verified ·
1 Parent(s): 898beb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -9,13 +9,10 @@ import torch
9
  device = "cuda" if torch.cuda.is_available() else "cpu"
10
  model_repo_id = "runwayml/stable-diffusion-v1-5" # Replace to the model you would like to use
11
 
12
- if torch.cuda.is_available():
13
- torch_dtype = torch.float16
14
- else:
15
- torch_dtype = torch.float32
16
 
17
 
18
- pipe = SemanticStableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
19
  pipe = pipe.to(device)
20
  out = pipe(
21
  prompt="a photo of the face of a woman",
 
9
  device = "cuda" if torch.cuda.is_available() else "cpu"
10
  model_repo_id = "runwayml/stable-diffusion-v1-5" # Replace to the model you would like to use
11
 
12
+ torch_dtype = torch.float32
 
 
 
13
 
14
 
15
+ pipe = SemanticStableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float32)
16
  pipe = pipe.to(device)
17
  out = pipe(
18
  prompt="a photo of the face of a woman",