Skip to content

Commit

Permalink
Merge pull request #8 from abhaybd/fix-from-torch
Browse files Browse the repository at this point in the history
Fix bug in from_torch method
  • Loading branch information
zhenjia-xu authored Dec 19, 2024
2 parents 1022574 + c2e934d commit 85f1d87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion genesis/grad/creation_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def from_torch(torch_tensor, dtype=None, requires_grad=False, detach=True, scene
)
requires_grad = True

gs_tensor = Tensor(torch_tensor.to(gs.device).to(dtype), scene=scene).clone()
gs_tensor = Tensor(torch_tensor.to(device=gs.device, dtype=dtype), scene=scene).clone()

if detach:
gs_tensor = gs_tensor.detach(sceneless=False)
Expand Down

0 comments on commit 85f1d87

Please sign in to comment.