diff --git a/modules/errors.py b/modules/errors.py index f14cfe291..0f770856f 100644 --- a/modules/errors.py +++ b/modules/errors.py @@ -71,18 +71,25 @@ def profile(profiler, msg: str): # p.print_callers(10) profiler = None lines = stream.getvalue().split('\n') - lines = [l for l in lines if ' PermutationSpec: } # VAE blocks - Unused - easyblock2 = lambda name, p: { # pylint: disable=unnecessary-lambda-assignment + easyblock2 = lambda name, p: { # pylint: disable=unnecessary-lambda-assignment, unused-variable # noqa: F841 **norm(f"{name}.norm1", p), **conv(f"{name}.conv1", p, f"P_{name}_inner"), **norm(f"{name}.norm2", f"P_{name}_inner"), @@ -45,7 +45,7 @@ def sdunet_permutation_spec() -> PermutationSpec: } # This is for blocks that use a residual connection, but change the number of channels via a Conv. - shortcutblock = lambda name, p_in, p_out: { # pylint: disable=unnecessary-lambda-assignment + shortcutblock = lambda name, p_in, p_out: { # pylint: disable=unnecessary-lambda-assignment, , unused-variable # noqa: F841 **norm(f"{name}.norm1", p_in), **conv(f"{name}.conv1", p_in, f"P_{name}_inner"), **norm(f"{name}.norm2", f"P_{name}_inner"), diff --git a/modules/processing_correction.py b/modules/processing_correction.py index c95526609..704805db4 100644 --- a/modules/processing_correction.py +++ b/modules/processing_correction.py @@ -28,7 +28,7 @@ def soft_clamp_tensor(input_tensor, threshold=0.8, boundary=4): return input_tensor -def center_tensor(input_tensor, channel_shift=1.0, full_shift=1.0, channels=[0, 1, 2, 3]): +def center_tensor(input_tensor, channel_shift=1.0, full_shift=1.0, channels=[0, 1, 2, 3]): # pylint: disable=dangerous-default-value # noqa: B006 if channel_shift == 0 and full_shift == 0: return input_tensor means = [] @@ -40,7 +40,7 @@ def center_tensor(input_tensor, channel_shift=1.0, full_shift=1.0, channels=[0, return input_tensor -def maximize_tensor(input_tensor, boundary=1.0, channels=[0, 1, 2]): +def maximize_tensor(input_tensor, boundary=1.0, channels=[0, 1, 2]): # pylint: disable=dangerous-default-value # noqa: B006 if boundary == 1.0: return input_tensor boundary *= 4 diff --git a/modules/rife/model_ifnet.py b/modules/rife/model_ifnet.py index 91598bde8..ec667425b 100644 --- a/modules/rife/model_ifnet.py +++ b/modules/rife/model_ifnet.py @@ -82,7 +82,7 @@ class IFNet(nn.Module): # self.contextnet = Contextnet() # self.unet = Unet() - def forward( self, x, timestep=0.5, scale_list=[8, 4, 2, 1], training=False, fastmode=True, ensemble=False): + def forward( self, x, timestep=0.5, scale_list=[8, 4, 2, 1], training=False, fastmode=True, ensemble=False): # pylint: disable=dangerous-default-value # noqa: B006 if training is False: channel = x.shape[1] // 2 img0 = x[:, :channel]