Commit 65d7e47a authored by Muyang Li's avatar Muyang Li Committed by Zhekai Zhang
Browse files

support fluxgym loras

parent 1eb6352a
......@@ -19,7 +19,7 @@ def comfyui2diffusers(
new_tensors = {}
max_rank = 0
for k, v in tensors.items():
if "alpha" in k:
if "alpha" in k or "lora_te" in k:
continue
new_k = k.replace("lora_down", "lora_A").replace("lora_up", "lora_B")
if "lora_unet_double_blocks_" in k:
......
......@@ -12,7 +12,7 @@ def detect_format(lora: str | dict[str, torch.Tensor]) -> str:
for k in tensors.keys():
if "lora_unet_double_blocks_" in k or "lora_unet_single_blocks" in k:
return "comfyui"
elif "mlp_fc" in k or "mlp_context_fc1" in k:
elif ".mlp_fc" in k or "mlp_context_fc1" in k:
return "svdquant"
elif "double_blocks." in k or "single_blocks." in k:
return "xlab"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment