MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / forward

Method forward

diffusers/src/diffusers/models/adapter.py:322–338  ·  view source on GitHub ↗

r""" This method processes the input tensor `x` through the FullAdapter model and performs operations including pixel unshuffling, convolution, and a stack of AdapterBlocks. It returns a list of feature tensors, each capturing information at a different stage of processing wi

(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

320 self.total_downscale_factor = downscale_factor * 2 ** (len(channels) - 1)
321
322 def forward(self, x: torch.Tensor) -> List[torch.Tensor]:
323 r"""
324 This method processes the input tensor `x` through the FullAdapter model and performs operations including
325 pixel unshuffling, convolution, and a stack of AdapterBlocks. It returns a list of feature tensors, each
326 capturing information at a different stage of processing within the FullAdapter model. The number of feature
327 tensors in the list is determined by the number of downsample blocks specified during initialization.
328 """
329 x = self.unshuffle(x)
330 x = self.conv_in(x)
331
332 features = []
333
334 for block in self.body:
335 x = block(x)
336 features.append(x)
337
338 return features
339
340
341class FullAdapterXL(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected