From 81bb7dde8ca6da07434f0bd38524b3b4833583fb Mon Sep 17 00:00:00 2001 From: Oren Katzir Date: Mon, 9 Jan 2023 09:25:35 +0200 Subject: [PATCH] Convert arc points to torch.float --- pydiffvg/shape.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydiffvg/shape.py b/pydiffvg/shape.py index a87e9e5..707a6ed 100644 --- a/pydiffvg/shape.py +++ b/pydiffvg/shape.py @@ -164,7 +164,7 @@ def from_svg_path(path_str, shape_to_canvas = torch.eye(3), force_close = False) assert(e.end.imag == points[0][1]) else: points.append((e.end.real, e.end.imag)) - points = torch.tensor(points) + points = torch.tensor(points, dtype=torch.float) points = torch.cat((points, torch.ones([points.shape[0], 1])), dim = 1) @ torch.transpose(shape_to_canvas, 0, 1) points = points / points[:, 2:3] points = points[:, :2].contiguous()