# sd-meh
[](https://badge.fury.io/py/sd-meh)
[](https://discord.gg/EZJuBfNVHh)
The merging execution helper (meh) is a python module for stable diffusion models merging.
This repository will never contain code for a webui extension.
This is because the aim is to have a GUI agnostic merging engine that can be reused in multiple extensions.
You can install the module as
```
pip install sd-meh
```
and then use it in your extension as
```python
from sd_meh.merge import merge_models
merged_model = merge_models(models, weights, bases, merge_mode, precision)
```
You can have a look at the provided `merge_models.py` cli for an example on how to use the function. Run `python3 merge_models.py --help` for a list of the available arguments.
[Join](https://discord.gg/EZJuBfNVHh) our discord server for discussion and features/bugfix requests
## Changelog
### 0.9.1 ... 0.9.3
- bugfixes
- support for pix2pix and inpainting models
### 0.8.0
- add `-bwpab, --block_weights_preset_alpha_b"` and `-pal, --presets_alpha_lambda` for presets interpolation (same for `beta`)
- add `-ll, --logging_level`, default to `INFO`
### 0.7.0
- add `-bwpa, --block_weights_preset_alpha` and `-bwpb, --block_weights_preset_beta` to use pre-defined merging weights. Have a look at the [wiki](https://github.com/s1dlx/meh/wiki/Presets) for all the presets
- add `-wd, --work_device`
- add `-pr, --prune`
- add `-j, --threads`
## DEV
PRs are welcome for both new features and bug fixes.
Please make sure you format the code with black (you can `make format`) before submitting a PR.
### You want to add a `feature`
- open a `feat:` PR merging to `dev` branch, not `main`
- *do not* update version numbers
- ask for a review
### You want to make a bug `fix`
- open a `fix:` PR mergin to `main`
- update version number in `pyproject.toml` and `sd_meh/__init__.py`
- ask for a review
Raw data
{
"_id": null,
"home_page": "https://github.com/s1dlx/meh",
"name": "sd-meh",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "s1dlx",
"author_email": "s1dlx@proton.me",
"download_url": "https://files.pythonhosted.org/packages/18/98/32fe91dd4a1a24650ce408d1ca496a75e9418a716c296c897f63104281d1/sd_meh-0.9.5.tar.gz",
"platform": null,
"description": "# sd-meh\n\n[](https://badge.fury.io/py/sd-meh)\n\n[](https://discord.gg/EZJuBfNVHh)\n\n\nThe merging execution helper (meh) is a python module for stable diffusion models merging.\nThis repository will never contain code for a webui extension.\nThis is because the aim is to have a GUI agnostic merging engine that can be reused in multiple extensions. \n\nYou can install the module as\n\n```\npip install sd-meh\n```\n\nand then use it in your extension as\n\n```python\nfrom sd_meh.merge import merge_models\n\nmerged_model = merge_models(models, weights, bases, merge_mode, precision)\n```\n\nYou can have a look at the provided `merge_models.py` cli for an example on how to use the function. Run `python3 merge_models.py --help` for a list of the available arguments.\n\n[Join](https://discord.gg/EZJuBfNVHh) our discord server for discussion and features/bugfix requests\n\n## Changelog\n\n### 0.9.1 ... 0.9.3\n- bugfixes\n- support for pix2pix and inpainting models\n\n### 0.8.0\n- add `-bwpab, --block_weights_preset_alpha_b\"` and `-pal, --presets_alpha_lambda` for presets interpolation (same for `beta`)\n- add `-ll, --logging_level`, default to `INFO`\n\n### 0.7.0\n- add `-bwpa, --block_weights_preset_alpha` and `-bwpb, --block_weights_preset_beta` to use pre-defined merging weights. Have a look at the [wiki](https://github.com/s1dlx/meh/wiki/Presets) for all the presets\n- add `-wd, --work_device`\n- add `-pr, --prune`\n- add `-j, --threads`\n\n\n## DEV\n\nPRs are welcome for both new features and bug fixes. \n\nPlease make sure you format the code with black (you can `make format`) before submitting a PR.\n\n### You want to add a `feature`\n\n- open a `feat:` PR merging to `dev` branch, not `main`\n- *do not* update version numbers\n- ask for a review\n\n### You want to make a bug `fix`\n\n- open a `fix:` PR mergin to `main`\n- update version number in `pyproject.toml` and `sd_meh/__init__.py`\n- ask for a review\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "stable diffusion merging execution helper",
"version": "0.9.5",
"project_urls": {
"Homepage": "https://github.com/s1dlx/meh",
"Repository": "https://github.com/s1dlx/meh"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "057c7a4ab8711e0d2e442ed2695576f8339fe3064d8b72d93d2446a3c5500846",
"md5": "156f2cd5e6b51bf44b661a5723e8a279",
"sha256": "6ee3e09d7c50f2620ef138f87d7801a4d8e827e913817346d77dc94c65cc682a"
},
"downloads": -1,
"filename": "sd_meh-0.9.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "156f2cd5e6b51bf44b661a5723e8a279",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 19937,
"upload_time": "2023-08-22T07:34:33",
"upload_time_iso_8601": "2023-08-22T07:34:33.991856Z",
"url": "https://files.pythonhosted.org/packages/05/7c/7a4ab8711e0d2e442ed2695576f8339fe3064d8b72d93d2446a3c5500846/sd_meh-0.9.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "189832fe91dd4a1a24650ce408d1ca496a75e9418a716c296c897f63104281d1",
"md5": "456d14f21564ce1201b5d553324b507d",
"sha256": "eab624e1c7e98c8c2d081d0b550d1ffc09320b30a9f8eaa7ca7116600cf943d1"
},
"downloads": -1,
"filename": "sd_meh-0.9.5.tar.gz",
"has_sig": false,
"md5_digest": "456d14f21564ce1201b5d553324b507d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 19008,
"upload_time": "2023-08-22T07:34:35",
"upload_time_iso_8601": "2023-08-22T07:34:35.479933Z",
"url": "https://files.pythonhosted.org/packages/18/98/32fe91dd4a1a24650ce408d1ca496a75e9418a716c296c897f63104281d1/sd_meh-0.9.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-22 07:34:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "s1dlx",
"github_project": "meh",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "click",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "safetensors",
"specs": []
},
{
"name": "torch",
"specs": []
},
{
"name": "tqdm",
"specs": []
},
{
"name": "tensordict",
"specs": []
},
{
"name": "scipy",
"specs": []
}
],
"lcname": "sd-meh"
}