Files
diffusers/docs/source/en/api/models/auto_model.md
hlky 552cd32058 [docs] AutoModel (#11250)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2025-04-09 16:42:23 +05:30

1.1 KiB

AutoModel

The AutoModel is designed to make it easy to load a checkpoint without needing to know the specific model class. AutoModel automatically retrieves the correct model class from the checkpoint config.json file.

from diffusers import AutoModel, AutoPipelineForText2Image

unet = AutoModel.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", subfolder="unet")
pipe = AutoPipelineForText2Image.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", unet=unet)

AutoModel

autodoc AutoModel - all - from_pretrained