Fix scheduler inconsistency
Browse files
README.md
CHANGED
@@ -40,14 +40,14 @@ Using the [🤗's Diffusers library](https://github.com/huggingface/diffusers) t
|
|
40 |
```bash
|
41 |
pip install --upgrade git+https://github.com/huggingface/diffusers.git transformers accelerate scipy
|
42 |
```
|
43 |
-
Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to
|
44 |
|
45 |
```python
|
46 |
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
47 |
|
48 |
model_id = "stabilityai/stable-diffusion-2-1"
|
49 |
|
50 |
-
# Use the
|
51 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
52 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
53 |
pipe = pipe.to("cuda")
|
|
|
40 |
```bash
|
41 |
pip install --upgrade git+https://github.com/huggingface/diffusers.git transformers accelerate scipy
|
42 |
```
|
43 |
+
Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to DPMSolverMultistepScheduler):
|
44 |
|
45 |
```python
|
46 |
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
47 |
|
48 |
model_id = "stabilityai/stable-diffusion-2-1"
|
49 |
|
50 |
+
# Use the DPMSolverMultistepScheduler (DPM-Solver++) scheduler here instead
|
51 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
52 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
53 |
pipe = pipe.to("cuda")
|