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

Method forward

src/diffusers/models/autoencoders/vae.py:421–429  ·  view source on GitHub ↗

r"""The forward method of the `MaskConditionEncoder` class.

(self, x: torch.FloatTensor, mask=None)

Source from the content-addressed store, hash-verified

419 self.layers = nn.Sequential(*layers)
420
421 def forward(self, x: torch.FloatTensor, mask=None) -> torch.FloatTensor:
422 r"""The forward method of the `MaskConditionEncoder` class."""
423 out = {}
424 for l in range(len(self.layers)):
425 layer = self.layers[l]
426 x = layer(x)
427 out[str(tuple(x.shape))] = x
428 x = torch.relu(x)
429 return out
430
431
432class MaskConditionDecoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected