BachiLi / diffvg

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

AttributeError: 'NoneType' object has no attribute 'requires_grad' #15

Closed jacobpewit closed 3 years ago

jacobpewit commented 3 years ago

When I run refine_svg.py on an svg file created with painterly_rendering.py I get the following error:

LPIPS is untested <pydiffvg.shape.ShapeGroup object at 0x000001CFC58F1BE0> Traceback (most recent call last): File "refine_svg.py", line 116, in <module> main(args) File "refine_svg.py", line 41, in main group.fill_color.requires_grad = True AttributeError: 'NoneType' object has no attribute 'requires_grad'

Commands that I used: python painterly_rendering.py mypicture.jpg --num_paths 2048 --max_width 4.0 --use_lpips_loss python refine_svg.py --use_lpips_loss mypicture.svg mypicture.jpg

Environment: Windows + Conda Any suggestions are appreciated.


EDIT: I tried again by creating the svg with painterly_rendering.py and using the --use_blob After doing that I was able to run refine_svg.py on the .svg I still don't know what the problem was however.