Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update write_own_pipeline.mdx #3323

Merged
merged 1 commit into from
May 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/source/en/using-diffusers/write_own_pipeline.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ To recreate the pipeline with the model and scheduler separately, let's write ou
>>> for t in scheduler.timesteps:
... with torch.no_grad():
... noisy_residual = model(input, t).sample
>>> previous_noisy_sample = scheduler.step(noisy_residual, t, input).prev_sample
>>> input = previous_noisy_sample
... previous_noisy_sample = scheduler.step(noisy_residual, t, input).prev_sample
... input = previous_noisy_sample
```

This is the entire denoising process, and you can use this same pattern to write any diffusion system.
Expand Down Expand Up @@ -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:

* 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.
Loading