Skip to content

Commit 3b24fe3

Browse files
authored
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.
1 parent fb1fa01 commit 3b24fe3

File tree

1 file changed

+1
-1
lines changed
  • python_coreml_stable_diffusion

1 file changed

+1
-1
lines changed

python_coreml_stable_diffusion/unet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def __init__(
376376
self.resnets = nn.ModuleList(resnets)
377377

378378
if add_downsample:
379-
self.downsamplers = nn.ModuleList([Downsample2D(in_channels)])
379+
self.downsamplers = nn.ModuleList([Downsample2D(out_channels)])
380380
else:
381381
self.downsamplers = None
382382

0 commit comments

Comments
 (0)