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

[Bug]: zluda object is not subscriptable

Open lands39 opened this issue 8 months ago • 7 comments

Checklist

  • [x] 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
  • [x] 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?

Finally got webui working and wanted to try zluda instead of directml so i added --use-zluda. i get the error "zluda object is not subscriptable" and it drops to CPU-only mode. directml still functions as intended.

Steps to reproduce the problem

  1. Attempt to enable zluda with --use-zluda
  2. start webui
  3. receive error "zluda object is not subscriptable"

What should have happened?

zluda should have installed.

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

sysinfo-2025-04-23-20-29.json

Console logs

zluda object is not subscriptable

Additional information

No response

lands39 avatar Apr 23 '25 20:04 lands39

Hey, whats your GPU? For Zluda you need to have HIP SDK installed first. To switch to Zluda you have to remove all other launch args and only add: --use-zluda --skip-ort If you have 8gb vram you also need to add --medvram-sdxl Then you need to open up a cmd and run pip cache purge Then you need to delete the venv folder and then relaunch the webui-user.bat

If your GPU is not a 7000 series GPU, you also need custom GFX files for Zluda to work. A complete Setup Guide can be found here: https://github.com/CS1o/Stable-Diffusion-Info/wiki/Webui-Installation-Guides

CS1o avatar Apr 24 '25 20:04 CS1o

6650XT, i tried following the guide (from what i understand adding the flags = auto install?) but it didn't work

lands39 avatar Apr 24 '25 21:04 lands39

No, just adding the flags wont help, as you need to do more (installing hip sdk 6.2, downloading the correct GFX library files) to get it run. Take a look at the Automatic1111 with Zluda Guide and set it up as seperate instance.

CS1o avatar Apr 24 '25 21:04 CS1o

it probably isn't worth doing if this is gonna require a ton of effort, how much better would zluda perform vs directml? i was having trouble following the guide, i was doing what it said but it was throwing that error

lands39 avatar Apr 24 '25 21:04 lands39

Oh its really worth, Zluda is like 2-4 times faster and uses less vram at the same time. You can easily use sdxl models with it and also upscaling is faster and it doesnt run out of vram all the time like directml. Its not to difficult to setup if you read it carefully. But if you have a question about the setup you can add me in discord if needed. (Same Name as here)

CS1o avatar Apr 24 '25 21:04 CS1o

can i make a copy of my existing install, wipe out venv, add the zluda flags and try it that way? i have slow internet and really don't wanna redownload everything again, and i don't have spece for a seperate sd instance. i'd like to just make two different batch files, one for directml and one for zluda. is that possible?

lands39 avatar Apr 25 '25 01:04 lands39

Hmm there is no point in using DirectML over Zluda. There is nothing better in DirectML, it even has more restrictions. The venv has to be seperate for both as Zluda uses a newer Torch Version. But its possible if you copy the webui-user.bat then rename it to Start-Zluda.bat, edit it, add the correct launch args --use-zluda --skip-ort --medvram-sdxl and at the line set VENV_DIR=venv_zluda Then launch the Start-Zluda.bat This will create a seperate venv for zluda.

CS1o avatar Apr 25 '25 06:04 CS1o