MCPcopy Create free account
hub / github.com/Gadersd/stable-diffusion-burn / __init__

Method __init__

python/dump.py:55–60  ·  view source on GitHub ↗
(self, in_channels, out_channels=None)

Source from the content-addressed store, hash-verified

53
54class ResnetBlock:
55 def __init__(self, in_channels, out_channels=None):
56 self.norm1 = GroupNorm(32, in_channels)
57 self.conv1 = Conv2d(in_channels, out_channels, 3, padding=1)
58 self.norm2 = GroupNorm(32, out_channels)
59 self.conv2 = Conv2d(out_channels, out_channels, 3, padding=1)
60 self.nin_shortcut = Conv2d(in_channels, out_channels, 1) if in_channels != out_channels else lambda x: x
61
62 def __call__(self, x):
63 h = self.conv1(self.norm1(x).swish())

Callers

nothing calls this directly

Calls 1

GroupNormClass · 0.85

Tested by

no test coverage detected