-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Description
diffusers/src/diffusers/models/unet_blocks.py
Line 619 in 9bca402
| in_channels, use_conv=True, out_channels=out_channels, padding=downsample_padding, name="op" |
All the frist parameters of Downsample2D-like classes in self.downsamplers are in_channels.
However, the inputs of these self.downsamplers are the outputs of Resnets, whose number of channels should be out_channels.
Though these wrong parameters do not affect the results, since in_channels is assigned as out_channels in Resnet iteration:
diffusers/src/diffusers/models/unet_blocks.py
Line 597 in 9bca402
| in_channels = in_channels if i == 0 else out_channels |
By the way, the first parameters of Upsample2D-like classes are out_channels, which is correct I think:
diffusers/src/diffusers/models/unet_blocks.py
Line 1200 in 9bca402
| self.upsamplers = nn.ModuleList([Upsample2D(out_channels, use_conv=True, out_channels=out_channels)]) |