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

Commandline arg for disabling "torch.backends.cudnn.benchmark" #9359

Closed
1 task done
sarahhemail opened this issue Apr 4, 2023 · 3 comments
Closed
1 task done

Commandline arg for disabling "torch.backends.cudnn.benchmark" #9359

sarahhemail opened this issue Apr 4, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@sarahhemail
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

'torch.backends.cudnn.benchmark = True' in devices.py can cause inconsistent results when re-launching the webUI.
(as described in https://pytorch.org/docs/stable/notes/randomness.html)

PNGinfo > txt2img can fail to produce a identical result. Smaller, uncomplicated promts have low chance to fail, complex promts, especially if they exceed token limit or have high emphasis are nearly impossible to reproduce 2nd time.

Integrate a command line arg to disable the benchmarking backend.

Proposed workflow

  1. Go to ....
  2. Press ....
  3. ...

Additional information

No response

@sarahhemail sarahhemail added the enhancement New feature or request label Apr 4, 2023
@vladmandic
Copy link
Collaborator

if you look at devices.py, you'll see that cudnn.benchmark is NOT enabled for all, its enabled for a very specific HW only and for a reason (due to bug where those specific old cards falsy report no fp16 ops are possible). are you having that exact HW and still want to disable it?

@sarahhemail
Copy link
Author

sarahhemail commented Apr 12, 2023

I already did disable it in the .py.
Though, it was the case for me causing non-deterministic behaviour (gtx 2080 super) upon relaunching the web ui. That I'm 100% sure off.

Thats bad if I want to XYZ re- sample a prevoius image for post processing reasons.

And since hardly anyone seems to be aware of that, I thouht it might be good idea to add a command line arg to disable it for sure.

@catboxanon
Copy link
Collaborator

catboxanon commented Aug 31, 2023

Closing this in favor of #12879 because it's actually a bug (I have two GPUs installed and the cuDNN check looks for anything with a compute cabability of 7.5). You are correct it shouldn't apply to the 20XX series either though.

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

No branches or pull requests

3 participants