-
Notifications
You must be signed in to change notification settings - Fork 6.1k
[docs] Clean up pipeline apis #3905
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The documentation is not available anymore as the PR was closed or merged. |
eea0dbd
to
3a172d3
Compare
I finished a first pass through the pipeline APIs, and would love it if you could take a look at it now and let me know what you think! Some of the pipelines (DiffEdit, IF, Kandinsky, Pix2Pix Zero, Shap-E, Stable UnCLIP, and UniDiffuser) have a lot of useful "how-to" content on it so I think it may be a good idea to spin those off into their own docs in the Pipelines for inference section. |
Can we tackle this PR in parts maybe? Because going over 116 file changes is a little cumbersome and is also error-prone. So, I would maybe open multiple PRs in parts to ensure the experience is smooth for you and the reviewers. Let me know if that's okay otherwise, okay for me to continue on this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I am not comfortable with the changes that correspond to deleting the additional notes and the usage examples from the pipeline documentation pages. Slightly worries that it might lead to valuable information loss.
However, I really like the idea of keeping the docstring formatting consistency across the different pipelines.
Very valid concern! I'll also address your comment here :) For some of the additional notes/usage, I feel like they add more general nice-to-know type info than actual content that is relevant to that specific pipeline. I'm a bit more worried that the pipeline pages will begin to feel cluttered with the extra info so that's why I removed them. For some models (like AudioLDM), I left the tip there because it is specific to the model. And for some models (Kandinsky/IF), I haven't touched the usage sections yet because I think that should be on a separate page in the docs. As an example, on the
Oof, apologies for that! I should've asked what you would have preferred. 🤦 Is there a way to keep the changes I've already made while splitting this PR into smaller chunks? |
Thanks for understanding!
Do you have an idea of where it could live? In the standalone usage sections, we often share memory optimization related code. So, we need to make sure to provide those but also in a self-contained manner.
Maybe just keep this branch as a backup and keep this PR open as a way to track the changes? |
I think it can live in the Pipelines for inference section since most of it corresponds to how to use the pipeline. I'll start by overhauling the Stable Diffusion pipelines in this section in a first PR since a lot of the other pipelines copy the docstrings of it so it'll be easier to fix them with |
Before you start, I would also like to get opinions from @patrickvonplaten @yiyixuxu and @pcuenca. |
Since this PR is focussed on cleaning up all the pipeline API i think it's fine to have it in one big PR. I agree with Sayak that some of the information that is removed is valuable and should probably stay. I'd argue for:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the changes to the code files!
1b0b31b
to
7b76823
Compare
I'll continue working on this PR then if you don't mind! About removing the tips and code snippets for usage, what do you think about:
This way, we aren't losing any information except for repeated stuff (like showing example code usage in both the doc and |
Sure, works for me if that's the best way to go about this!
We need to be very careful about not removing any specific tips from the sections, though. Any common tips -- I am in agreement.
Yes, I am okay with that given we don't accidentally miss out on any info (including tips, results, etc.). |
ab362c1
to
9779237
Compare
|
||
## DanceDiffusionPipeline | ||
[[autodoc]] DanceDiffusionPipeline | ||
- all | ||
- __call__ | ||
|
||
## AudioPipelineOutput | ||
[[autodoc]] pipelines.AudioPipelineOutput |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it makes sense to elevate StableDiffusionPipelineOutput
in pipelines
init so that it can be accessed by pipelines.StableDiffusionPipelineOut
rather than pipelines.stable_diffusion.StableDiffusionPipelineOutput
.
@patrickvonplaten WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be ok for me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
9779237
to
f0a6728
Compare
* start with stable diffusion * fix * finish stable diffusion pipelines * fix path to pipeline output * fix flax paths * fix copies * add up to score sde ve * finish first pass of pipelines * fix copies * second review * align doc titles * more review fixes * final review
* start with stable diffusion * fix * finish stable diffusion pipelines * fix path to pipeline output * fix flax paths * fix copies * add up to score sde ve * finish first pass of pipelines * fix copies * second review * align doc titles * more review fixes * final review
* start with stable diffusion * fix * finish stable diffusion pipelines * fix path to pipeline output * fix flax paths * fix copies * add up to score sde ve * finish first pass of pipelines * fix copies * second review * align doc titles * more review fixes * final review
* start with stable diffusion * fix * finish stable diffusion pipelines * fix path to pipeline output * fix flax paths * fix copies * add up to score sde ve * finish first pass of pipelines * fix copies * second review * align doc titles * more review fixes * final review
* start with stable diffusion * fix * finish stable diffusion pipelines * fix path to pipeline output * fix flax paths * fix copies * add up to score sde ve * finish first pass of pipelines * fix copies * second review * align doc titles * more review fixes * final review
Clean up the pipeline API docs to:
FlaxDiffusionPipeline
to the pipeline overview and adds Flax equivalent pipelines where available__call__
methodPipelineOutput
to each pipeline docStarting with
StableDiffusionPipeline
first because it'll be easier to propagate the changes to the rest of the pipelines that copy from it.