-
Notifications
You must be signed in to change notification settings - Fork 89
feat(mindone/diffusers): add ltx_0.98 to diffusers #1458
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
base: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @Cui-yshoho, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces support for newer LTX-Video models, specifically versions up to 0.9.8, by updating the documentation with new examples and adding a tone_map_latents feature to the LTXLatentUpsamplePipeline. The changes are generally well-implemented. My review includes a few suggestions for the documentation to fix a typo, correct a potentially buggy code example, and address a placeholder checkpoint. The core code changes for the new feature appear solid.
| height = height - (height % pipeline.vae_temporal_compression_ratio) | ||
| width = width - (width % pipeline.vae_temporal_compression_ratio) |
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.
The function round_to_nearest_resolution_acceptable_by_vae appears to be using pipeline.vae_temporal_compression_ratio to adjust height and width. Since resolution refers to spatial dimensions (height and width), it should likely use pipeline.vae_spatial_compression_ratio. The other examples in this file for newer model versions correctly use vae_spatial_compression_ratio. Using the temporal ratio for spatial dimensions could lead to incorrect resolutions and potential errors.
| height = height - (height % pipeline.vae_temporal_compression_ratio) | |
| width = width - (width % pipeline.vae_temporal_compression_ratio) | |
| height = height - (height % pipeline.vae_spatial_compression_ratio) | |
| width = width - (width % pipeline.vae_spatial_compression_ratio) |
| - The recommended dtype for the transformer, VAE, and text encoder is `mindspore.bfloat16`. The VAE and text encoder can also be `mindspore.float32` or `mindspore.float16`. | ||
| - For guidance-distilled variants of LTX-Video, set `guidance_scale` to `1.0`. The `guidance_scale` for any other model should be set higher, like `5.0`, for good generation quality. | ||
| - For timestep-aware VAE variants (LTX-Video 0.9.1 and above), set `decode_timestep` to `0.05` and `image_cond_noise_scale` to `0.025`. | ||
| - For variants that support interpolation between multiple conditioning images and videos (LTX-Video 0.9.5 and above), use similar images and videos for the best results. Divergence from the conditioning inputs may lead to abrupt transitionts in the generated video. |
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.
There is a typo in transitionts. It should be transitions.
| - For variants that support interpolation between multiple conditioning images and videos (LTX-Video 0.9.5 and above), use similar images and videos for the best results. Divergence from the conditioning inputs may lead to abrupt transitionts in the generated video. | |
| - For variants that support interpolation between multiple conditioning images and videos (LTX-Video 0.9.5 and above), use similar images and videos for the best results. Divergence from the conditioning inputs may lead to abrupt transitions in the generated video. |
| # TODO: Update the checkpoint here once updated in LTX org | ||
| upsampler = LTXLatentUpsamplerModel.from_pretrained("a-r-r-o-w/LTX-0.9.8-Latent-Upsampler", mindspore_dtype=ms.bfloat16) |
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.
The example code for LTX-Video 0.9.8 contains a TODO comment and uses a checkpoint from a personal repository (a-r-r-o-w/...). For official documentation, it's best to use official checkpoints from the Lightricks organization. Please update the checkpoint to an official one and remove the TODO comment once it's available.
What does this PR do?
Fixes # (issue)
Adds # (feature)
Before submitting
What's New. Here are thedocumentation guidelines
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.
@xxx