"vscode:/vscode.git/clone" did not exist on "3f0569939c4369bec943fc27d1c9d8dfbc828c26"
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( ...@@ -19,7 +19,7 @@ def comfyui2diffusers(
new_tensors = {} new_tensors = {}
max_rank = 0 max_rank = 0
for k, v in tensors.items(): for k, v in tensors.items():
if "alpha" in k: if "alpha" in k or "lora_te" in k:
continue continue
new_k = k.replace("lora_down", "lora_A").replace("lora_up", "lora_B") new_k = k.replace("lora_down", "lora_A").replace("lora_up", "lora_B")
if "lora_unet_double_blocks_" in k: if "lora_unet_double_blocks_" in k:
......
...@@ -12,7 +12,7 @@ def detect_format(lora: str | dict[str, torch.Tensor]) -> str: ...@@ -12,7 +12,7 @@ def detect_format(lora: str | dict[str, torch.Tensor]) -> str:
for k in tensors.keys(): for k in tensors.keys():
if "lora_unet_double_blocks_" in k or "lora_unet_single_blocks" in k: if "lora_unet_double_blocks_" in k or "lora_unet_single_blocks" in k:
return "comfyui" 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" return "svdquant"
elif "double_blocks." in k or "single_blocks." in k: elif "double_blocks." in k or "single_blocks." in k:
return "xlab" 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