AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.52k stars 26.45k forks source link

[Bug]: Unet is using fp32 instead of fp16 even when no-half was not enabled #12135

Open Yoinky3000 opened 1 year ago

Yoinky3000 commented 1 year ago

Is there an existing issue for this?

What happened?

I take a look at the device info in System Info extension, and i saw that the unet is using fp32 but not fp16, but it was launched without no-half, im sure that my model is saved with fp16 image image

Steps to reproduce the problem

N/A

What should have happened?

the unet should be using fp16

Version or Commit where the problem happens

Version: v1.5.1

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

Cross attention optimization

sdp-no-mem

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

--medvram --opt-sdp-no-mem-attention

List of extensions

Extension | URL | Branch | Version | Date | Update -- | -- | -- | -- | -- | -- a1111-sd-webui-lycoris | https://github.com/KohakuBlueleaf/a1111-sd-webui-lycoris.git | main | 8e97bf54 | Sun Jul 9 07:44:58 2023 | unknown a1111-sd-webui-tagcomplete | https://github.com/DominikDoom/a1111-sd-webui-tagcomplete | main | 638c073f | Wed Jul 26 13:05:37 2023 | unknown adetailer | https://github.com/Bing-su/adetailer.git | main | a71f0e2b | Mon Jul 24 09:34:22 2023 | unknown openpose-editor | https://github.com/fkunn1326/openpose-editor.git | master | 722bca6f | Sat Jun 3 04:54:52 2023 | unknown sd-dynamic-prompts | https://github.com/adieyal/sd-dynamic-prompts.git | main | 26ce66bb | Tue Jul 18 17:52:11 2023 | unknown sd-dynamic-thresholding | https://github.com/mcmonkeyprojects/sd-dynamic-thresholding.git | master | 27700fdd | Mon Jul 17 02:11:02 2023 | unknown sd-extension-system-info | https://github.com/vladmandic/sd-extension-system-info.git | main | 9d3c0ca0 | Fri Jul 14 19:46:48 2023 | unknown sd-webui-controlnet | https://github.com/Mikubill/sd-webui-controlnet.git | main | efda6ddf | Wed Jul 26 15:59:47 2023 | unknown sd-webui-openpose-editor | https://github.com/huchenlei/sd-webui-openpose-editor.git | main | d352f29e | Sat Jul 22 21:15:12 2023 | unknown sd-webui-regional-prompter | https://github.com/hako-mikan/sd-webui-regional-prompter.git | main | 39ced8be | Wed Jul 26 13:20:23 2023 | unknown sd-webui-supermerger | https://github.com/hako-mikan/sd-webui-supermerger.git | main | 665878f6 | Tue Jul 25 13:14:14 2023 | unknown ultimate-upscale-for-automatic1111 | https://github.com/Coyote-A/ultimate-upscale-for-automatic1111.git | master | c99f382b | Tue Jun 13 04:29:35 2023 | unknown LDSR | built-in | None |   | Fri Jul 28 10:21:56 2023 |   Lora | built-in | None |   | Fri Jul 28 10:21:56 2023 |   ScuNET | built-in | None |   | Fri Jul 28 10:21:56 2023 |   SwinIR | built-in | None |   | Fri Jul 28 10:21:56 2023 |   canvas-zoom-and-pan | built-in | None |   | Fri Jul 28 10:21:56 2023 |   extra-options-section | built-in | None |   | Fri Jul 28 10:21:56 2023 |   mobile | built-in | None |   | Fri Jul 28 10:21:56 2023 |   prompt-bracket-checker | built-in | None |   | Fri Jul 28 10:21:56 2023 |  

Console logs

venv "C:\SD-Webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.5.1
Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a

Launching Web UI with arguments: --medvram --opt-sdp-no-mem-attention --disable-console-progressbars
No module 'xformers'. Proceeding without it.
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[-] ADetailer initialized. version: 23.7.9, num models: 9
2023-07-28 18:20:54,678 - ControlNet - INFO - ControlNet v1.1.233
ControlNet preprocessor location: C:\SD-Webui\extensions\sd-webui-controlnet\annotator\downloads
2023-07-28 18:20:54,831 - ControlNet - INFO - ControlNet v1.1.233
Loading weights [fe90386d2a] from C:\SD-Webui\models\Stable-diffusion\testmix.fp16.safetensors
Creating model from config: C:\SD-Webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
Running on local URL:  http://127.0.0.1:7861

To create a public link, set `share=True` in `launch()`.
Startup time: 15.8s (launcher: 3.5s, import torch: 3.2s, import gradio: 1.2s, setup paths: 1.0s, other imports: 0.9s, list SD models: 0.2s, load scripts: 4.2s, create ui: 1.1s, gradio launch: 0.3s).
DiffusionWrapper has 859.52 M params.
Loading VAE weights specified in settings: C:\SD-Webui\models\VAE\kl-f8-anime2.ckpt
Applying attention optimization: sdp-no-mem... done.
Model loaded in 4.4s (load weights from disk: 1.0s, create model: 0.8s, apply weights to model: 0.9s, apply half(): 0.4s, load VAE: 0.4s, calculate empty prompt: 0.8s).

Additional information

No response

ClashSAN commented 1 year ago

Is that the refiner model? Seems slower than the regular base model in txt2img..

Yoinky3000 commented 1 year ago

no, it just a normal sd1.5 model