Skip to content

Conversation

@naomili0924
Copy link

What does this PR do?

Fixes # (issue)

Before submitting

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.

Comment on lines +459 to +466
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"
Copy link
Member

@IlyasMoutawwakil IlyasMoutawwakil Dec 17, 2025

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" ?

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the stale Issues that haven't received updates label Jan 15, 2026
@sayakpaul sayakpaul removed the stale Issues that haven't received updates label Jan 15, 2026
@sayakpaul
Copy link
Member

@yiyixuxu could you give this a look?

Copy link
Collaborator

@yiyixuxu yiyixuxu left a 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

@HuggingFaceDocBuilderDev

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.

@IlyasMoutawwakil
Copy link
Member

@yiyixuxu the idea is to have a single entrypoint for the text2video models / task

@yiyixuxu
Copy link
Collaborator

hi @IlyasMoutawwakil

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.

@IlyasMoutawwakil
Copy link
Member

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.
DiffusionPipeline does not guarantee which pipeline you will get when you load a checkpoint, while AutoPipelineForTask will always return the pipeline for the task it's related to.
I wasn't aware that video checkpoints only support one task for now, thanks for the clarification, i think we can use DiffusionPipeline with video models in our testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants