Skip to content

Commit a7b0047

Browse files
some clean up
1 parent dcb9070 commit a7b0047

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/diffusers/models/resnet.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def forward(self, x):
175175

176176

177177
# unet.py, unet_grad_tts.py, unet_ldm.py, unet_glide.py, unet_score_vde.py
178+
# => All 2D-Resnets are included here now!
178179
class ResnetBlock(nn.Module):
179180
def __init__(
180181
self,
@@ -317,9 +318,6 @@ def __init__(
317318
num_groups = min(in_ch // 4, 32)
318319
num_groups_out = min(out_ch // 4, 32)
319320
temb_dim = temb_channels
320-
# output_scale_factor = np.sqrt(2.0)
321-
# non_linearity = "silu"
322-
# use_nin_shortcut = in_channels != out_channels or use_nin_shortcut = True
323321

324322
self.GroupNorm_0 = nn.GroupNorm(num_groups=num_groups, num_channels=in_ch, eps=eps)
325323
self.up = up
@@ -337,13 +335,9 @@ def __init__(
337335
# 1x1 convolution with DDPM initialization.
338336
self.Conv_2 = conv2d(in_ch, out_ch, kernel_size=1, padding=0)
339337

340-
# self.skip_rescale = skip_rescale
341338
self.in_ch = in_ch
342339
self.out_ch = out_ch
343340

344-
# TODO(Patrick) - move to main init
345-
self.is_overwritten = False
346-
347341
def set_weights_grad_tts(self):
348342
self.conv1.weight.data = self.block1.block[0].weight.data
349343
self.conv1.bias.data = self.block1.block[0].bias.data

0 commit comments

Comments
 (0)