Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diffvg / pydiffvg on Colab? #75

Open
gnmarten opened this issue Dec 18, 2023 · 2 comments
Open

diffvg / pydiffvg on Colab? #75

gnmarten opened this issue Dec 18, 2023 · 2 comments

Comments

@gnmarten
Copy link

I would be grateful for for an updated Google colab file that shows how to install/compile/run diffvg (if at all possible atm)

All extant colab files floating around on Github/the internet & utilising diffvg AFAIK no longer work due to

  • Python version bumps
  • broken dependencies
  • conda activation changes, ...
  • or result in the dreaded "no module pydiffvg"
  • or "module 'diffvg' has no attribute 'set_print_timing'"

Some of the previous solutions don't/no longer work on Colab:

Thanks in advance.

@tristanryerparke
Copy link

I commented out the following line (134) in CMakeLists.txt on my fork:
find_package(TensorFlow)
Then installing on colab works for me with this cell:

!pip install svgwrite svgpathtools cssutils numba torch-tools visdom drawsvg
%cd /content/
!git clone https://github.com/tristanryerparke/diffvg
%cd diffvg
!git submodule update --init --recursive
!python setup.py install

import os
try:
  import pydiffvg
except:
  os.kill(os.getpid(), 9)

Keep in mind I'm only using diffvg with pytorch here, but running this cell (sometimes twice) works for me on colab.

@JaeDukSeo
Copy link

good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants