aboutsummaryrefslogtreecommitdiffstats
path: root/modules/esrgan_model_arch.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-10 05:25:25 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-05-10 05:25:25 +0000
commit96d6ca4199e7c5eee8d451618de5161cea317c40 (patch)
tree8f101a345bcd1d66f4047b5e20918e2058e4dc7c /modules/esrgan_model_arch.py
parent762265eab58cdb8f2d6398769bab43d8b8db0075 (diff)
downloadstable-diffusion-webui-gfx803-96d6ca4199e7c5eee8d451618de5161cea317c40.tar.gz
stable-diffusion-webui-gfx803-96d6ca4199e7c5eee8d451618de5161cea317c40.tar.bz2
stable-diffusion-webui-gfx803-96d6ca4199e7c5eee8d451618de5161cea317c40.zip
manual fixes for ruff
Diffstat (limited to 'modules/esrgan_model_arch.py')
-rw-r--r--modules/esrgan_model_arch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/esrgan_model_arch.py b/modules/esrgan_model_arch.py
index 6071fea7..7f8bc7c0 100644
--- a/modules/esrgan_model_arch.py
+++ b/modules/esrgan_model_arch.py
@@ -438,9 +438,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':