mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 19:18:50 +00:00
Add more mentions to SDXL Turbo in the readme. (#1397)
This commit is contained in:
@ -8,7 +8,7 @@ XL using Rust and [candle](https://github.com/huggingface/candle).
|
|||||||
The `stable-diffusion` example is a conversion of
|
The `stable-diffusion` example is a conversion of
|
||||||
[diffusers-rs](https://github.com/LaurentMazare/diffusers-rs) using candle
|
[diffusers-rs](https://github.com/LaurentMazare/diffusers-rs) using candle
|
||||||
rather than libtorch. This implementation supports Stable Diffusion v1.5, v2.1,
|
rather than libtorch. This implementation supports Stable Diffusion v1.5, v2.1,
|
||||||
as well as Stable Diffusion XL 1.0.
|
as well as Stable Diffusion XL 1.0, and Turbo.
|
||||||
|
|
||||||
## Getting the weights
|
## Getting the weights
|
||||||
|
|
||||||
@ -23,16 +23,26 @@ cargo run --example stable-diffusion --release --features=cuda,cudnn \
|
|||||||
-- --prompt "a cosmonaut on a horse (hd, realistic, high-def)"
|
-- --prompt "a cosmonaut on a horse (hd, realistic, high-def)"
|
||||||
```
|
```
|
||||||
|
|
||||||
The final image is named `sd_final.png` by default.
|
The final image is named `sd_final.png` by default. The Turbo version is much
|
||||||
The default scheduler is the Denoising Diffusion Implicit Model scheduler (DDIM). The
|
faster than previous versions, to give it a try add a `--sd-version turbo` flag,
|
||||||
original paper and some code can be found in the [associated repo](https://github.com/ermongroup/ddim).
|
e.g.:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo run --example stable-diffusion --release --features=cuda,cudnn \
|
||||||
|
-- --prompt "a cosmonaut on a horse (hd, realistic, high-def) --sd-version turbo"
|
||||||
|
```
|
||||||
|
|
||||||
|
The default scheduler for the v1.5, v2.1 and XL 1.0 version is the Denoising
|
||||||
|
Diffusion Implicit Model scheduler (DDIM). The original paper and some code can
|
||||||
|
be found in the [associated repo](https://github.com/ermongroup/ddim).
|
||||||
|
The default scheduler for the XL Turbo version is the Euler Ancestral scheduler.
|
||||||
|
|
||||||
### Command-line flags
|
### Command-line flags
|
||||||
|
|
||||||
- `--prompt`: the prompt to be used to generate the image.
|
- `--prompt`: the prompt to be used to generate the image.
|
||||||
- `--uncond-prompt`: the optional unconditional prompt.
|
- `--uncond-prompt`: the optional unconditional prompt.
|
||||||
- `--sd-version`: the Stable Diffusion version to use, can be `v1-5`, `v2-1`, or
|
- `--sd-version`: the Stable Diffusion version to use, can be `v1-5`, `v2-1`,
|
||||||
`xl`.
|
`xl`, or `turbo`.
|
||||||
- `--cpu`: use the cpu rather than the gpu (much slower).
|
- `--cpu`: use the cpu rather than the gpu (much slower).
|
||||||
- `--height`, `--width`: set the height and width for the generated image.
|
- `--height`, `--width`: set the height and width for the generated image.
|
||||||
- `--n-steps`: the number of steps to be used in the diffusion process.
|
- `--n-steps`: the number of steps to be used in the diffusion process.
|
||||||
|
Reference in New Issue
Block a user