Rust port of Stable Diffusion v1.4
Top 82.6% on sourcepulse
This project provides a Rust implementation of the Stable Diffusion v1.4 model, leveraging the burn
deep learning framework. It targets developers and researchers interested in exploring or deploying diffusion models within the Rust ecosystem, offering a performant and memory-efficient alternative to Python-based solutions.
How It Works
The project directly ports the Stable Diffusion v1.4 architecture into Rust, utilizing the burn
framework for tensor operations and automatic differentiation. This approach aims to provide native performance and memory safety benefits inherent to Rust, while burn
's design facilitates backend flexibility (CUDA, MPS, WGPU) and efficient execution.
Quick Start & Requirements
cargo run --release --bin sample burn SDv1-4 7.5 20 "An ancient mossy stone." img [cuda|mps|cpu]
libtorch v2.4.1
, at least 6 GB VRAM for CUDA.wget https://huggingface.co/Gadersd/Stable-Diffusion-Burn/resolve/main/SDv1-4.mpk
tinygrad
, and a .ckpt
model file. Conversion script is not compatible with Windows.Highlighted Details
burn
.burn
's format.Maintenance & Community
No specific community channels or contributor information is provided in the README.
Licensing & Compatibility
Limitations & Caveats
The WGPU backend is explicitly marked as unstable. Model conversion scripts are not compatible with Windows. The sample
binary requires CUDA for execution, while convert
works on CPU.
10 months ago
1 week