Fix downsample channels.

Reference: https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_blocks.py#L749-L756

This is usually not a problem for Stable Diffusion models. However, some
architectures such as
https://huggingface.co/OFA-Sys/small-stable-diffusion-v0 wouldn't
convert.
pull/110/head
Pedro Cuenca 1 year ago
parent fb1fa01c9d
commit 293a9acc2a

@ -376,7 +376,7 @@ class CrossAttnDownBlock2D(nn.Module):
self.resnets = nn.ModuleList(resnets)
if add_downsample:
self.downsamplers = nn.ModuleList([Downsample2D(in_channels)])
self.downsamplers = nn.ModuleList([Downsample2D(out_channels)])
else:
self.downsamplers = None

Loading…
Cancel
Save