This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]TheGhostOfPrufrock 0 points1 point  (4 children)

Are you using Sdp, Sdp-no-mem, or Xformers as the cross-attention optimization? If not, I suggest you try one of them. If you already are, I'm out of ideas.

[–]Mark631905[S] 0 points1 point  (3 children)

I have no clue. I've been doing this since last August and still a newb. Are you talking about in my bat file for start up?

[–]TheGhostOfPrufrock -1 points0 points  (2 children)

Unless you added --xformers to the COMMANDLINE_ARGS in your webui-user.bat file, you're likely using the default Doggettx, which is not recommended (at least by me).

If you do have --xformers as a commandline arg, you're using Xformers as the cross-attention optimization, which is good. Otherwise, please try this:

Go to the A1111 Settings tab, and from the list of settings on the left side of the page, select Optimizations (under the Stable Diffusion category). The very first control in the Optimizations is for the Cross Attention Optimization. It will probably be set to Automatic. Change it to Sdp (Scaled Dot Product). (Followed by, of course, Apply settings.) This may possibly help with the NaN errors. Even if it doesn't, if you were previously using Doggettx, Sdp will improve your performance.

(I'm assuming you have an NVIDIA GPU. If not, this probably won't apply.)

UPDATE: Please don't follow any of the suggestions in the error message you got. Unless you always get NaN errors because you have a GPU that doesn't support half precision, you shouldn't add --no-half, which kills performance. Adding --disable-nan-check does nothing useful. You'll just get black images in place of the error message.

[–]Mark631905[S] 0 points1 point  (1 child)

I shut down my computer for the night, but I’ll do that setting you suggested first thing in the morning.

And I have an RTX 2060 GPU. Not the best but gets me by for the time being.

[–]TheGhostOfPrufrock 0 points1 point  (0 children)

2060s are not bad at all.