fix flux compatibility issues

This commit is contained in:
Artiprocher
2026-01-14 20:49:36 +08:00
parent 0c617d5d9e
commit c90aaa2798
4 changed files with 11 additions and 2 deletions

View File

@@ -143,6 +143,8 @@ def FluxDiTStateDictConverterFromDiffusers(state_dict):
suffix = ".weight" if name.endswith(".weight") else ".bias"
prefix = name[:-len(suffix)]
if prefix in global_rename_dict:
if global_rename_dict[prefix] == "final_norm_out.linear":
param = torch.concat([param[3072:], param[:3072]], dim=0)
state_dict_[global_rename_dict[prefix] + suffix] = param
elif prefix.startswith("transformer_blocks."):
names = prefix.split(".")