Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: --device-id pointing to second GPU causes error #395

Open
3 of 6 tasks
NSilviaS15 opened this issue Feb 25, 2024 · 3 comments
Open
3 of 6 tasks

[Bug]: --device-id pointing to second GPU causes error #395

NSilviaS15 opened this issue Feb 25, 2024 · 3 comments

Comments

@NSilviaS15
Copy link

NSilviaS15 commented Feb 25, 2024

Checklist

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

What happened?

txt2img with --device-id 1 raises PDHError

System with 2 Vega 56's, GPU0 and GPU1

today my old install from last year downloaded something itself and broke, whatever
moved it somewhere else, then reinstalled from scratch (601f7e3)

COMMANDLINE_ARGS= --use-directml
uses GPU0, runs as usual, generates image

COMMANDLINE_ARGS= --use-directml --device-id 0
uses GPU0, runs as usual, generates image

COMMANDLINE_ARGS= --use-directml --device-id 1
uses GPU1, 4.8gb of things seem to be loaded into the GPU memory according to task manager, no black preview or image, just PDHError in 0.4s

Steps to reproduce the problem

  1. git clone this repo
  2. add --use-directml to COMMANDLINE_ARGS in webui-user.bat
  3. run first time, let it install stuff and close
  4. change COMMANDLINE_ARGS then run webui-user.bat
  5. go to txt2img, default settings, prompt 'car'

What should have happened?

Using the second GPU probably shouldn't cause an error if it works on the first one

What browsers do you use to access the UI ?

No response

Sysinfo

sysinfo-2024-02-25-04-06.json

Console logs

See attached files in "Additional information"

Additional information

XFX Vega 56 Double *2
AMD Pro 22Q4 drivers
Installed on a U.2 SSD (not boot drive)
Console logs attached as files
logs-no-device-id.txt
logs-device-id-0.txt
logs-device-id-1.txt

this comment seems to be related
#234 (comment)

--device-id 1 breaks on all DirectML memory stats providers "None", "atiadlxx" or "Performance Counter"

by the way, the old webui does launch and work on both GPUs except every image is now black with no preview, it was working as of yesterday
Edit: Ignore this part, I'm dumb, found why

@Ronin1mil
Copy link

If you're still having issues see if my solution fixes it. #234 (comment)

@NSilviaS15
Copy link
Author

Yep, that fixes it. All three DirectML memory stats provider settings seem to work without errors in the console.
My guess why that happens is when you use a device id, it only sees that device as "device 0". When it's the actual GPU 0 it just so happens to line up and not break, while any other id would probably trigger this.

@dfmjndm
Copy link

dfmjndm commented Mar 11, 2024

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants