MCPcopy Create free account
hub / github.com/huggingface/diffusers / forward

Method forward

src/diffusers/models/adapter.py:421–435  ·  view source on GitHub ↗

r""" This method takes tensor x as input and performs operations downsampling and convolutional layers if the self.downsample and self.in_conv properties of AdapterBlock model are specified. Then it applies a series of residual blocks to the input tensor.

(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

419 )
420
421 def forward(self, x: torch.Tensor) -> torch.Tensor:
422 r"""
423 This method takes tensor x as input and performs operations downsampling and convolutional layers if the
424 self.downsample and self.in_conv properties of AdapterBlock model are specified. Then it applies a series of
425 residual blocks to the input tensor.
426 """
427 if self.downsample is not None:
428 x = self.downsample(x)
429
430 if self.in_conv is not None:
431 x = self.in_conv(x)
432
433 x = self.resnets(x)
434
435 return x
436
437
438class AdapterResnetBlock(nn.Module):

Callers

nothing calls this directly

Calls 1

downsampleMethod · 0.80

Tested by

no test coverage detected