lshqqytiger / stable-diffusion-webui-amdgpu

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

[Bug]: (AMD Radeon HD 6670) Got an Invalid device_id argument supplied error after attempting the fixes from #351. #425

Closed 10tako closed 2 months ago

10tako commented 3 months ago

Checklist

What happened?

After successfully installing the stable-diffusion folder described in 'Install and Run on AMD GPUs' and having an unsuccessful run with webui-user.bat, I had followed along with the directions listed in thread #351 which had shown good results when it showed new installation windows but when I had ran webui-user.bat once more the program has shown a new "Invalid device_id argument supplied 0" error.

Steps to reproduce the problem

1.) I had edited requirements_versions.txt to include torch-directml as the very last line. 2.) I had ran .\venv\scripts\activate and then pip install -r requirements.txt 3.) I changed webui-user so that the line is now set COMMANDLINE_ARGS=--opt-sub-quad-attention --lowvram --disable-nan-check --use-directml 4.) I had ran webui-user.bat

What should have happened?

webui-user succeeds with the argument changes described by other users.

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

WebUI-user was unable to proceed past the Command Line.

Console logs

venv "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\venv\Scripts\Python.exe"
fatal: No names found, cannot describe anything.
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: 1.8.0-RC
Commit hash: 25a3b6cbeea8a07afd5e4594afc2f1c79f41ac1a
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\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 --lowvram --disable-nan-check --use-directml
Traceback (most recent call last):
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\launch.py", line 48, in <module>
    main()
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\launch.py", line 44, in main
    start()
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\modules\launch_utils.py", line 663, in start
    import webui
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\webui.py", line 13, in <module>
    initialize.imports()
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\modules\initialize.py", line 36, in imports
    shared_init.initialize()
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\modules\shared_init.py", line 31, in initialize    directml_do_hijack()
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\modules\dml\__init__.py", line 76, in directml_do_hijack
    if not torch.dml.has_float64_support(device):
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\modules\dml\backend.py", line 45, in has_float64_support
    return torch_directml.has_float64_support(get_device(device).index)
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\modules\dml\utils.py", line 8, in get_device
    device = torch.dml.current_device()
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\modules\dml\backend.py", line 51, in current_device
    return DirectML.context_device or DirectML.default_device()
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\modules\dml\backend.py", line 54, in default_device
    return torch_directml.device(torch_directml.default_device())
  File "C:\Users\K\Desktop\Utilities\stable-diffusion-webui-directml\venv\lib\site-packages\torch_directml\device.py", line 38, in device
    raise Exception(f"Invalid device_id argument supplied {device_id}. device_id must be in range [0, {num_devices}).")
Exception: Invalid device_id argument supplied 0. device_id must be in range [0, 0).
Press any key to continue . . .

Additional information

No response

lshqqytiger commented 3 months ago

DirectML requirements

ZLUDA requirements

HD 6670 doesn't meet anything of both. https://www.amd.com/en/support/graphics/amd-radeon-hd/amd-radeon-hd-6000-series/amd-radeon-hd-6670