Commit
·
1bf31e0
1
Parent(s):
55fe5cd
Update README.md
Browse files
README.md
CHANGED
|
@@ -44,7 +44,7 @@ from torch import autocast
|
|
| 44 |
from diffusers import StableDiffusionPipeline
|
| 45 |
|
| 46 |
model_id = "CompVis/stable-diffusion-v1-2-diffusers"
|
| 47 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=True)
|
| 48 |
|
| 49 |
prompt = "a photograph of an astronaut riding a horse"
|
| 50 |
with autocast("cuda"):
|
|
@@ -61,7 +61,7 @@ from diffusers import StableDiffusionPipeline, LMSDiscreteScheduler
|
|
| 61 |
model_id = "CompVis/stable-diffusion-v1-2-diffusers"
|
| 62 |
# Use the K-LMS scheduler here instead
|
| 63 |
scheduler = LMSDiscreteScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear", num_train_timesteps=1000)
|
| 64 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, use_auth_token=True)
|
| 65 |
```
|
| 66 |
|
| 67 |
|
|
|
|
| 44 |
from diffusers import StableDiffusionPipeline
|
| 45 |
|
| 46 |
model_id = "CompVis/stable-diffusion-v1-2-diffusers"
|
| 47 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=True).to("cuda")
|
| 48 |
|
| 49 |
prompt = "a photograph of an astronaut riding a horse"
|
| 50 |
with autocast("cuda"):
|
|
|
|
| 61 |
model_id = "CompVis/stable-diffusion-v1-2-diffusers"
|
| 62 |
# Use the K-LMS scheduler here instead
|
| 63 |
scheduler = LMSDiscreteScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear", num_train_timesteps=1000)
|
| 64 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, use_auth_token=True).to("cuda")
|
| 65 |
```
|
| 66 |
|
| 67 |
|