# diffusion-rs
[](https://crates.io/crates/diffusion-rs)
[](https://docs.rs/diffusion-rs)
Rust bindings to <https://github.com/leejet/stable-diffusion.cpp>
## Features Matrix
|vulkan| ✅️ | ✅️ | ✅️ |
|metal| - | ✅️ | - |
|cuda| ✅️ | - | ✅️ |
|rocm| ❔ | - | ⛓️💥 |
|sycl| ❔ | - | ✅️ |
✅️: Working
❔: Not tested
❌: See this [cargo issue](https://github.com/rust-lang/cargo/issues/15137)
⛓️💥 : Issues when linking libraries
## Usage
``` rust no_run
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!