Unverified Commit 79c0e24a authored by Cesar Aybar's avatar Cesar Aybar Committed by GitHub
Browse files

Update write_own_pipeline.mdx (#3323)

parent fa9e35fc
...@@ -82,8 +82,8 @@ To recreate the pipeline with the model and scheduler separately, let's write ou ...@@ -82,8 +82,8 @@ To recreate the pipeline with the model and scheduler separately, let's write ou
>>> for t in scheduler.timesteps: >>> for t in scheduler.timesteps:
... with torch.no_grad(): ... with torch.no_grad():
... noisy_residual = model(input, t).sample ... noisy_residual = model(input, t).sample
>>> previous_noisy_sample = scheduler.step(noisy_residual, t, input).prev_sample ... previous_noisy_sample = scheduler.step(noisy_residual, t, input).prev_sample
>>> input = previous_noisy_sample ... input = previous_noisy_sample
``` ```
This is the entire denoising process, and you can use this same pattern to write any diffusion system. This is the entire denoising process, and you can use this same pattern to write any diffusion system.
...@@ -287,4 +287,4 @@ This is really what 🧨 Diffusers is designed for: to make it intuitive and eas ...@@ -287,4 +287,4 @@ This is really what 🧨 Diffusers is designed for: to make it intuitive and eas
For your next steps, feel free to: For your next steps, feel free to:
* Learn how to [build and contribute a pipeline](using-diffusers/#contribute_pipeline) to 🧨 Diffusers. We can't wait and see what you'll come up with! * Learn how to [build and contribute a pipeline](using-diffusers/#contribute_pipeline) to 🧨 Diffusers. We can't wait and see what you'll come up with!
* Explore [existing pipelines](./api/pipelines/overview) in the library, and see if you can deconstruct and build a pipeline from scratch using the models and schedulers separately. * Explore [existing pipelines](./api/pipelines/overview) in the library, and see if you can deconstruct and build a pipeline from scratch using the models and schedulers separately.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment