Skip to content

19.09.2024 AssertionError: Torch not compiled with CUDA enabled. An attempt to use ZLUDA for Stable Diffusion on windows. #34

Description

@Harbitos

Trying to solve the bug (which is open here - #33), I tried to install HIP SDK 5 with RocblasLibs libraries following the instructions from here - https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU I noticed another mistake that I had never seen before. I tried to install it earlier, but there was an error with rocblas, so I used --directml and everything worked for me.

All the characteristics and the problem that started it all are described here - #33
In that error, --directml stopped helping me, I decided to try --use-zluda.

And another question for everyone: has anyone ever run Stable Diffusion Forge with --use-zluda on windows?

venv "C:\Users\user\Desktop\Stable Diffusion Forge\stable-diffusion-webui-amdgpu-forge\venv\Scripts\Python.exe"
WARNING: ZLUDA works best with SD.Next. Please consider migrating to SD.Next.
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: f2.0.1v1.10.1-1.10.1
Commit hash: 412c2d800dcae4cee8a7466a1e9128cfbbc5bf26
Using ZLUDA in C:\Users\user\Desktop\Stable Diffusion Forge\stable-diffusion-webui-amdgpu-forge\.zluda
Traceback (most recent call last):
  File "C:\Users\user\Desktop\Stable Diffusion Forge\stable-diffusion-webui-amdgpu-forge\launch.py", line 58, in <module>
    main()
  File "C:\Users\user\Desktop\Stable Diffusion Forge\stable-diffusion-webui-amdgpu-forge\launch.py", line 46, in main
    prepare_environment()
  File "C:\Users\user\Desktop\Stable Diffusion Forge\stable-diffusion-webui-amdgpu-forge\modules\launch_utils.py", line 608, in prepare_environment
    from modules import devices
  File "C:\Users\user\Desktop\Stable Diffusion Forge\stable-diffusion-webui-amdgpu-forge\modules\devices.py", line 3, in <module>
    from backend import memory_management
  File "C:\Users\user\Desktop\Stable Diffusion Forge\stable-diffusion-webui-amdgpu-forge\backend\memory_management.py", line 133, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
  File "C:\Users\user\Desktop\Stable Diffusion Forge\stable-diffusion-webui-amdgpu-forge\backend\memory_management.py", line 100, in get_torch_device
    return torch.device(torch.cuda.current_device())
  File "C:\Users\user\Desktop\Stable Diffusion Forge\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\cuda\__init__.py", line 778, in current_device
    _lazy_init()
  File "C:\Users\user\Desktop\Stable Diffusion Forge\stable-diffusion-webui-amdgpu-forge\venv\lib\site-packages\torch\cuda\__init__.py", line 284, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
Press any key to continue . . .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions