ComfyUI_Flux_Lora_Merger

ComfyUI_Flux_Lora_Merger
★ 3

LoRA合并多模型融合FP8/FP16/FP32兼容导出safetensors
在ComfyUI中合并最多4个LoRA模型,支持FP8/FP16/FP32,提供additive、average、sequential三种融合策略,且可保存为.safetensors以便复用。
💡 在生成管线中合并多个LoRA并导出为.safetensors供推理使用。
🍴 2 Forks💻 Python🔄 2025-05-09
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/f414772aa5c3
Capture d'écran 2025-04-15 143351
📄 README

Flux LoRA Merger — Custom Node for ComfyUI

A custom ComfyUI node to merge up to 4 LoRA models into a Flux.1-Dev UNet

⚠️ If you experience VRAM issues (OOM) when saving, try using the sequential strategy instead of additive or average. It avoids direct weight modifications and makes saving more memory-efficient.


✨ Features

  • ✅ Merge up to 4 LoRA models
  • ✅ Compatible with UNet models in FP8 / FP16 / FP32
  • ✅ Three fusion strategies:
  • additive: weighted sum of LoRA deltas
  • average: average of LoRA deltas
  • sequential: apply one after another
  • ✅ Option to save the final merged model in .safetensors

  • 📥 Inputs

    | Parameter | Type | Description |

    |——————|———-|————-|

    | unet_model | MODEL | The base UNet model to apply LoRAs to |

    | merge_strategy | CHOICE | "additive", "average", or "sequential" |

    | enable_loraX | BOOLEAN| Whether to enable the corresponding LoRA |

    | loraX | STRING | Filename of the LoRA (from your loras/ folder) |

    | loraX_weight | FLOAT | Weight multiplier for the LoRA |

    | save_model | BOOLEAN| Save the merged model to output/ |

    | save_filename | STRING | Custom name for the saved .safetensors file |


    📤 Outputs

    | Output | Type | Description |

    |——————|———-|————-|

    | model | MODEL | The merged UNet model |