Skip to content

Commit

Permalink
fix(api): put conversion RNG on training device (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 22, 2023
1 parent 246aa3d commit abc1ae5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/onnx_web/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def convert_real_esrgan(name: str, url: str, scale: int, opset: int):
model.to(training_device).train(False)
model.eval()

rng = torch.rand(1, 3, 64, 64)
rng = torch.rand(1, 3, 64, 64, device=map_location)
input_names = ['data']
output_names = ['output']
dynamic_axes = {'data': {2: 'width', 3: 'height'},
Expand Down Expand Up @@ -134,7 +134,7 @@ def convert_gfpgan(name: str, url: str, scale: int, opset: int):
model.to(training_device).train(False)
model.eval()

rng = torch.rand(1, 3, 64, 64)
rng = torch.rand(1, 3, 64, 64, device=map_location)
input_names = ['data']
output_names = ['output']
dynamic_axes = {'data': {2: 'width', 3: 'height'},
Expand Down

0 comments on commit abc1ae5

Please sign in to comment.