lshqqytiger / stable-diffusion-webui-amdgpu

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

[Bug]: AMD GPU AttributeError: module 'modules.devices' has no attribute 'cuda_ok' #490

Closed daimonfrey closed 3 months ago

daimonfrey commented 3 months ago

Checklist

What happened?

I downloaded and ran it. I used various solutions that I found on github but none of them worked.

My Commandline: set COMMANDLINE_ARGS= --opt-sub-quad-attention --medvram --disable-nan-check --no-half --use-directml

Steps to reproduce the problem

I downloaded and ran it. I used various solutions that I found on github but none of them worked.

What should have happened?

Error: AttributeError: module 'modules.devices' has no attribute 'cuda_ok'

What browsers do you use to access the UI ?

No response

Sysinfo

PC: 48GB RAM RX 7600 AMD Ryzen 7

Console logs

C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master>set COMMANDLINE_ARGS= --opt-sub-quad-attention --medvram --disable-nan-check --no-half --use-directml
venv "C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\venv\Scripts\Python.exe"
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: 1.9.4
Commit hash: <none>
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\pytorch_lightning\utilities\distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from `pytorch_lightning.utilities` instead.
  rank_zero_deprecation(
Launching Web UI with arguments: --opt-sub-quad-attention --medvram --disable-nan-check --no-half --use-directml
C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\diffusers\models\vq_model.py:20: FutureWarning: `VQEncoderOutput` is deprecated and will be removed in version 0.31. Importing `VQEncoderOutput` from `diffusers.models.vq_model` is deprecated and this will be removed in a future version. Please use `from diffusers.models.autoencoders.vq_model import VQEncoderOutput`, instead.
  deprecate("VQEncoderOutput", "0.31", deprecation_message)
C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\diffusers\models\vq_model.py:25: FutureWarning: `VQModel` is deprecated and will be removed in version 0.31. Importing `VQModel` from `diffusers.models.vq_model` is deprecated and this will be removed in a future version. Please use `from diffusers.models.autoencoders.vq_model import VQModel`, instead.
  deprecate("VQModel", "0.31", deprecation_message)
ONNX: version=1.18.1 provider=DmlExecutionProvider, available=['DmlExecutionProvider', 'CPUExecutionProvider']
Traceback (most recent call last):
  File "C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\launch.py", line 48, in <module>
    main()
  File "C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\launch.py", line 44, in main
    start()
  File "C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\modules\launch_utils.py", line 689, in start
    import webui
  File "C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\webui.py", line 13, in <module>
    initialize.imports()
  File "C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\modules\initialize.py", line 36, in imports
    shared_init.initialize()
  File "C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\modules\shared_init.py", line 66, in initialize
    initialize_zluda()
  File "C:\Users\Daimon\Desktop\stable-diffusion-webui-amdgpu-master\modules\zluda.py", line 37, in initialize_zluda
    if not devices.cuda_ok or not is_zluda(device):
AttributeError: module 'modules.devices' has no attribute 'cuda_ok'

Additional information

No response

lshqqytiger commented 3 months ago

488 #489