BachiLi / diffvg

Differentiable Vector Graphics Rasterization
https://people.csail.mit.edu/tzumao/diffvg/
Apache License 2.0
902 stars 152 forks source link

pip list shows diffvg but not pydiffvg #35

Open caseybasichis opened 2 years ago

caseybasichis commented 2 years ago

Attempting to install on Linux/RTXA6000. I was only able to get the card working with newer versions of torch.

I see an error during install about cudnn 8, but then it seem to finish the install.

import throws a module missing error.

I'm very excited to work with diffvg, but I've read the install only works for old versions. Any idea how to get past this?

diffvg_install_error.txt

caseybasichis commented 2 years ago

I didn't have cuDNN installed. I no longer get that error, and it seems to build the GPU version without issue, but it still doesn't seem to install pydiffvg.

Any ideas what I might be doing diff_vg_install_2.txt ?

EDIT: pip list shows diffvg but not pydiffvg... I'm guessing diffvg is not the right module?

>>> diffvg.set_use_gpu(torch.cuda.is_available())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'diffvg' has no attribute 'set_use_gpu'
>>> rect = diffvg.Rect(p_min=torch.tensor([40.0, 40.0]), p_max = torch.tensor([160.0, 160.0]))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. diffvg.Rect(arg0: diffvg.Vector2f, arg1: diffvg.Vector2f)

Invoked with: kwargs: p_min=tensor([40., 40.]), p_max=tensor([160., 160.])
caseybasichis commented 2 years ago

Hi, I am still completely unable to get this repo installed.

Any help would be greatly appreciated.

flono commented 2 years ago

Hello,

for me it only shows diffvg as an installed package, but I am able to execute the scripts from the /apps folder of the repository and import pydiffvg. I can import both diffvg and pydiffvg. Have you tried doing that? I dont think "conda list" or "pip list" are reliable indicators of an installed package in this special case.

cheers

ajmeese7 commented 2 years ago

@caseybasichis were you ever able to overcome this? I am running into the same set_use_gpu error that you mentioned currently

caseybasichis commented 2 years ago

@caseybasichis were you ever able to overcome this? I am running into the same set_use_gpu error that you mentioned currently

Sort of.

My understanding is that Python must be run from within the DiffVG directory. It doesn't have an install and is sensitive to the location?

Criminal.

If you find out otherwise, please let me know!

kepurG commented 1 week ago

I spent days and nights to complete the diffvg compilation on Windows. If anyone wants the wheels, you can contact me +V13862010554. Let's create a group to communicate and exchange about the improvements based on the module together.