Add Diffusers AutoModel support

#1
by dn6 HF Staff - opened

Allows the model to be loaded directly with Diffusers using AutoModel

from diffusers import AutoModel
tiny_vae = AutoModel.from_pretrained(
    "fal/FLUX.2-Tiny-AutoEncoder",
    trust_remote_code=True,
    torch_dtype=torch.bfloat16
).to(device)

@dn6 would it be possible to natively integrate this with diffusers, like https://huggingface.co/docs/diffusers/api/models/autoencoder_tiny?

@isidentical we certainly can integrate natively, but I don't think we can get it done in time for this next release (can add to main shortly after though). Would it be possible to merge this change for now and I can update it once the native integration is available?

benjamin-paine changed pull request status to merged

Sign up or log in to comment