compatibility patch (#1363)

This commit is contained in:
Zhongjie Duan
2026-03-23 11:24:49 +08:00
committed by GitHub
parent 078fc551d9
commit 5bccd60c80
2 changed files with 10 additions and 0 deletions

View File

@@ -604,6 +604,13 @@ z_image_series = [
"extra_kwargs": {"model_size": "0.6B"},
"state_dict_converter": "diffsynth.utils.state_dict_converters.z_image_text_encoder.ZImageTextEncoderStateDictConverter",
},
{
# To ensure compatibility with the `model.diffusion_model` prefix introduced by other frameworks.
"model_hash": "8cf241a0d32f93d5de368502a086852f",
"model_name": "z_image_dit",
"model_class": "diffsynth.models.z_image_dit.ZImageDiT",
"state_dict_converter": "diffsynth.utils.state_dict_converters.z_image_dit.ZImageDiTStateDictConverter",
},
]
"""
Offical model repo: https://www.modelscope.cn/models/Lightricks/LTX-2

View File

@@ -0,0 +1,3 @@
def ZImageDiTStateDictConverter(state_dict):
state_dict_ = {name.replace("model.diffusion_model.", ""): state_dict[name] for name in state_dict}
return state_dict_