lshqqytiger / stable-diffusion-webui-amdgpu

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

[Bug]: GPU usage between 50-60% instead of 100 #317

Open Acrivec opened 8 months ago

Acrivec commented 8 months ago

Is there an existing issue for this?

What happened?

image

As you can see the GPU is not fully utilized. I'm generating an image with SDXL 1.0 base and ControlNET qr code monster model for sdxl, with the resolution of 1024^2.

``` Code block collapsed, click to show This is the prompt log if needed ``` ``` G:\Downloads\Shark\stable-diffusion-webui-directml>webui-user.mine.bat venv "G:\Downloads\Shark\stable-diffusion-webui-directml\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.6.0-320-g03eec179 Commit hash: 03eec1791be011e087985ae93c1f66315d5a250e Launching Web UI with arguments: no module 'xformers'. Processing without... no module 'xformers'. Processing without... No module 'xformers'. Proceeding without it. 2023-11-10 17:42:32,671 - ControlNet - INFO - ControlNet v1.1.416 ControlNet preprocessor location: G:\Downloads\Shark\stable-diffusion-webui-directml\extensions\sd-webui-controlnet\annotator\downloads 2023-11-10 17:42:32,913 - ControlNet - INFO - ControlNet v1.1.416 Loading weights [31e35c80fc] from G:\Downloads\Shark\stable-diffusion-webui-directml\models\Stable-diffusion\sd_xl_base_1.0.safetensors Running on local URL: http://127.0.0.1:7860 To create a public link, set `share=True` in `launch()`. Creating model from config: G:\Downloads\Shark\stable-diffusion-webui-directml\repositories\generative-models\configs\inference\sd_xl_base.yaml Startup time: 18.0s (prepare environment: 1.2s, import torch: 6.3s, import gradio: 1.8s, setup paths: 2.0s, initialize shared: 2.3s, other imports: 0.6s, setup codeformer: 0.2s, list SD models: 0.1s, load scripts: 1.6s, create ui: 0.6s, gradio launch: 1.4s). Loading VAE weights specified in settings: G:\Downloads\Shark\stable-diffusion-webui-directml\models\VAE\sdxl_vae16.safetensors Applying attention optimization: InvokeAI... done. Model loaded in 8.2s (load weights from disk: 1.7s, create model: 0.8s, apply weights to model: 5.0s, load VAE: 0.2s, move model to device: 0.2s, calculate empty prompt: 0.3s). 100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [03:14<00:00, 9.74s/it] Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [03:13<00:00, 9.69s/it] 70%|██████████████████████████████████████████████████████████ | 7/10 [01:11<00:30, 10.29s/it]Reusing loaded model sd_xl_base_1.0.safetensors [31e35c80fc] to load sd_xl_refiner_1.0.safetensors1:01<00:29, 9.74s/it] Calculating sha256 for G:\Downloads\Shark\stable-diffusion-webui-directml\models\Stable-diffusion\sd_xl_refiner_1.0.safetensors: 7440042bbdc8a24813002c09b6b69b64dc90fded4472613437b7f55f9b7d9c5f Loading weights [7440042bbd] from G:\Downloads\Shark\stable-diffusion-webui-directml\models\Stable-diffusion\sd_xl_refiner_1.0.safetensors Creating model from config: G:\Downloads\Shark\stable-diffusion-webui-directml\repositories\generative-models\configs\inference\sd_xl_refiner.yaml Loading VAE weights specified in settings: cached sdxl_vae16.safetensors Applying attention optimization: InvokeAI... done. Model loaded in 3.0s (create model: 0.3s, apply weights to model: 2.2s, calculate empty prompt: 0.1s). 100%|██████████████████████████████████████████████████████████████████████████████████| 10/10 [02:29<00:00, 14.98s/it] Total progress: 100%|██████████████████████████████████████████████████████████████████| 10/10 [02:20<00:00, 14.09s/it] Reusing loaded model sd_xl_refiner_1.0.safetensors [7440042bbd] to load sd_xl_base_1.0.safetensors [31e35c80fc].66s/it] Loading weights [31e35c80fc] from G:\Downloads\Shark\stable-diffusion-webui-directml\models\Stable-diffusion\sd_xl_base_1.0.safetensors Creating model from config: G:\Downloads\Shark\stable-diffusion-webui-directml\repositories\generative-models\configs\inference\sd_xl_base.yaml Loading VAE weights specified in settings: cached sdxl_vae16.safetensors Applying attention optimization: InvokeAI... done. Model loaded in 11.9s (create model: 0.6s, apply weights to model: 10.7s, move model to device: 0.1s, calculate empty prompt: 0.2s). 2023-11-10 17:58:08,443 - ControlNet - INFO - Loading model: diffusion_pytorch_model [1c44f547] 2023-11-10 17:58:11,086 - ControlNet - INFO - Loaded state_dict from [G:\Downloads\Shark\stable-diffusion-webui-directml\extensions\sd-webui-controlnet\models\controlnet models\diffusion_pytorch_model.safetensors] 2023-11-10 17:58:11,100 - ControlNet - INFO - controlnet_sdxl_config 2023-11-10 17:59:13,345 - ControlNet - INFO - ControlNet model diffusion_pytorch_model [1c44f547] loaded. 2023-11-10 17:59:13,623 - ControlNet - INFO - Loading preprocessor: none 2023-11-10 17:59:13,624 - ControlNet - INFO - preprocessor resolution = 1024 2023-11-10 17:59:13,715 - ControlNet - INFO - ControlNet Hooked - Time = 65.40921211242676 100%|██████████████████████████████████████████████████████████████████████████████████| 10/10 [02:24<00:00, 14.46s/it] Total progress: 100%|██████████████████████████████████████████████████████████████████| 10/10 [02:10<00:00, 13.04s/it] 2023-11-10 18:04:17,462 - ControlNet - INFO - Loading model from cache: diffusion_pytorch_model [1c44f547]0, 15.66s/it] 2023-11-10 18:04:17,463 - ControlNet - INFO - Loading preprocessor: none 2023-11-10 18:04:17,463 - ControlNet - INFO - preprocessor resolution = 1024 2023-11-10 18:04:17,555 - ControlNet - INFO - ControlNet Hooked - Time = 0.09299588203430176 100%|██████████████████████████████████████████████████████████████████████████████████| 10/10 [02:26<00:00, 14.70s/it] Total progress: 100%|██████████████████████████████████████████████████████████████████| 10/10 [02:12<00:00, 13.27s/it] 2023-11-10 18:10:17,703 - ControlNet - INFO - Loading model from cache: diffusion_pytorch_model [1c44f547]0, 16.13s/it] 2023-11-10 18:10:17,703 - ControlNet - INFO - Loading preprocessor: none 2023-11-10 18:10:17,704 - ControlNet - INFO - preprocessor resolution = 1024 2023-11-10 18:10:17,795 - ControlNet - INFO - ControlNet Hooked - Time = 0.09199881553649902 60%|█████████████████████████████████████████████████▊ | 6/10 [01:50<01:13, 18.47s/it] ```

What should have happened?

GPU usage should be 95-100%, not 50-ish

Sysinfo

sysinfo.txt

What browsers do you use to access the UI ?

Mozilla Firefox

Additional information

W10, 7900 XTX 24GB, 32 GB RAM