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

Method __init__

scripts/convert_consistency_decoder.py:277–285  ·  view source on GitHub ↗
(self, in_channels=320)

Source from the content-addressed store, hash-verified

275# Also ConvResblock
276class Downsample(nn.Module):
277 def __init__(self, in_channels=320) -> None:
278 super().__init__()
279 self.f_t = nn.Linear(1280, in_channels * 2)
280
281 self.gn_1 = nn.GroupNorm(32, in_channels)
282 self.f_1 = nn.Conv2d(in_channels, in_channels, kernel_size=3, padding=1)
283 self.gn_2 = nn.GroupNorm(32, in_channels)
284
285 self.f_2 = nn.Conv2d(in_channels, in_channels, kernel_size=3, padding=1)
286
287 def forward(self, x, t) -> torch.Tensor:
288 x_skip = x

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected