mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-08 06:28:48 +00:00
fix a bug
the original code don't register the downsamper module into the parent Module.
This commit is contained in:
@@ -485,7 +485,7 @@ class DownBlock2D(nn.Module):
|
||||
self.resnets = nn.ModuleList(resnets)
|
||||
|
||||
if add_downsample:
|
||||
self.downsamplers = [Downsample2D(out_channels, out_channels=out_channels)]
|
||||
self.downsamplers = nn.ModuleList([Downsample2D(out_channels, out_channels=out_channels)])
|
||||
else:
|
||||
self.downsamplers = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user