diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-10 21:24:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-10 21:24:18 +0300 |
commit | 5abecea34cd98537f006c5e9a197acd1fe9db023 (patch) | |
tree | 98248bc21aa4ad9715205f0a65a654532c6cfcc0 /modules/esrgan_model_arch.py | |
parent | f5ea1e9d928e0d45b3ebcd8ddd1cacbc6a96e184 (diff) | |
parent | 3ec7b705c78b7aca9569c92a419837352c7a4ec6 (diff) |
Merge pull request #10259 from AUTOMATIC1111/ruff
Ruff
Diffstat (limited to 'modules/esrgan_model_arch.py')
-rw-r--r-- | modules/esrgan_model_arch.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/esrgan_model_arch.py b/modules/esrgan_model_arch.py index 6071fea7..4de9dd8d 100644 --- a/modules/esrgan_model_arch.py +++ b/modules/esrgan_model_arch.py @@ -2,7 +2,6 @@ from collections import OrderedDict
import math
-import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
@@ -438,9 +437,11 @@ def conv_block(in_nc, out_nc, kernel_size, stride=1, dilation=1, groups=1, bias= padding = padding if pad_type == 'zero' else 0
if convtype=='PartialConv2D':
+ from torchvision.ops import PartialConv2d # this is definitely not going to work, but PartialConv2d doesn't work anyway and this shuts up static analyzer
c = PartialConv2d(in_nc, out_nc, kernel_size=kernel_size, stride=stride, padding=padding,
dilation=dilation, bias=bias, groups=groups)
elif convtype=='DeformConv2D':
+ from torchvision.ops import DeformConv2d # not tested
c = DeformConv2d(in_nc, out_nc, kernel_size=kernel_size, stride=stride, padding=padding,
dilation=dilation, bias=bias, groups=groups)
elif convtype=='Conv3D':
|