You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **⚠️ This is still in development - contributors welcome!**
3
+
Stable Diffusion in Rust using [Burn](https://github.com/burn-rs/burn). Supports SD 1.5, 2.1, and SDXL.
4
4
5
-
The `diffusers-burn` crate is a conversion of [diffusers-rs](https://github.com/LaurentMazare/diffusers-rs) using [burn](https://github.com/burn-rs/burn) rather than libtorch. This implementation supports Stable Diffusion v1.5, v2.1, as well as Stable Diffusion XL 1.0.
5
+
Based on [diffusers-rs](https://github.com/LaurentMazare/diffusers-rs).
6
6
7
7
<divalign="left"valign="middle">
8
8
<ahref="https://runblaze.dev">
@@ -18,29 +18,39 @@ _[Blaze](https://runblaze.dev) supports this project by providing ultra-fast App
18
18
19
19
</div>
20
20
21
-
## Feature Flags
21
+
## Quick Start
22
22
23
-
This crate can be used without the standard library (`#![no_std]`) with `alloc` by disabling
24
-
the default `std` feature.
23
+
```bash
24
+
# Using wgpu backend (default, works on most GPUs)
25
+
cargo run --release --features wgpu --example stable-diffusion -- \
26
+
--prompt "A photo of a rusty robot on a beach"
25
27
26
-
*`std` - enables the standard library. Enabled by default.
27
-
*`wgpu` - uses ndarray as the backend. Enabled by default when none specified and `std`.
28
-
*`ndarray` - uses ndarray as the backend.
29
-
*`ndarray-no-std` - uses ndarray-no-std as the backend. Enabled by default when none and `#![no_std]`.
30
-
*`ndarray-blas-accelerate` - uses ndarray with Accelerate framework (macOS only).
31
-
*`torch` - uses torch as the backend.
28
+
# Using torch backend
29
+
cargo run --release --features torch --example stable-diffusion -- \
30
+
--prompt "A photo of a rusty robot on a beach"
32
31
33
-
## Community
32
+
# SD 2.1 at 768x768
33
+
cargo run --release --features torch --example stable-diffusion -- \
34
+
--sd-version v2-1 \
35
+
--prompt "A majestic lion on a cliff at sunset"
36
+
```
37
+
38
+
## Backends
39
+
40
+
| Feature | Backend | Notes |
41
+
|---------|---------|-------|
42
+
|`wgpu`| WebGPU | Cross-platform GPU support |
43
+
|`torch`| LibTorch | Requires libtorch |
44
+
|`ndarray`| ndarray | CPU only, pure Rust |
34
45
35
-
If you are excited about the project or want to contribute, don't hesitate to join our [Discord](https://discord.gg/UHtSgF6j5J)!
36
-
We try to be as welcoming as possible to everybody from any background. We're still building this out, but you can ask your questions there!
46
+
## no_std Support
37
47
38
-
## Status
48
+
This crate supports `#![no_std]` with `alloc` by disabling the default `std` feature.
49
+
50
+
## Community
39
51
40
-
diffusers-burn is currently in active development, and is not yet complete.
52
+
Join our [Discord](https://discord.gg/UHtSgF6j5J) if you want to contribute or have questions!
41
53
42
54
## License
43
55
44
-
diffusers-burn is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
45
-
See [LICENSE-APACHE](./LICENSE-APACHE) and [LICENSE-MIT](./LICENSE-MIT) for details. Opening a pull
46
-
request is assumed to signal agreement with these licensing terms.
0 commit comments