Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/diffusers/models/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ def __init__(self, channels, use_conv=False, use_conv_transpose=False, out_chann
elif use_conv:
self.conv = nn.Conv1d(self.channels, self.out_channels, 3, padding=1)

def forward(self, x):
assert x.shape[1] == self.channels
def forward(self, inputs):
assert inputs.shape[1] == self.channels
if self.use_conv_transpose:
return self.conv(x)
return self.conv(inputs)

x = F.interpolate(x, scale_factor=2.0, mode="nearest")
outputs = F.interpolate(inputs, scale_factor=2.0, mode="nearest")

if self.use_conv:
x = self.conv(x)
outputs = self.conv(outputs)

return x
return outputs


class Downsample1D(nn.Module):
Expand Down