-
Couldn't load subscription status.
- Fork 6.5k
[core] Allegro T2V #9736
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
Merged
Merged
[core] Allegro T2V #9736
Changes from 29 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
199c240
update
a-r-r-o-w 901d10e
refactor transformer part 1
a-r-r-o-w ec05bbd
refactor part 2
a-r-r-o-w 892b70d
refactor part 3
a-r-r-o-w fd18f9a
make style
a-r-r-o-w 4f1653c
refactor part 4; modeling tests
a-r-r-o-w 412cd7c
make style
a-r-r-o-w bcba858
Merge branch 'main' into allegro-impl
a-r-r-o-w 8f9ffa8
refactor part 5
a-r-r-o-w c76dc5a
refactor part 6
a-r-r-o-w 015cc78
gradient checkpointing
a-r-r-o-w 6b53b85
pipeline tests (broken atm)
a-r-r-o-w f64f2d0
update
a-r-r-o-w 2ef6a9e
add coauthor
a-r-r-o-w e53dac2
refactor part 7
a-r-r-o-w f702af0
add docs
a-r-r-o-w 4f59d56
Merge branch 'main' into allegro-impl
a-r-r-o-w 3d41281
make style
a-r-r-o-w 37e8a95
add coauthor
a-r-r-o-w 2c4645c
make fix-copies
a-r-r-o-w e26604c
undo unrelated change
a-r-r-o-w bb321e7
revert changes to embeddings, normalization, transformer
a-r-r-o-w 174621f
refactor part 8
a-r-r-o-w 2a82064
make style
a-r-r-o-w 762ccd5
refactor part 9
a-r-r-o-w cf5dec1
make style
a-r-r-o-w 31544d4
Merge branch 'main' into allegro-impl
a-r-r-o-w d9eabf8
fix
a-r-r-o-w cf010fc
apply suggestions from review
a-r-r-o-w d44a5c8
Apply suggestions from code review
a-r-r-o-w ceb7678
Merge branch 'main' into allegro-impl
a-r-r-o-w b036386
update example
a-r-r-o-w 0fe8c51
Merge branch 'main' into allegro-impl
a-r-r-o-w 2065adc
Merge branch 'main' into allegro-impl
a-r-r-o-w 9214f4a
remove attention mask for self-attention
a-r-r-o-w 723e5b5
Merge branch 'main' into allegro-impl
a-r-r-o-w 3354ee1
update
a-r-r-o-w 28e5758
copied from
a-r-r-o-w 1ec17d5
update
a-r-r-o-w 4d6d4e4
update
a-r-r-o-w File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <!-- Copyright 2024 The HuggingFace Team. All rights reserved. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
| the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
| an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations under the License. --> | ||
|
|
||
| # AllegroTransformer3DModel | ||
|
|
||
| A Diffusion Transformer model for 3D data from [Allegro](https://github.com/rhymes-ai/Allegro) was introduced in [Allegro: Open the Black Box of Commercial-Level Video Generation Model](https://huggingface.co/papers/2410.15458) by RhymesAI. | ||
|
|
||
| The model can be loaded with the following code snippet. | ||
|
|
||
| ```python | ||
| from diffusers import AllegroTransformer3DModel | ||
|
|
||
| vae = AllegroTransformer3DModel.from_pretrained("rhymes-ai/Allegro", subfolder="transformer", torch_dtype=torch.bfloat16).to("cuda") | ||
| ``` | ||
|
|
||
| ## AllegroTransformer3DModel | ||
|
|
||
| [[autodoc]] AllegroTransformer3DModel | ||
|
|
||
| ## Transformer2DModelOutput | ||
|
|
||
| [[autodoc]] models.modeling_outputs.Transformer2DModelOutput |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <!-- Copyright 2024 The HuggingFace Team. All rights reserved. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
| the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
| an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations under the License. --> | ||
|
|
||
| # AutoencoderKLAllegro | ||
|
|
||
| The 3D variational autoencoder (VAE) model with KL loss used in [Allegro](https://github.com/rhymes-ai/Allegro) was introduced in [Allegro: Open the Black Box of Commercial-Level Video Generation Model](https://huggingface.co/papers/2410.15458) by RhymesAI. | ||
|
|
||
| The model can be loaded with the following code snippet. | ||
|
|
||
| ```python | ||
| from diffusers import AutoencoderKLAllegro | ||
|
|
||
| vae = AutoencoderKLCogVideoX.from_pretrained("rhymes-ai/Allegro", subfolder="vae", torch_dtype=torch.float32).to("cuda") | ||
| ``` | ||
|
|
||
| ## AutoencoderKLAllegro | ||
|
|
||
| [[autodoc]] AutoencoderKLAllegro | ||
| - decode | ||
| - encode | ||
| - all | ||
|
|
||
| ## AutoencoderKLOutput | ||
|
|
||
| [[autodoc]] models.autoencoders.autoencoder_kl.AutoencoderKLOutput | ||
|
|
||
| ## DecoderOutput | ||
|
|
||
| [[autodoc]] models.autoencoders.vae.DecoderOutput |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| <!-- Copyright 2024 The HuggingFace Team. All rights reserved. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
| the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
| an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations under the License. --> | ||
|
|
||
| # Allegro | ||
|
|
||
| [Allegro: Open the Black Box of Commercial-Level Video Generation Model](https://huggingface.co/papers/2410.15458) from RhymesAI, by Yuan Zhou, Qiuyue Wang, Yuxuan Cai, Huan Yang. | ||
|
|
||
| The abstract from the paper is: | ||
|
|
||
| *Significant advancements have been made in the field of video generation, with the open-source community contributing a wealth of research papers and tools for training high-quality models. However, despite these efforts, the available information and resources remain insufficient for achieving commercial-level performance. In this report, we open the black box and introduce Allegro, an advanced video generation model that excels in both quality and temporal consistency. We also highlight the current limitations in the field and present a comprehensive methodology for training high-performance, commercial-level video generation models, addressing key aspects such as data, model architecture, training pipeline, and evaluation. Our user study shows that Allegro surpasses existing open-source models and most commercial models, ranking just behind Hailuo and Kling. Code: https://github.com/rhymes-ai/Allegro , Model: https://huggingface.co/rhymes-ai/Allegro , Gallery: https://rhymes.ai/allegro_gallery .* | ||
|
|
||
| <Tip> | ||
|
|
||
| Make sure to check out the Schedulers [guide](../../using-diffusers/schedulers.md) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](../../using-diffusers/loading.md#reuse-a-pipeline) section to learn how to efficiently load the same components into multiple pipelines. | ||
|
|
||
| </Tip> | ||
|
|
||
| ## AllegroPipeline | ||
|
|
||
| [[autodoc]] AllegroPipeline | ||
| - all | ||
| - __call__ | ||
|
|
||
| ## AllegroPipelineOutput | ||
|
|
||
| [[autodoc]] pipelines.allegro.pipeline_output.AllegroPipelineOutput |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.