Skip to content

Commit

Permalink
fix(precomputed): do not copy input to cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
julianhoever committed Oct 6, 2023
1 parent 95954c2 commit 586b774
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def forward(ctx: Any, *args: Any, **kwargs: Any) -> torch.Tensor:
raise ValueError(
f"Number of steps cannot be less than or equal to 1 (steps == {steps})."
)
x = x.cpu().to(torch.float32)
x = x.to(torch.float32)
x = x.clamp(min=step_lut.min(), max=step_lut.max())

for step_idx in range(1, len(step_lut)):
Expand Down

0 comments on commit 586b774

Please sign in to comment.