From b3b10b474649d6688c4aba8277373292c5090341 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sat, 18 Feb 2023 08:46:46 -0600 Subject: [PATCH] apply lint --- api/onnx_web/chain/upscale_resrgan.py | 2 +- api/onnx_web/onnx/onnx_net.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/onnx_web/chain/upscale_resrgan.py b/api/onnx_web/chain/upscale_resrgan.py index b0e618f1..4ee8438f 100644 --- a/api/onnx_web/chain/upscale_resrgan.py +++ b/api/onnx_web/chain/upscale_resrgan.py @@ -46,7 +46,7 @@ def load_resrgan( sess_options=device.sess_options(), ) elif params.format == "pth": - if TAG_X4_V3 in model_file: + if TAG_X4_V3 in model_file: # the x4-v3 model needs a different network model = SRVGGNetCompact( num_in_ch=3, diff --git a/api/onnx_web/onnx/onnx_net.py b/api/onnx_web/onnx/onnx_net.py index f6001f62..bf0cf524 100644 --- a/api/onnx_web/onnx/onnx_net.py +++ b/api/onnx_web/onnx/onnx_net.py @@ -57,9 +57,7 @@ class OnnxNet: def __call__(self, image: Any) -> Any: input_name = self.session.get_inputs()[0].name output_name = self.session.get_outputs()[0].name - output = self.session.run([output_name], { - input_name: image.cpu().numpy() - })[0] + output = self.session.run([output_name], {input_name: image.cpu().numpy()})[0] return OnnxTensor(output) def eval(self) -> None: