lshqqytiger / stable-diffusion-webui-amdgpu

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

only coming 6 its #459

Closed neonarc4 closed 4 months ago

neonarc4 commented 4 months ago

Checklist

What happened?

text to image only show 2its lamo

Steps to reproduce the problem

What should have happened?

should be 23 its on rx 7900 xtx sad

What browsers do you use to access the UI ?

Mozilla Firefox, Google Chrome, Brave, Other

Sysinfo

latest

Console logs

To create a public link, set `share=True` in `launch()`.
Startup time: 434.3s (prepare environment: 53.8s, initialize shared: 3.2s, other imports: 0.2s, list SD models: 381.9s, load scripts: 2.3s, create ui: 0.7s, gradio launch: 0.4s).
6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa
Loading weights [6ce0161689] from X:\Nebula\dml\stable-diffusion-webui-directml\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: X:\Nebula\dml\stable-diffusion-webui-directml\configs\v1-inference.yaml
X:\Nebula\dml\stable-diffusion-webui-directml\venv\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
Applying attention optimization: InvokeAI... done.
Model loaded in 11.2s (calculate hash: 5.8s, create model: 0.4s, apply weights to model: 3.6s, apply half(): 0.4s, calculate empty prompt: 0.8s).
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:44<00:00,  2.22s/it]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:40<00:00,  2.01s/it]
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:43<00:00,  2.19s/it]
Total progress:  35%|███████████████████████▍                                           | 7/20 [00:42<01:18,  6.06s/it]
Total progress:  35%|███████████████████████▍                                           | 7/20 [00:42<01:20,  6.21s/it]
lshqqytiger commented 4 months ago

What resolution, which sampler, backend, settings?

neonarc4 commented 4 months ago
@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--use-directml

call webui.bat

resolution 512 512 backend -dml setting just started default settings sec i record an video

neonarc4 commented 4 months ago

https://github.com/lshqqytiger/stable-diffusion-webui-directml/assets/140290288/50947f60-8720-450c-b7ab-ec91b3002b6b

now it coming 5-6 but it should be like 23its

lshqqytiger commented 4 months ago

You can't reach 23it/s with DirectML. (torch-directml) Change these settings:

precision: fp16 (half)
use autocast
attention method: scaled-dot product (sdp) or sub-quadratic

You can reach about 5it/s with the optimized settings. By the way, you can reach 17it/s ~ 23it/s with ZLUDA, and 27~28it/s with Olive (need conversion/optimization).

neonarc4 commented 4 months ago

where i can change these setting ?

lshqqytiger commented 4 months ago

Go to system tab

neonarc4 commented 4 months ago

i will close it for now i will test it little bit more before reopening thnx alot ishqqy

neonarc4 commented 4 months ago

ZLUDA is just frozen it keep loading and loading more then 10minute sometime it also crash set COMMANDLINE_ARGS=--use-zluda --update-all-extensions

image

also i reset every setting also delete venv and purge clean it but nothing fix also once it done i restart the loading remain on 0/20 not move even a slightess

neonarc4 commented 4 months ago

https://github.com/lshqqytiger/stable-diffusion-webui-directml/assets/140290288/48f254d3-0938-478c-bd65-7560199bdbff

@lshqqytiger

lshqqytiger commented 4 months ago

ZLUDA has to compile GPU codes and make caches at the first launch. It will take ~20 minutes.

neonarc4 commented 4 months ago

zesus lol i should go with onnx then thanks again between ❤️

neonarc4 commented 4 months ago

@lshqqytiger i forget to say thank u again 🤜

image i really getting good result now