Crates.io | diffusion-rs |
lib.rs | diffusion-rs |
version | 0.1.12 |
created_at | 2024-11-02 12:26:06.92221+00 |
updated_at | 2025-09-09 12:00:52.320348+00 |
description | High level API for stable-diffusion.cpp |
homepage | |
repository | https://github.com/newfla/diffusion-rs |
max_upload_size | |
id | 1432825 |
size | 129,153 |
Rust bindings to https://github.com/leejet/stable-diffusion.cpp
Windows | Mac | Linux | |
---|---|---|---|
vulkan | ❌ | ⛓️💥 | ✅️ |
metal | - | ✅️ | - |
cuda | ❌ | - | ✅️ |
rocm | ❌ | - | ⛓️💥 |
sycl | ❌ | - | ✅️ |
✅️: Working
❌: See this cargo issue
⛓️💥 : Issues when linking libraries
use diffusion_rs::{api::gen_img, preset::{Preset,PresetBuilder}};
let (mut config, mut model_config) = PresetBuilder::default()
.preset(Preset::SDXLTurbo1_0Fp16)
.prompt("a lovely duck drinking water from a bottle")
.build()
.unwrap();
gen_img(&mut config, &mut model_config).unwrap();
DIFFUSION_SKIP_BINDINGS
environment variable.
This skips attempting to build the bindings whatsoever and copies the existing ones. They may be out of date,
but it's better than nothing.
DIFFUSION_SKIP_BINDINGS=1 cargo build