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

Method __init__

src/diffusers/models/attention_processor.py:1806–1814  ·  view source on GitHub ↗
(
        self,
        f_channels: int,
        zq_channels: int,
    )

Source from the content-addressed store, hash-verified

1804 """
1805
1806 def __init__(
1807 self,
1808 f_channels: int,
1809 zq_channels: int,
1810 ):
1811 super().__init__()
1812 self.norm_layer = nn.GroupNorm(num_channels=f_channels, num_groups=32, eps=1e-6, affine=True)
1813 self.conv_y = nn.Conv2d(zq_channels, f_channels, kernel_size=1, stride=1, padding=0)
1814 self.conv_b = nn.Conv2d(zq_channels, f_channels, kernel_size=1, stride=1, padding=0)
1815
1816 def forward(self, f: torch.FloatTensor, zq: torch.FloatTensor) -> torch.FloatTensor:
1817 f_size = f.shape[-2:]

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected