Crates.io | diffusion-rs |
lib.rs | diffusion-rs |
version | 0.1.3 |
source | src |
created_at | 2024-11-02 12:26:06.92221 |
updated_at | 2024-11-14 11:41:25.700082 |
description | High level API for stable-diffusion.cpp |
homepage | |
repository | https://github.com/newfla/diffusion-rs |
max_upload_size | |
id | 1432825 |
size | 50,189 |
Rust bindings to https://github.com/leejet/stable-diffusion.cpp
Windows | Mac | Linux | |
---|---|---|---|
vulkan | ✅️ | ✅️ | ✅️ |
metal | ❌️ | ✅️ | ❌️ |
cuda | ✅️ | ❌️ | ✅️ |
rocm | ❔️ | ❌️ | ✅️ |
sycl | ❔️ | ❌️ | ✅️ |
❔️: Not tested, should be supported
use diffusion_rs::{api::txt2img, preset::{Preset,PresetBuilder}};
let config = PresetBuilder::default()
.preset(Preset::SDXLTurbo1_0Fp16)
.prompt("a lovely duck drinking water from a bottle")
.build()
.unwrap();
txt2img(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