ximinng / PyTorch-SVGRender

SVG Differentiable Rendering: Generating vector graphics using neural networks. Support: text-to-SVG, Image-to-SVG, SVG Editing.
https://ximinng.github.io/PyTorch-SVGRender-project/
Mozilla Public License 2.0
111 stars 7 forks source link

xFormers cuda missing #14

Closed omarirfa closed 6 months ago

omarirfa commented 6 months ago

Hi Ximing and team!

There was a small problem after running svgdreamer on ubuntu 22.04. I got a warning and error from xFormers that it could not load CUDA extensions. Please see the images below:

xFormers warning: Screenshot from 2024-03-09 21-08-05

xFormers error: image

It gave this error saying xFormers was not built with CUDA support. After, further investigating the warning it seems it was because of the cudatoolkit I had installed globally which is 12.1. Instead of downgrading the cudatoolkit, I just installed the development libraries for xFormers which supports cudatookit 12.

To avoid anyone else facing the same issue, this pull request adds pip install --pre -U xformers as a commented line in the install.sh script and I have also added this in the FAQ section of the readme.

I have tested this and this works, heres an image of it working:

image

ximinng commented 6 months ago

Thank you for your pull request.