Skip to content

Commit 9f10c54

Browse files
Fix sample size conversion script (#1408)
up
1 parent 5c10e68 commit 9f10c54

File tree

2 files changed

+2
-71
lines changed

2 files changed

+2
-71
lines changed

scripts/convert_original_stable_diffusion_to_diffusers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ def create_unet_diffusers_config(original_config):
211211
"""
212212
Creates a config for the diffusers based on the config of the LDM model.
213213
"""
214+
model_params = original_config.model.params
214215
unet_params = original_config.model.params.unet_config.params
215216

216217
block_out_channels = [unet_params.model_channels * mult for mult in unet_params.channel_mult]
@@ -230,7 +231,7 @@ def create_unet_diffusers_config(original_config):
230231
resolution //= 2
231232

232233
config = dict(
233-
sample_size=unet_params.image_size,
234+
sample_size=model_params.image_size,
234235
in_channels=unet_params.in_channels,
235236
out_channels=unet_params.out_channels,
236237
down_block_types=tuple(down_block_types),

v1-inference.yaml

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)