Skip to content

Conversation

@DN6
Copy link
Collaborator

@DN6 DN6 commented Feb 11, 2026

What does this PR do?

AutoModel currently doesn't support creating objects using from_config, but this can be useful in cases where we might want to load a custom component that doesn't have any weights associated with it e.g. Custom scheduler like components for pipelines.

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.

@DN6 DN6 requested a review from yiyixuxu February 11, 2026 10:46
@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.

)

@classmethod
def from_config(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh I think maybe we should support this in from_pretrained()? even for scheduler and such weightless things, we load them using from_pretrained(), no?

we normally use from_config like this, would be confusing I think

pipe = DiffusionPipeline.from_pretrained(..)
pipe.scheduler = NEWSCHEDULER.from_config(pipe.config)

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.

3 participants