huggingface / candle

Minimalist ML framework for Rust
Apache License 2.0
15.91k stars 963 forks source link

Support sd3.5 medium and MMDiT-X #2587

Closed Czxck001 closed 3 weeks ago

Czxck001 commented 3 weeks ago

Stable Diffusion 3.5 Medium has been released on Oct 29, with modified archetecture named MMDiT-X. This PR adds support to the Stable Diffusion 3.5 Medium and MMDiT-X model.

Change is based on reference design sd3.5/mmdit-x.py in comparison with sd3-ref/mmdit.py, including

Note: A change has been made in sd3.5 after the release of Stable Diffusion 3.5 Medium on Oct 29 that fixes some bugs in the original reference design.

Implementation-wise,

References:

Sample image generated with Stable Diffusion 3.5 Medium: out

LaurentMazare commented 3 weeks ago

Amazing, thanks!