MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / forward

Method forward

src/diffusers/models/adapter.py:500–513  ·  view source on GitHub ↗

r""" This method takes the input tensor x and performs downscaling and appends it in list of feature tensors. Each feature tensor corresponds to a different level of processing within the LightAdapter.

(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

498 self.total_downscale_factor = downscale_factor * (2 ** len(channels))
499
500 def forward(self, x: torch.Tensor) -> List[torch.Tensor]:
501 r"""
502 This method takes the input tensor x and performs downscaling and appends it in list of feature tensors. Each
503 feature tensor corresponds to a different level of processing within the LightAdapter.
504 """
505 x = self.unshuffle(x)
506
507 features = []
508
509 for block in self.body:
510 x = block(x)
511 features.append(x)
512
513 return features
514
515
516class LightAdapterBlock(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected