diffusion-rs

Crates.iodiffusion-rs
lib.rsdiffusion-rs
version0.1.17
created_at2024-11-02 12:26:06.92221+00
updated_at2026-01-18 21:18:01.04086+00
descriptionHigh level API for stable-diffusion.cpp
homepage
repositoryhttps://github.com/newfla/diffusion-rs
max_upload_size
id1432825
size220,952
Flavio Bizzarri (newfla)

documentation

https://docs.rs/diffusion-rs

README

diffusion-rs

Latest version Documentation

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!
Commit count: 116

cargo fmt