Update README.md

#56
by hopeai - opened
Files changed (1) hide show
  1. README.md +5 -0
README.md CHANGED
@@ -90,6 +90,11 @@ If you are limited by GPU memory and have less than 10GB of GPU RAM available, p
90
 
91
  ```py
92
  import torch
 
 
 
 
 
93
 
94
  pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16", use_auth_token=True)
95
  pipe = pipe.to(device)
 
90
 
91
  ```py
92
  import torch
93
+ from torch import autocast
94
+ from diffusers import StableDiffusionPipeline
95
+
96
+ model_id = "CompVis/stable-diffusion-v1-4"
97
+ device = "cuda"
98
 
99
  pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16", use_auth_token=True)
100
  pipe = pipe.to(device)