Skip to content

DirectML

Seunghoon Lee edited this page Oct 21, 2023 · 22 revisions

DirectML

SD.Next includes support for PyTorch-DirectML.

How to

Add --use-directml on commandline arguments.

For details, go to Installation.

Performance

The performance is quite bad compared to ROCm.

If you are familiar with Linux system, we recommend ROCm.

FAQ

Olive (experimental support)

Olive is an easy-to-use hardware-aware model optimization tool that composes industry-leading techniques across model compression, optimization, and compilation. (from pypi)

Currently, SDXL is not supported.

This feature is EXPERIMENTAL. If you run this, your existing installation may be broken. Run it in a new installation or in a new virtual environment.

How to

You should switch branch to olive.

You don't need to modify your commandline arguments.

Go to System tab → Diffusers Settings and set Diffusers pipeline to ONNX Stable Diffusion (Olive).

Optimize

Model optimization occurs automatically before creation.

Target models can be .safetensors, .ckpt, Diffusers and the optimization takes 5-10 minutes depending on your system.

The optimized models are automatically cached and used later to create images of the same size (height and width).

Download optimized model

If your system memory is not enough to optimize model

Go to ModelsHuggingface tab and download optimized model.

There's an optimized version of runwayml/stable-diffusion-v1-5.

Pros and Cons

Pros

Cons

FAQ

Clone this wiki locally