Skip to content

Commit

Permalink
fix(api): move imports of patches modules into function
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Mar 18, 2023
1 parent fc9245f commit c943a55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/onnx_web/convert/upscale_resrgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
from os import path

import torch
from basicsr.archs.rrdbnet_arch import RRDBNet
from realesrgan.archs.srvgg_arch import SRVGGNetCompact
from torch.onnx import export

from .utils import ConversionContext, ModelDict
Expand All @@ -19,6 +17,9 @@ def convert_upscale_resrgan(
model: ModelDict,
source: str,
):
from basicsr.archs.rrdbnet_arch import RRDBNet
from realesrgan.archs.srvgg_arch import SRVGGNetCompact

name = model.get("name")
source = source or model.get("source")
scale = model.get("scale")
Expand Down

0 comments on commit c943a55

Please sign in to comment.