Skip to content

Commit 799adf4

Browse files
authored
[Single File] Fix loading for LTX 0.9.7 transformer (#11578)
update
1 parent 00f9273 commit 799adf4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/diffusers/loaders/single_file_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
"ltx-video": {"pretrained_model_name_or_path": "diffusers/LTX-Video-0.9.0"},
180180
"ltx-video-0.9.1": {"pretrained_model_name_or_path": "diffusers/LTX-Video-0.9.1"},
181181
"ltx-video-0.9.5": {"pretrained_model_name_or_path": "Lightricks/LTX-Video-0.9.5"},
182+
"ltx-video-0.9.7": {"pretrained_model_name_or_path": "Lightricks/LTX-Video-0.9.7-dev"},
182183
"autoencoder-dc-f128c512": {"pretrained_model_name_or_path": "mit-han-lab/dc-ae-f128c512-mix-1.0-diffusers"},
183184
"autoencoder-dc-f64c128": {"pretrained_model_name_or_path": "mit-han-lab/dc-ae-f64c128-mix-1.0-diffusers"},
184185
"autoencoder-dc-f32c32": {"pretrained_model_name_or_path": "mit-han-lab/dc-ae-f32c32-mix-1.0-diffusers"},
@@ -644,7 +645,10 @@ def infer_diffusers_model_type(checkpoint):
644645
model_type = "flux-schnell"
645646

646647
elif any(key in checkpoint for key in CHECKPOINT_KEY_NAMES["ltx-video"]):
647-
if checkpoint["vae.encoder.conv_out.conv.weight"].shape[1] == 2048:
648+
has_vae = "vae.encoder.conv_in.conv.bias" in checkpoint
649+
if any(key.endswith("transformer_blocks.47.scale_shift_table") for key in checkpoint):
650+
model_type = "ltx-video-0.9.7"
651+
elif has_vae and checkpoint["vae.encoder.conv_out.conv.weight"].shape[1] == 2048:
648652
model_type = "ltx-video-0.9.5"
649653
elif "vae.decoder.last_time_embedder.timestep_embedder.linear_1.weight" in checkpoint:
650654
model_type = "ltx-video-0.9.1"

0 commit comments

Comments
 (0)