Skip to content

Commit 0cc1905

Browse files
committed
update conversion script
1 parent 1fdebea commit 0cc1905

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

scripts/convert_ltx_to_diffusers.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ def get_vae_config(version: str) -> Dict[str, Any]:
268268
"scaling_factor": 1.0,
269269
"encoder_causal": True,
270270
"decoder_causal": False,
271+
"spatial_compression_ratio": 32,
272+
"temporal_compression_ratio": 8,
271273
}
272274
VAE_KEYS_RENAME_DICT.update(VAE_095_RENAME_DICT)
273275
return config
@@ -346,13 +348,16 @@ def get_args():
346348
for param in text_encoder.parameters():
347349
param.data = param.data.contiguous()
348350

349-
scheduler = FlowMatchEulerDiscreteScheduler(
350-
use_dynamic_shifting=True,
351-
base_shift=0.95,
352-
max_shift=2.05,
353-
base_image_seq_len=1024,
354-
max_image_seq_len=4096,
355-
shift_terminal=0.1,
351+
if args.version == "0.9.5":
352+
scheduler = FlowMatchEulerDiscreteScheduler(use_dynamic_shifting=False)
353+
else:
354+
scheduler = FlowMatchEulerDiscreteScheduler(
355+
use_dynamic_shifting=True,
356+
base_shift=0.95,
357+
max_shift=2.05,
358+
base_image_seq_len=1024,
359+
max_image_seq_len=4096,
360+
shift_terminal=0.1,
356361
)
357362

358363
pipe = LTXPipeline(

0 commit comments

Comments
 (0)