-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Add Stable Diffusion 3 #8483
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
Add Stable Diffusion 3 #8483
Conversation
| The abstract from the paper is: | ||
|
|
||
| *Diffusion models create data from noise by inverting the forward paths of data towards noise and have emerged as a powerful generative modeling technique for high-dimensional, perceptual data such as images and videos. Rectified flow is a recent generative model formulation that connects data and noise in a straight line. Despite its better theoretical properties and conceptual simplicity, it is not yet decisively established as standard practice. In this work, we improve existing noise sampling techniques for training rectified flow models by biasing them towards perceptually relevant scales. Through a large-scale study, we demonstrate the superior performance of this approach compared to established diffusion formulations for high-resolution text-to-image synthesis. Additionally, we present a novel transformer-based architecture for text-to-image generation that uses separate weights for the two modalities and enables a bidirectional flow of information between image and text tokens, improving text comprehension typography, and human preference ratings. We demonstrate that this architecture follows predictable scaling trends and correlates lower validation loss to improved text-to-image synthesis as measured by various metrics and human evaluations.* | ||
|
|
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.
| Original model weights can be found here: [https://huggingface.co/stabilityai/](https://huggingface.co/stabilityai/). | |
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.
Was this meant to be [here](https://huggingface.co/stabilityai/)?
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.
Yeah feel free to shorten it. I wanted to unfurl it.
sayakpaul
left a comment
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.
Todo:
- You are already adding tests. I think the we should add the SD3Transformer2DModel tests too: https://github.com/huggingface/new-model-addition-diffusers/pull/30.
- Add docs for SD3Transformer2DModel and the scheduler.
src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3.py
Outdated
Show resolved
Hide resolved
| width: Optional[int] = None, | ||
| num_inference_steps: int = 50, | ||
| timesteps: List[int] = None, | ||
| guidance_scale: float = 5.0, |
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.
should we set it to be 7.0 (I think that's the default they want)
|
no support for |
|
It will come with single-file support. The PR isn't fully ready yet. |
…fusion_3.py Co-authored-by: YiYi Xu <[email protected]>
|
Will you write the inpaint pipeline code? |
|
requirements_sd3.txt is missing |
Co-authored-by: YiYi Xu <[email protected]>
Co-authored-by: YiYi Xu <[email protected]>
…_3.md Co-authored-by: Sayak Paul <[email protected]>
…_3.md Co-authored-by: Sayak Paul <[email protected]>
|
@vladmandic single-file support is there ;) |
apolinario
left a comment
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.
wanted to make a comment and started a review by accident
|
I get this error as well when attempting to run the training (after figuring out the requirements) |
|
@GavChap I would appreciate if you don't post it in between an ongoing PR as the issue is not descriptive enough. So, I would suggest you wait for a little while and try it out. If you face any issue, open a separate thread. |
* up * add sd3 * update * update * add tests * fix copies * fix docs * update * add dreambooth lora * add LoRA * update * update * update * update * import fix * update * Update src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3.py Co-authored-by: YiYi Xu <[email protected]> * import fix 2 * update * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/models/autoencoders/autoencoder_kl.py Co-authored-by: YiYi Xu <[email protected]> * update * update * update * fix ckpt id * fix more ids * update * missing doc * Update src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py Co-authored-by: YiYi Xu <[email protected]> * Update src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py Co-authored-by: YiYi Xu <[email protected]> * Update docs/source/en/api/pipelines/stable_diffusion/stable_diffusion_3.md Co-authored-by: Sayak Paul <[email protected]> * Update docs/source/en/api/pipelines/stable_diffusion/stable_diffusion_3.md Co-authored-by: Sayak Paul <[email protected]> * update' * fix * update * Update src/diffusers/models/autoencoders/autoencoder_kl.py * Update src/diffusers/models/autoencoders/autoencoder_kl.py * note on gated access. * requirements * licensing --------- Co-authored-by: sayakpaul <[email protected]> Co-authored-by: YiYi Xu <[email protected]>
What does this PR do?
Fixes # (issue)
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.