{"id":22676723,"url":"https://github.com/itspranavajay/merge-diffusion-tool","last_synced_at":"2025-10-29T00:46:56.705Z","repository":{"id":257119590,"uuid":"857375001","full_name":"itspranavajay/Merge-Diffusion-Tool","owner":"itspranavajay","description":"Merge Diffusion Tool is an open-source solution for merging LoRA models, integrating LoRA into checkpoints, and blending Flux And Stable Diffusion models (SD1.5, SD2, SD3, SDXL). Optimize your AI workflows with ease.","archived":false,"fork":false,"pushed_at":"2024-09-14T15:02:39.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-15T23:50:29.926Z","etag":null,"topics":["ai","checkpoint","deep-learning","dreambooth","finetuning","flux","fluxai","lora","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itspranavajay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-14T13:44:53.000Z","updated_at":"2024-09-15T07:54:35.000Z","dependencies_parsed_at":"2024-09-14T23:45:21.005Z","dependency_job_id":"c6d00fb9-e1c0-4c8e-a29b-ec955aea2998","html_url":"https://github.com/itspranavajay/Merge-Diffusion-Tool","commit_stats":null,"previous_names":["itspranavajay/merge-diffusion-tool-"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspranavajay%2FMerge-Diffusion-Tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspranavajay%2FMerge-Diffusion-Tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspranavajay%2FMerge-Diffusion-Tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspranavajay%2FMerge-Diffusion-Tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itspranavajay","download_url":"https://codeload.github.com/itspranavajay/Merge-Diffusion-Tool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228939546,"owners_count":17994933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","checkpoint","deep-learning","dreambooth","finetuning","flux","fluxai","lora","stable-diffusion"],"created_at":"2024-12-09T17:58:56.918Z","updated_at":"2025-10-29T00:46:56.610Z","avatar_url":"https://github.com/itspranavajay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Merge Diffusion Tool\n\n**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**.\n\nDiscover more advanced AI tools at [EnhanceAI.art](https://enhanceai.art).\n\n## Features\n\n- **Merge Two LoRA Models** with adjustable blending ratios.\n- **Integrate LoRA into a Checkpoint** for enhanced model performance.\n- **Merge Two Checkpoints** using custom blend ratios.\n- Full support for `.safetensors` format, ensuring efficient and safe handling.\n\n### Key Advantages:\n- Streamline your AI model merging process.\n- Built with flexibility to cater to diverse AI model formats.\n- Completely open-source with community support via Discord.\n\n---\n\n## Installation\n\nTo set up the tool, follow these steps:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/itspranavajay/Merge-Diffusion-Tool.git\n   cd merge-diffusion-tool\n   ```\n\n2. Install the required dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n### Dependencies:\n\n- **Python 3.8+**\n- **PyTorch** for deep learning operations.\n- **Safetensors** library for model file handling.\n\n---\n\n## Usage\n\nThe **Merge Diffusion Tool** provides three main operations:\n\n1. **Merge Two LoRA Models**\n2. **Merge LoRA into a Checkpoint**\n3. **Merge Two Checkpoints**\n\n### Command-Line Arguments:\n\n| Argument         | Description                                                                 |\n|------------------|-----------------------------------------------------------------------------|\n| `--operation`    | Select operation: `merge_loras`, `merge_lora_checkpoint`, `merge_checkpoints`|\n| `--model1`       | Path to the first model file.                                                |\n| `--model2`       | Path to the second model file (optional for LoRA into checkpoint).           |\n| `--output`       | Output path for the merged model.                                            |\n| `--alpha`        | Blend ratio for merging models (default: 0.5).                               |\n| `--merge_weight` | Weight for merging LoRA into checkpoint (default: 0.5).                      |\n\n### Example 1: Merging Two LoRA Models\n\n```bash\npython main.py --operation merge_loras --model1 lora1.safetensors --model2 lora2.safetensors --output output_lora.safetensors --alpha 0.7\n```\n\nThis command merges `lora1.safetensors` and `lora2.safetensors`, with 70% contribution from `lora1`.\n\n### Example 2: Merging LoRA into a Checkpoint\n\n```bash\npython main.py --operation merge_lora_checkpoint --model1 lora_model.safetensors --model2 checkpoint_model.safetensors --output output_checkpoint.safetensors --merge_weight 0.6\n```\n\nIn this example, the LoRA model merges into the checkpoint with 60% influence.\n\n### Example 3: Merging Two Checkpoints\n\n```bash\npython main.py --operation merge_checkpoints --model1 checkpoint1.safetensors --model2 checkpoint2.safetensors --output output_checkpoint.safetensors --alpha 0.5\n```\n\nMerges both checkpoint models in a 50-50 blend.\n\n---\n\n## Supported Formats\n\n- **`.safetensors`**: Ensures safe, optimized storage and handling of AI models.\n\n---\n\n## Donation EnhanceAI.art\n\n👏 If you find this tool helpful, please consider supporting the development by checking out our pricing plans at [enhanceai.art/pricing](https://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!\n\n---\n\n## Support\n\nFor assistance, join our [Discord server](https://discord.gg/wtyHstGZ) to connect with the community and developers.\n\n---\n\n## Contributing\n\nWe welcome contributions! Feel free to open issues, submit pull requests, or suggest features that would improve this tool. All contributions are highly appreciated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitspranavajay%2Fmerge-diffusion-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitspranavajay%2Fmerge-diffusion-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitspranavajay%2Fmerge-diffusion-tool/lists"}