Skip to content

Conversation

@stevhliu
Copy link
Member

This PR updates the Stable Diffusion guide to Improve DiffusionPipeline performance tutorial. Some of the updates include:

  • switching out the StableDiffusionPipeline for the more generic DiffusionPipeline
  • moves it to the Tutorial section instead of Get Started because it's important for users to learn how to use the DiffusionPipeline first before trying to optimize it
  • adds the [[open-in-colab]] tag and removes the link to the Colab notebook
  • fix formatting

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 21, 2023

The documentation is not available anymore as the PR was closed or merged.

title: Overview
- local: using-diffusers/write_own_pipeline
title: Understanding models and schedulers
- local: stable_diffusion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we give a bit less generic name to this doc since we're discussing optimization specifically?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayakpaul I think that's just the file name, the name of the doc is "Improve DiffusionPipeline performance" -

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah and this way we don't break any links to this doc!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd actually like to keep it a main doc page for now

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates! I really like the isolation of the information.

@patrickvonplaten should we consider updating this doc with the latest goodies we support from diffusers:

  • VAE tiling (for a higher-resolution generation without blowing up memory)
  • CPU offloading
  • UniPCMultistepScheduler (fastest scheduler)

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you!!

title: Overview
- local: using-diffusers/write_own_pipeline
title: Understanding models and schedulers
- local: stable_diffusion
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayakpaul I think that's just the file name, the name of the doc is "Improve DiffusionPipeline performance" -

```
```python
pipeline = pipeline.to("cuda")
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we update this guide with enable_model_cpu_offload()? cc @patrickvonplaten

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning up the doc page - would like to keep it as a main page for now though

@stevhliu stevhliu marked this pull request as ready for review March 23, 2023 17:19
Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for iterating so much here

@stevhliu stevhliu merged commit e47459c into huggingface:main Mar 29, 2023
@stevhliu stevhliu deleted the performance-tutorial branch March 29, 2023 19:48
w4ffl35 pushed a commit to w4ffl35/diffusers that referenced this pull request Apr 14, 2023
* update performance tutorial

* fix divs

* oops forgot to close tag

* apply feedback

* apply feedback

* apply feedback

* align doc title
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* update performance tutorial

* fix divs

* oops forgot to close tag

* apply feedback

* apply feedback

* apply feedback

* align doc title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants