Skip to content

Commit

Permalink
refactor: formatting changes ruff formatter
Browse files Browse the repository at this point in the history
ruff formatter has slight differences in formatting compared to black
  • Loading branch information
jaydrennan committed Dec 28, 2023
1 parent 7eef3bf commit 3322777
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions imaginairy/modules/diffusion/ddpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,16 +715,16 @@ def configure_optimizers(self):

def _TileModeConv2DConvForward(
self,
input_tensor: torch.Tensor,
input: torch.Tensor, # noqa
weight: torch.Tensor,
bias: torch.Tensor, # noqa
bias: torch.Tensor,
):
if self.padding_modeX == self.padding_modeY:
self.padding_mode = self.padding_modeX
return self._orig_conv_forward(input_tensor, weight, bias)
return self._orig_conv_forward(input, weight, bias)

w1 = F.pad(input_tensor, self.paddingX, mode=self.padding_modeX)
del input_tensor
w1 = F.pad(input, self.paddingX, mode=self.padding_modeX)
del input

w2 = F.pad(w1, self.paddingY, mode=self.padding_modeY)
del w1
Expand Down
10 changes: 5 additions & 5 deletions imaginairy/modules/refiners_sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@

def _tile_mode_conv2d_conv_forward(
self,
tensor_input: torch.Tensor,
input: torch.Tensor, # noqa
weight: torch.Tensor,
bias: torch.Tensor, # noqa
bias: torch.Tensor,
):
if self.padding_mode_x == self.padding_mode_y:
self.padding_mode = self.padding_mode_x
return self._orig_conv_forward(tensor_input, weight, bias)
return self._orig_conv_forward(input, weight, bias)

w1 = F.pad(tensor_input, self.padding_x, mode=self.padding_modeX)
del tensor_input
w1 = F.pad(input, self.padding_x, mode=self.padding_modeX)
del input

w2 = F.pad(w1, self.padding_y, mode=self.padding_modeY)
del w1
Expand Down

0 comments on commit 3322777

Please sign in to comment.