stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

AMD GPU does not use 100% of its power when using SDXL models

Open yacinesh opened this issue 1 year ago • 8 comments

Checklist

  • [ ] The issue exists after disabling all extensions
  • [ ] The issue exists on a clean installation of webui
  • [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • [ ] The issue exists in the current version of the webui
  • [ ] The issue has not been reported before recently
  • [ ] The issue has been reported before but has not been fixed yet

What happened?

my AMD GPU doesn't use the 100% when use SDXL models while generating images

Steps to reproduce the problem

  1. select sdxl model
  2. type prompt
  3. click on generat

What should have happened?

should generate image using 100% of the gpu power

What browsers do you use to access the UI ?

No response

Sysinfo

sysinfo-2024-02-25-19-35.json

Console logs

Calculating sha256 for C:\a1111\webui_forge_cu121_torch21\webui\models\Stable-diffusion\juggernautXL_version6Rundiffusion.safetensors: 1fe6c7ec54c786040cdabc7b4e89720069d97096922e20d01f13e7764412b47f
Loading weights [1fe6c7ec54] from C:\a1111\webui_forge_cu121_torch21\webui\models\Stable-diffusion\juggernautXL_version6Rundiffusion.safetensors
model_type EPS
UNet ADM Dimension 2816
Using split attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using split attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}
To load target model SDXLClipModel
Begin to load 1 model
Moving model(s) has taken 0.02 seconds
Model loaded in 99.0s (unload existing model: 1.1s, calculate hash: 7.1s, load weights from disk: 1.0s, forge load real models: 87.7s, forge finalize: 0.1s, load textual inversion embeddings: 0.2s, calculate empty prompt: 1.7s).
To load target model SDXL
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  1024.0
[Memory Management] Model Memory (MB) =  9794.134841918945
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  -9794.134841918945
[Memory Management] Requested SYNC Preserved Memory (MB) =  0.0
[Memory Management] Parameters Loaded to SYNC Stream (MB) =  9794.096694946289
[Memory Management] Parameters Loaded to GPU (MB) =  0.0
Moving model(s) has taken 0.08 seconds
 68%|███████████████████████████████████████████████████████▊                          | 17/25 [13:36<06:44, 50.57s/it]
Total progress:  68%|████████████████████████████████████████████▉                     | 17/25 [12:30<06:43, 50.48s/it]

Additional information

No response

yacinesh avatar Feb 25 '24 19:02 yacinesh

image My GPU usage when generating

yacinesh avatar Feb 25 '24 19:02 yacinesh

Do you have the never oom extension for unet enabled?

Postmoderncaliban avatar Feb 25 '24 20:02 Postmoderncaliban

@Postmoderncaliban I don't even know what oom extension is

yacinesh avatar Feb 25 '24 22:02 yacinesh

@yacinesh Did you run into any errors that you had to fix to get this to work? Several users are unable to run forgeui with an AMD GPU to begin with (me included, I get the same problem as in this issue https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/381 )

For future readers, he's using these arguments in the webui-user.bat file according to sysinfo dump: --directml --skip-torch-cuda-test --always-normal-vram --skip-version-check

mongolsteppe avatar Feb 27 '24 09:02 mongolsteppe

Task Manager is not going to show utilization of the GPU correctly by default for most ML processes, or at least that is the case with NVIDIA cards. The graph needs to be changed to Cuda (dropdown next to the name of the graph) to show the utilization. I'm not sure if this the same for AMD cards though. You may need to use something like AMD System Monitor or GPU-Z instead.

catboxanon avatar Feb 27 '24 16:02 catboxanon

@yacinesh Did you run into any errors that you had to fix to get this to work? Several users are unable to run forgeui with an AMD GPU to begin with (me included, I get the same problem as in this issue #381 )

For future readers, he's using these arguments in the webui-user.bat file according to sysinfo dump: --directml --skip-torch-cuda-test --always-normal-vram --skip-version-check

hi, I use AMD and can't get forge ui to work, I used the arguments you said and got " No module named 'torch_directml' ". any idea how to fix it?

303Aki303 avatar Feb 27 '24 20:02 303Aki303

on cmd :: go to forge folder , call venv\Scripts\activate.bat pip install torch_directml

patientx avatar Feb 27 '24 23:02 patientx

on cmd :: go to forge folder , call venv\Scripts\activate.bat

system cannot find path specified why there has to be venv folder?

mlsterpr0 avatar Feb 28 '24 20:02 mlsterpr0