19 releases
Uses new Rust 2024
| 0.1.18 | Jan 26, 2026 |
|---|---|
| 0.1.14 | Dec 28, 2025 |
| 0.1.12 | Sep 9, 2025 |
| 0.1.11 | Jul 17, 2025 |
| 0.1.3 | Nov 14, 2024 |
#1817 in Machine learning
Used in diffusion-rs
15MB
187K
SLoC
diffusion-rs
Rust bindings to https://github.com/leejet/stable-diffusion.cpp
Features Matrix
| Windows | Mac | Linux | |
|---|---|---|---|
| vulkan | ✅️ | ✅️ | ✅️ |
| metal | - | ✅️ | - |
| cuda | ✅️ | - | ✅️ |
| rocm | ❔ | - | ⛓️💥 |
| sycl | ❔ | - | ✅️ |
✅️: Working
❔: Not tested
❌: See this cargo issue
⛓️💥 : Issues when linking libraries
Usage
use diffusion_rs::{api::gen_img, preset::{Preset,PresetBuilder}};
let (config, mut model_config) = PresetBuilder::default()
.preset(Preset::SDXLTurbo1_0)
.prompt("a lovely duck drinking water from a bottle")
.build()
.unwrap();
gen_img(&config, &mut model_config).unwrap();
Troubleshooting
- Something other than Windows/Linux isn't working!
- I don't have a way to test these platforms, so I can't really help you.
- If you can fix the issue, please open a PR!