csslc / CCSR

Official codes of CCSR: Improving the Stability of Diffusion Models for Content Consistent Super-Resolution
https://csslc.github.io/project-CCSR/
390 stars 30 forks source link

Issues with `smallkF` in xFormers: CUDA Support and Operator Build Errors #13

Closed Limbicnation closed 5 months ago

Limbicnation commented 5 months ago

I am encountering multiple issues with smallkF in the xFormers library. The problems seem to arise from a combination of CUDA support, operator build, and embed per head size. Below are the specific error messages and my current setup:

`smallkF` is not supported because:
    max(query.shape[-1] != value.shape[-1]) > 32
    xFormers wasn't build with CUDA support
    operator wasn't built - see `python -m xformers.info` for more info
    unsupported embed per head: 512
csslc commented 5 months ago

Hi, I have not encountered this problem. You can refer to these three pages (the first, the second and the third).

Limbicnation commented 5 months ago

Originally posted by @csslc in https://github.com/csslc/CCSR/issues/10#issuecomment-1906166808

I could resolved the issue successfully by executing the following commands:

pip uninstall pytorch-lightning torch torchvision torchmetrics
pip install torch==2.0.1+cu118 -f https://download.pytorch.org/whl/torch_stable.html
pip install torchvision==0.15.2+cu118 -f https://download.pytorch.org/whl/torch_stable.html
pip install torchmetrics==0.6.0
pip install pytorch-lightning==1.4.2
pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu118

Thanks!