From dc066aca2dbe80c296c0555e4cc4c8fb1fe433bc Mon Sep 17 00:00:00 2001 From: "lzw478614@alibaba-inc.com" Date: Mon, 14 Jul 2025 14:08:22 +0800 Subject: [PATCH] update flux lora convert state dict --- diffsynth/lora/flux_lora.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/diffsynth/lora/flux_lora.py b/diffsynth/lora/flux_lora.py index 8d0372d..45baeaa 100644 --- a/diffsynth/lora/flux_lora.py +++ b/diffsynth/lora/flux_lora.py @@ -102,12 +102,14 @@ class FluxLoRALoader(GeneralLoRALoader): for k in state_dict: if "lora_unet_" in k: return 'civitai' - elif "transformer." in k: + elif k.startswith("transformer."): return 'diffusers' else: None model_resource = guess_resource(state_dict) + if model_resource is None: + return state_dict rename_dict = self.diffusers_rename_dict if model_resource == 'diffusers' else self.civitai_rename_dict def guess_alpha(state_dict):