Skip to content

Commit db91e71

Browse files
make style
1 parent 2a62aad commit db91e71

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/diffusers/models/adapter.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ def __init__(
259259

260260
def forward(self, x: torch.Tensor) -> List[torch.Tensor]:
261261
r"""
262-
This function processes the input tensor `x` through the adapter model and returns a list of feature tensors,
263-
each representing information extracted at a different scale from the input.
264-
The length of the list is determined by the number of downsample blocks in the Adapter, as specified
265-
by the `channels` and `num_res_blocks` parameters during initialization.
262+
This function processes the input tensor `x` through the adapter model and returns a list of feature tensors,
263+
each representing information extracted at a different scale from the input. The length of the list is
264+
determined by the number of downsample blocks in the Adapter, as specified by the `channels` and
265+
`num_res_blocks` parameters during initialization.
266266
"""
267267
return self.adapter(x)
268268

@@ -303,10 +303,10 @@ def __init__(
303303

304304
def forward(self, x: torch.Tensor) -> List[torch.Tensor]:
305305
r"""
306-
This method processes the input tensor `x` through the FullAdapter model and performs operations including
307-
pixel unshuffling, convolution, and a stack of AdapterBlocks. It returns a list of feature tensors, each capturing information
308-
at a different stage of processing within the FullAdapter model. The number of feature tensors in the list is determined
309-
by the number of downsample blocks specified during initialization.
306+
This method processes the input tensor `x` through the FullAdapter model and performs operations including
307+
pixel unshuffling, convolution, and a stack of AdapterBlocks. It returns a list of feature tensors, each
308+
capturing information at a different stage of processing within the FullAdapter model. The number of feature
309+
tensors in the list is determined by the number of downsample blocks specified during initialization.
310310
"""
311311
x = self.unshuffle(x)
312312
x = self.conv_in(x)
@@ -351,7 +351,7 @@ def __init__(
351351

352352
def forward(self, x: torch.Tensor) -> List[torch.Tensor]:
353353
r"""
354-
This method takes the tensor x as input and processes it through FullAdapterXL model. It consists of operations
354+
This method takes the tensor x as input and processes it through FullAdapterXL model. It consists of operations
355355
including unshuffling pixels, applying convolution layer and appending each block into list of feature tensors.
356356
"""
357357
x = self.unshuffle(x)
@@ -384,9 +384,9 @@ def __init__(self, in_channels, out_channels, num_res_blocks, down=False):
384384

385385
def forward(self, x):
386386
r"""
387-
This method takes tensor x as input and performs operations downsampling and convolutional layers if the
388-
self.downsample and self.in_conv properties of AdapterBlock model are specified. Then it applies a series
389-
of residual blocks to the input tensor.
387+
This method takes tensor x as input and performs operations downsampling and convolutional layers if the
388+
self.downsample and self.in_conv properties of AdapterBlock model are specified. Then it applies a series of
389+
residual blocks to the input tensor.
390390
"""
391391
if self.downsample is not None:
392392
x = self.downsample(x)
@@ -408,8 +408,8 @@ def __init__(self, channels):
408408

409409
def forward(self, x):
410410
r"""
411-
This method takes input tensor x and applies a convolutional layer, ReLU activation,
412-
and another convolutional layer on the input tensor. It returns addition with the input tensor.
411+
This method takes input tensor x and applies a convolutional layer, ReLU activation, and another convolutional
412+
layer on the input tensor. It returns addition with the input tensor.
413413
"""
414414
h = x
415415
h = self.block1(h)
@@ -451,8 +451,8 @@ def __init__(
451451

452452
def forward(self, x):
453453
r"""
454-
This method takes the input tensor x and performs downscaling and appends it in list of feature tensors.
455-
Each feature tensor corresponds to a different level of processing within the LightAdapter.
454+
This method takes the input tensor x and performs downscaling and appends it in list of feature tensors. Each
455+
feature tensor corresponds to a different level of processing within the LightAdapter.
456456
"""
457457
x = self.unshuffle(x)
458458

@@ -480,8 +480,8 @@ def __init__(self, in_channels, out_channels, num_res_blocks, down=False):
480480

481481
def forward(self, x):
482482
r"""
483-
This method takes tensor x as input and performs downsampling if required.
484-
Then it applies in convolution layer, a sequence of residual blocks, and out convolutional layer.
483+
This method takes tensor x as input and performs downsampling if required. Then it applies in convolution
484+
layer, a sequence of residual blocks, and out convolutional layer.
485485
"""
486486
if self.downsample is not None:
487487
x = self.downsample(x)
@@ -502,8 +502,8 @@ def __init__(self, channels):
502502

503503
def forward(self, x):
504504
r"""
505-
This function takes input tensor x and processes it through one convolutional layer, ReLU activation,
506-
and another convolutional layer and adds it to input tensor.
505+
This function takes input tensor x and processes it through one convolutional layer, ReLU activation, and
506+
another convolutional layer and adds it to input tensor.
507507
"""
508508
h = x
509509
h = self.block1(h)

0 commit comments

Comments
 (0)