Cargo Features

[dependencies]
stable-diffusion = { version = "0.1.9", default-features = false, features = ["cuda", "cudnn", "flash-attn", "mkl", "nccl", "onnx", "metal"] }
default = cuda

The cuda feature is set by default whenever stable-diffusion is added without default-features = false somewhere in the dependency tree.

cuda default flash-attn? nccl?

Enables bindgen_cuda, cuda of candle-core ^0.4.1, candle-nn ^0.4.1, and candle-transformers ^0.4.1

cudnn

Enables cudnn of candle-core ^0.4.1

flash-attn = cuda

Enables candle-flash-attn ^0.4.1, flash-attn of candle-transformers ^0.4.1

mkl

Enables intel-mkl-src, mkl of candle-core ^0.4.1, candle-nn ^0.4.1, and candle-transformers ^0.4.1

nccl = cuda

Enables half, nccl of cudarc ^0.10.0

onnx = candle-onnx
metal

Enables metal of candle-core ^0.4.1 and candle-nn ^0.4.1

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

candle-onnx onnx?

Enables candle-onnx ^0.4.1

cudarc nccl?

Enables cudarc ^0.10.0