Merge Diffusion Tool is an open-source solution developed by EnhanceAI.art, providing seamless ways to blend LoRA models, integrate LoRA into checkpoints, and merge Stable Diffusion checkpoints. Enhance your AI workflows with this powerful merging tool, designed to support a wide range of diffusion models like Flux Dev, Flux Schnell, Stable Diffusion 1.5, SD2, SD3, and SDXL.
Discover more advanced AI tools at EnhanceAI.art.
.safetensors format, ensuring efficient and safe handling.To set up the tool, follow these steps:
Clone the repository:
git clone https://github.com/itspranavajay/Merge-Diffusion-Tool.git
cd merge-diffusion-toolInstall the required dependencies:
pip install -r requirements.txtThe Merge Diffusion Tool provides three main operations:
| Argument | Description |
|---|---|
--operation |
Select operation: merge_loras, merge_lora_checkpoint, merge_checkpoints |
--model1 |
Path to the first model file. |
--model2 |
Path to the second model file (optional for LoRA into checkpoint). |
--output |
Output path for the merged model. |
--alpha |
Blend ratio for merging models (default: 0.5). |
--merge_weight |
Weight for merging LoRA into checkpoint (default: 0.5). |
python main.py --operation merge_loras --model1 lora1.safetensors --model2 lora2.safetensors --output output_lora.safetensors --alpha 0.7This command merges lora1.safetensors and lora2.safetensors, with 70% contribution from lora1.
python main.py --operation merge_lora_checkpoint --model1 lora_model.safetensors --model2 checkpoint_model.safetensors --output output_checkpoint.safetensors --merge_weight 0.6In this example, the LoRA model merges into the checkpoint with 60% influence.
python main.py --operation merge_checkpoints --model1 checkpoint1.safetensors --model2 checkpoint2.safetensors --output output_checkpoint.safetensors --alpha 0.5Merges both checkpoint models in a 50-50 blend.
.safetensors: Ensures safe, optimized storage and handling of AI models.? If you find this tool helpful, please consider supporting the development by checking out our pricing plans at enhanceai.art/pricing. By purchasing any plan, not only will you be supporting future open-source projects like this, but you'll also unlock many exclusive AI features that will greatly enhance yourself AI workflows!
For assistance, join our Discord server to connect with the community and developers.
We welcome contributions! Feel free to open issues, submit pull requests, or suggest features that would improve this tool. All contributions are highly appreciated.