You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/en/using-diffusers/schedulers.mdx
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,6 +176,7 @@ image
176
176
<br>
177
177
</p>
178
178
179
+
If you are a JAX/Flax user, please check [this section](#changing-the-scheduler-in-flax) instead.
179
180
180
181
## Compare schedulers
181
182
@@ -260,3 +261,54 @@ image
260
261
261
262
As you can see most images look very similar and are arguably of very similar quality. It often really depends on the specific use case which scheduler to choose. A good approach is always to run multiple different
262
263
schedulers to compare results.
264
+
265
+
## Changing the Scheduler in Flax
266
+
267
+
If you are a JAX/Flax user, you can also change the default pipeline scheduler. This is a complete example of how to run inference using the Flax Stable Diffusion pipeline and the super-fast [DDPM-Solver++ scheduler](../api/schedulers/multistep_dpm_solver):
268
+
269
+
```Python
270
+
import jax
271
+
import numpy as np
272
+
from flax.jax_utils import replicate
273
+
from flax.training.common_utils import shard
274
+
275
+
from diffusers import FlaxStableDiffusionPipeline, FlaxDPMSolverMultistepScheduler
0 commit comments