lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
7.83k stars 751 forks source link

facing Issue with AMD GPU[Bug]: #436

Open Tedy202 opened 7 months ago

Tedy202 commented 7 months ago

Checklist

What happened?

I am using AMD radio RX580 8 gb Vram. When I use Run.bat it shows "Runtime error: Tourch is not able to use GPU; add --skip-tourch-cuda-test. I did that but then it showed another error "found no NVIDIA driver on your computer" Capture After Adding Command line arges

Steps to reproduce the problem

  1. click run.bat

What should have happened?

I have no idea

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

no module 'xformers'. Processing without... no module 'xformers'. Processing without... No module 'xformers'. Proceeding without it. D:\SD\Forge\system\python\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( Sysinfo saved as sysinfo-2024-02-28-04-59.json. Exiting... Press any key to continue . . .

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: f0.0.16v1.8.0rc-latest-268-gb59deaa3
Commit hash: b59deaa382bf5c968419eff4559f7d06fc0e76e7
Launching Web UI with arguments: --skip-torch-cuda-test
Traceback (most recent call last):
  File "D:\SD\Forge\webui\launch.py", line 51, in <module>
    main()
  File "D:\SD\Forge\webui\launch.py", line 47, in main
    start()
  File "D:\SD\Forge\webui\modules\launch_utils.py", line 541, in start
    import webui
  File "D:\SD\Forge\webui\webui.py", line 17, in <module>
    initialize_forge()
  File "D:\SD\Forge\webui\modules_forge\initialization.py", line 50, in initialize_forge
    import ldm_patched.modules.model_management as model_management
  File "D:\SD\Forge\webui\ldm_patched\modules\model_management.py", line 122, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
  File "D:\SD\Forge\webui\ldm_patched\modules\model_management.py", line 91, in get_torch_device
    return torch.device(torch.cuda.current_device())
  File "D:\SD\Forge\system\python\lib\site-packages\torch\cuda\__init__.py", line 769, in current_device
    _lazy_init()
  File "D:\SD\Forge\system\python\lib\site-packages\torch\cuda\__init__.py", line 298, in _lazy_init
    torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Press any key to continue . . .

Additional information

No response

mlsterpr0 commented 7 months ago

After so much time i still don't see a PROPER tutorial on how to use forge with AMD in directml mode. It almost works for me, after i did some changes. But it eats all vram and freezes.

a3nima commented 6 months ago

After so much time i still don't see a PROPER tutorial on how to use forge with AMD in directml mode. It almost works for me, after i did some changes. But it eats all vram and freezes.

Yeah and on the front page /readme no info for AMD users, if it's the same as A1111 then maybe just copy it or edit it in the correct way. I dont have AMD but would like to give the info to AMD users.

is this working? -> https://github.com/likelovewant/stable-diffusion-webui-forge-on-amd

Kartagnan commented 6 months ago

Checklist

  • [ ] The issue exists after disabling all extensions
  • [x] 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
  • [x] The issue has not been reported before recently
  • [ ] The issue has been reported before but has not been fixed yet

What happened?

I am using AMD radio RX580 8 gb Vram. When I use Run.bat it shows "Runtime error: Tourch is not able to use GPU; add --skip-tourch-cuda-test. I did that but then it showed another error "found no NVIDIA driver on your computer" Capture After Adding Command line arges

Steps to reproduce the problem

  1. click run.bat

What should have happened?

I have no idea

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

no module 'xformers'. Processing without... no module 'xformers'. Processing without... No module 'xformers'. Proceeding without it. D:\SD\Forge\system\python\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( Sysinfo saved as sysinfo-2024-02-28-04-59.json. Exiting... Press any key to continue . . .

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: f0.0.16v1.8.0rc-latest-268-gb59deaa3
Commit hash: b59deaa382bf5c968419eff4559f7d06fc0e76e7
Launching Web UI with arguments: --skip-torch-cuda-test
Traceback (most recent call last):
  File "D:\SD\Forge\webui\launch.py", line 51, in <module>
    main()
  File "D:\SD\Forge\webui\launch.py", line 47, in main
    start()
  File "D:\SD\Forge\webui\modules\launch_utils.py", line 541, in start
    import webui
  File "D:\SD\Forge\webui\webui.py", line 17, in <module>
    initialize_forge()
  File "D:\SD\Forge\webui\modules_forge\initialization.py", line 50, in initialize_forge
    import ldm_patched.modules.model_management as model_management
  File "D:\SD\Forge\webui\ldm_patched\modules\model_management.py", line 122, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
  File "D:\SD\Forge\webui\ldm_patched\modules\model_management.py", line 91, in get_torch_device
    return torch.device(torch.cuda.current_device())
  File "D:\SD\Forge\system\python\lib\site-packages\torch\cuda\__init__.py", line 769, in current_device
    _lazy_init()
  File "D:\SD\Forge\system\python\lib\site-packages\torch\cuda\__init__.py", line 298, in _lazy_init
    torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Press any key to continue . . .

Additional information

No response

Hi bro, I have exactly the same problem as you: these two errors, and I tried many different things but I still couldn't solve it. Did you maybe already find a solution?

rastarr commented 6 months ago

same here. looking for a fix. anyone?

a982865151 commented 4 months ago

[大宅男2118] 根据上面的帖子,webui-user.bat中我加上了这些参数,目没有报错了。 关闭

设置 PYTHON= 设置 GIT= 设置 VENV_DIR= 设置 COMMANDLINE_ARGS=--precision full --no-half --skip-torch-cuda-test --always-cpu

取消注释以下代码以引用现有 A1111 结帐。 set A1111_HOME=您的 A1111 结帐目录

set VENV_DIR=%A1111_HOME%/venv set COMMANDLINE_ARGS=%COMMANDLINE_ARGS% ^ --ckpt-dir %A1111_HOME%/models/Stable-diffusion ^ --hypernetwork-dir %A1111_HOME%/models/hypernetworks ^ --embeddings-dir %A1111_HOME%/embeddings ^ --lora-dir %A1111_HOME%/models/劳拉

call webui.bat 现在走到了这些界面上 Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 位 (AMD64)] 版本: f0.0.17v1.8.0rc-latest-276-ghttps://github.com/lllyasviel/stable-diffusion-webui-forge/commit/29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb77 提交哈希: 29be1da 启动带有参数的 Web UI: --precision full --no-half --skip-torch-cuda-test --always-cpu 总 VRAM 14205 MB,总 RAM 14205 MB 将 vram 状态设置为:DISABLED 设备:cpu VAE dtype:torch.float32 CUDA 流已激活:错误 警告:捕获异常“在您的系统上找不到 NVIDIA 驱动程序。请检查您是否拥有 NVIDIA GPU 并安装了 http://www.nvidia.com/Download/index.aspx' 的驱动程序,内存监视器已禁用 使用次二次优化进行交叉注意力,如果您有内存或速度问题,请尝试使用: --attention-split 下载: “https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/realisticVisionV51_v51VAE.safetensors“ 到 D:\forge\webui\models\Stable-diffusion\realisticVisionV51_v51VAE.safetensors

36%|███████████████████████████▊ |726米/1.99克 [09:25<15:50, 1.44MB/秒]