From 879fee99eba3ce28085c676f17cab5e0f4c8293e Mon Sep 17 00:00:00 2001 From: ClashSAN <98228077+ClashSAN@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:38:00 +0000 Subject: [PATCH] enabling fp16 as mentioned in comment --- Features.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Features.md b/Features.md index c87d182..7a6792a 100644 --- a/Features.md +++ b/Features.md @@ -4,7 +4,7 @@ All examples are non-cherrypicked unless specified otherwise. # Stable Diffusion 2.0 ## Basic models -Models are supported: 768-v-ema.ckpt ([checkpoint](https://huggingface.co/stabilityai/stable-diffusion-2/blob/main/768-v-ema.ckpt), [config](https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference-v.yaml)) and 512-base-ema.ckpt ([model](https://huggingface.co/stabilityai/stable-diffusion-2-base/blob/main/512-base-ema.ckpt), [checkpoint](https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference.yaml)). 2.1 checkpoints should also work. +Models are supported: 768-v-ema.ckpt ([model](https://huggingface.co/stabilityai/stable-diffusion-2/blob/main/768-v-ema.ckpt), [config](https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference-v.yaml)) and 512-base-ema.ckpt ([model](https://huggingface.co/stabilityai/stable-diffusion-2-base/blob/main/512-base-ema.ckpt), [config](https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference.yaml)). 2.1 checkpoints should also work. - download the checkpoint (from here: https://huggingface.co/stabilityai/stable-diffusion-2) - put it into models/Stable-Diffusion directory @@ -15,7 +15,20 @@ Train tab will most likely be broken for the 2.0 models. If 2.0 or 2.1 is generating black images, enable full precision with `--no-half` or try using the `--xformers` optimization. -_**Note:**_ SD 2.0 and 2.1 are more sensitive to FP16 numerical instability (as noted by themselves in https://github.com/Stability-AI/stablediffusion/commit/c12d960d1ee4f9134c2516862ef991ec52d3f59e) due to their new cross attention module. +_**Note:**_ SD 2.0 and 2.1 are more sensitive to FP16 numerical instability (as noted by themselves [here](https://github.com/Stability-AI/stablediffusion/commit/c12d960d1ee4f9134c2516862ef991ec52d3f59e)) due to their new cross attention module. + +On fp16: [comment](https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/5503#issuecomment-1341495770) to enable, in webui-user.bat: + + @echo off + + set PYTHON= + set GIT= + set VENV_DIR= + set COMMANDLINE_ARGS=your command line options + set STABLE_DIFFUSION_COMMIT_HASH="c12d960d1ee4f9134c2516862ef991ec52d3f59e" + set ATTN_PRECISION=fp16 + + call webui.bat ## Depth-guided model [More info](https://github.com/Stability-AI/stablediffusion#depth-conditional-stable-diffusion). [PR](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/5542).