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

Method __init__

python/dump.py:77–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

75
76class Decoder:
77 def __init__(self):
78 sz = [(128, 256), (256, 512), (512, 512), (512, 512)]
79 self.conv_in = Conv2d(4,512,3, padding=1)
80 self.mid = Mid(512)
81
82 arr = []
83 for i,s in enumerate(sz):
84 arr.append({"block":
85 [ResnetBlock(s[1], s[0]),
86 ResnetBlock(s[0], s[0]),
87 ResnetBlock(s[0], s[0])]})
88 if i != 0: arr[-1]['upsample'] = {"conv": Conv2d(s[0], s[0], 3, padding=1)}
89 self.up = arr
90
91 self.norm_out = GroupNorm(32, 128)
92 self.conv_out = Conv2d(128, 3, 3, padding=1)
93
94 def __call__(self, x):
95 x = self.conv_in(x)

Callers

nothing calls this directly

Calls 3

GroupNormClass · 0.85
MidClass · 0.70
ResnetBlockClass · 0.70

Tested by

no test coverage detected