Fix downsample channels. (#110)

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/73/head^2
Pedro Cuenca 1 year ago committed by GitHub
parent fb1fa01c9d
commit 3b24fe36a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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