fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

Xformers Error

Open HaikenEdge opened this issue 1 year ago • 17 comments

Discussed in https://github.com/TheLastBen/fast-stable-diffusion/discussions/1936

Originally posted by HaikenEdge April 3, 2023 I'm getting this error when I try to run "Start Stable-Diffusion" cell of the notebook:

/usr/local/lib/python3.9/dist-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
  warnings.warn(
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 1.13.1+cu117 with CUDA 1107 (you have 2.0.0+cu118)
    Python  3.9.16 (you have 3.9.16)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details

Not sure what's causing it or how to fix it.

HaikenEdge avatar Apr 03 '23 17:04 HaikenEdge

same issue here too

blindiff avatar Apr 03 '23 17:04 blindiff

here too, latest working commit doesn't work either

Omenizer avatar Apr 03 '23 17:04 Omenizer

installing newer version of Xformer from terminal removes the error but i still get this error

/usr/local/lib/python3.9/dist-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be removed in 0.17. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional. warnings.warn(

blindiff avatar Apr 03 '23 18:04 blindiff

how about the code to run?

bayoumedic avatar Apr 03 '23 18:04 bayoumedic

https://github.com/TheLastBen/fast-stable-diffusion/issues/1935#issuecomment-1494698624

1

1 open the code in the Dependencies tab 2 insert- !pip install -U xformers --no-deps -qq 3 reinstall Dependencies 4 profit

tornado73 avatar Apr 03 '23 18:04 tornado73

#1935 (comment)

1

1 open the code in the Dependencies tab 2 insert- !pip install -U xformers --no-deps -qq 3 reinstall Dependencies 4 profit

The version I'm using doesn't seem to have a Dependencies tab.

HaikenEdge avatar Apr 03 '23 18:04 HaikenEdge

#1935 (comment) 1 1 open the code in the Dependencies tab 2 insert- !pip install -U xformers --no-deps -qq 3 reinstall Dependencies 4 profit

The version I'm using doesn't seem to have a Dependencies tab.

the meaning is the same, run it pip install -U xformers

tornado73 avatar Apr 03 '23 18:04 tornado73

Tornado, i dont see that dependices tab are you on the training module, because on the main there is no tab for that

SDPDVADER avatar Apr 03 '23 18:04 SDPDVADER

fixed

TheLastBen avatar Apr 03 '23 18:04 TheLastBen

fixed

NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

possibly related to the xformers, before update it works. now i get this

Steps: generate image 768x768 with Hi Res Fix x2 Highest i can go without receiving that error is 720x720, which is 1440x1440 in Hires. fix x2

eskaviam avatar Apr 04 '23 06:04 eskaviam

try a different model

TheLastBen avatar Apr 04 '23 09:04 TheLastBen

try a different model

So far i tried default 1.5 model, realistic vision, illuminati diffusion, all result the same error.

eskaviam avatar Apr 04 '23 11:04 eskaviam

I'm also getting the NansException exception when trying to generate large images, with or without hires fix. Seems a lot of people are too. I haven't seen a reliable fix yet. I'm prompting using the exact same prompt, model, loras, and settings as I did a few days ago.

jtran-developer avatar Apr 04 '23 11:04 jtran-developer

NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

Same, are local intallations (not on colab) having these problems? Seems like something breaks every week, but I never see people complaining anywhere else

materosx avatar Apr 04 '23 12:04 materosx

Same, are local intallations (not on colab) having these problems? Seems like something breaks every week, but I never see people complaining anywhere else

tested, no issue

eskaviam avatar Apr 05 '23 13:04 eskaviam

still having this issue after installing latest xformers.

DamascusGit avatar Apr 06 '23 01:04 DamascusGit

same issue

gostyshev-e avatar Apr 06 '23 22:04 gostyshev-e