Skip to content
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

[core] introduce AutoModel #10059

Open
sayakpaul opened this issue Nov 30, 2024 · 0 comments
Open

[core] introduce AutoModel #10059

sayakpaul opened this issue Nov 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sayakpaul
Copy link
Member

Now that we have quite a few model classes (and transformer model classes), I wonder if it makes sense to have an AutoModel class. Oftentimes, users initialize the model separately and pass it to a DiffusionPipeline:

transformer = "..."
pipeline = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", transformer=transformer)

It's common to see this happening, especially in the realm of quantization. And in these cases, an AutoModel class could be quite nice with the following developer experience:

transformer = AutoModel.from_pretrained("...", subfolder="...")
@sayakpaul sayakpaul added the enhancement New feature or request label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant