-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Add AutoPipeline For Text2Video #12846
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: main
Are you sure you want to change the base?
Add AutoPipeline For Text2Video #12846
Conversation
2a75ff3 to
4f389e3
Compare
| def test_from_pretrained_text_to_video(self): | ||
| repo = "hf-internal-testing/tiny-stable-diffusion-pipe" | ||
|
|
||
| pipe = AutoPipelineForText2Video.from_pretrained(repo) | ||
| assert pipe.__class__.__name__ == "TextToVideoSDPipeline" | ||
|
|
||
| pipe = AutoPipelineForText2Video.from_pipe(pipe) | ||
| assert pipe.__class__.__name__ == "TextToVideoSDPipeline" |
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.
does this test pass with "hf-internal-testing/tiny-stable-diffusion-pipe" ?
|
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
|
@yiyixuxu could you give this a look? |
yiyixuxu
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.
hey @naomili0924
thanks for the PR! could you explain what would be the motivation for this PR? these pipeline groups do not support multiple tasks
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
@yiyixuxu the idea is to have a single entrypoint for the text2video models / task |
|
The purpose of AutoPipeline is to enable users to switch between tasks using the same checkpoint. For video models, though, different tasks typically require different checkpoints (see Wan 2.1 for example - their checkpoints all have the task encoded in their names: "T2V" for text-to-video, "I2V" for image-to-video, plus other tasks like audio-to-video, first-last-frame-to-video, etc.). We're also seeing some model makers (e.g. LTX) release checkpoints that handle multiple tasks, which we support with a single pipeline (LTXConditionPipeline). The only exception where checkpoint sharing happens is text-to-video vs video-to-video, but IMO it's not worth adding and maintaining two auto pipelines for such a limited use case. I'd like to understand the motivation a bit more - is there a specific project you're working on that requires this? If the goal is just to have a single entry point to load different video pipelines without knowing the class name, DiffusionPipeline.from_pretrained() should already handle that. |
|
Thanks @yiyixuxu i think i misunderstood the rationale behind AutoPipelines. The reason why we prefer having a task-specific AutoPipeline is because it makes task-specific testing in optimum-onnx and optimum-intel easy. |
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.