ml-explore / mlx-examples

Examples in the MLX framework
MIT License
6.27k stars 895 forks source link

Allow loading from diffusers ckpt #1117

Open angeloskath opened 3 days ago

angeloskath commented 3 days ago

Fixes #1116 .

The original checkpoint saved just the transformer model but in the diffusers checkpoint the transformer is nested in the model and diffusion_model. It seems that the transformer folder would be loadable as is but this small addition to sanitize() will work just as well.