| Name | zoomaker JSON |
| Version |
0.9.0
JSON |
| download |
| home_page | https://github.com/hfg-gmuend/zoomaker |
| Summary | Zoomaker - Friendly house keeping for your AI model zoo and related resources. |
| upload_time | 2024-09-09 07:05:06 |
| maintainer | None |
| docs_url | None |
| author | Benedikt Groß |
| requires_python | <4.0,>=3.9 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|

Zoomaker - Friendly house keeping for your AI model zoo and related resources.
========
Zoomaker is a command-line tool that helps install AI models, git repositories and run scripts.
- **single source of truth**: all resources are neatly defined in the `zoo.yaml` file
- **freeze versions**: know exactly which revision of a resources is installed at any time
- **only download once**: optimize bandwidth and cache your models locally
- **optimize disk usage**: downloaded models are cached
## 😻 TL;DR
1. Install Zoomaker `pip install zoomaker`
2. Define your resources in the `zoo.yaml` file
3. Run `zoomaker install` to install them
## 📦 Installation
```bash
pip install zoomaker
```
## 🦁 zoo.yaml Examples
Example of the `zoo.yaml` of a Stable Diffusion project with the [Automatic1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui) image generator:
```yaml
name: my-automatic1111-model-zoo
version: 1.0
description: Lorem ipsum
author: your name
resources:
image_generator:
- name: automatic1111
src: https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
type: git
revision: 22bcc7be428c94e9408f589966c2040187245d81
install_to: ./
models:
- name: v2-1_768-ema-pruned
src: stabilityai/stable-diffusion-2-1/v2-1_768-ema-pruned.safetensors
type: huggingface
install_to: ./stable-diffusion-webui/models/Stable-diffusion/
```
<details>
<summary>`zoo.yaml` example long</summary>
```yaml
name: my-automatic1111-model-zoo
version: 1.0
description: Lorem ipsum
author: your name
aliases:
image_generator: &image_generator ./
models: &models ./stable-diffusion-webui/models/Stable-diffusion/
controlnet: &controlnet ./stable-diffusion-webui/models/ControlNet/
embeddings: &embeddings ./stable-diffusion-webui/embeddings/
extensions: &extensions ./stable-diffusion-webui/extensions/
resources:
image_generator:
- name: automatic1111
src: https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
type: git
revision: 22bcc7be428c94e9408f589966c2040187245d81
install_to: *image_generator
models:
- name: v1-5-pruned-emaonly
src: runwayml/stable-diffusion-v1-5/v1-5-pruned-emaonly.safetensors
type: huggingface
install_to: *models
controlnet:
- name: control_sd15_canny
src: lllyasviel/ControlNet/models/control_sd15_canny.pth
type: huggingface
install_to: *controlnet
embeddings:
- name: midjourney-style
src: sd-concepts-library/midjourney-style/learned_embeds.bin
type: huggingface
install_to: *embeddings
rename_to: midjourney-style.bin
- name: moebius
src: sd-concepts-library/moebius/learned_embeds.bin
type: huggingface
install_to: *embeddings
rename_to: moebius.bin
extensions:
- name: sd-webui-tunnels
src: https://github.com/Bing-su/sd-webui-tunnels.git
type: git
install_to: *extensions
```
</details>
<details>
<summary>`zoo.yaml` with script snippets</summary>
Here are a few examples of how to run scripts snippets from the `zoo.yaml` file. For example for starting the Automatic1111's webui, you could setup snippets like these and then run them with `zoomaker run start_webui`. All scripts are run from the root of the project, please adjust the paths accordingly.
```yaml
scripts:
start_webui: |
cd .\stable-diffusion-webui && call webui.bat
```
```yaml
scripts:
start_webui: |
conda activate automatic1111
cd /home/$(whoami)/stable-diffusion-webui/
./webui.sh --xformers --no-half
```
</details>
<details>
<summary>`zoo.yaml` with web download</summary>
```yaml
resources:
models:
- name: analog-diffusion-v1
src: https://civitai.com/api/download/models/1344
type: download
install_to: ./stable-diffusion-webui/models/Stable-diffusion/
rename_to: analog-diffusion-v1.safetensors
```
Please note:
The resource `type: download` can be seen as the last resort. Existing web downloads are skipped, but no other caching. It is recommended to avoid web downloads :)
</details>
## 🧮 zoo.yaml Structure
<details>
<summary>Top level:</summary>
- `name` (mandatory)
- `version`, `description`, `author`, `aliases` (optional)
- `resources` (mandatory) : `<group-name>` : `[]` (array of resources)
- `scripts` (optional) : `<script-name>`
</details>
<details>
<summary>Resource:</summary>
- `name`, `src`, `type`, `install_to` (mandatory)
- `rename_to` (optional)
- `revision` (optional), if none is defined the latest version from the main branch is downloaded
- `type` can either be `git`, `huggingface` or `download`
- `api_key` (optional) for civitai
</details>
## 🧞 Zoomaker Commands
All commands are run from the root of the project, where also your `zoo.yaml` file is located.
| Command | Action |
| :--------------------- | :----------------------------------------------- |
| `zoomaker install` | Installs resources as defined in `zoo.yaml` |
| `zoomaker run <script_name>` | Run CLI scripts as defined in `zoo.yaml` |
| `zoomaker --help` | Get help using the Zoomaker CLI |
| `zoomaker --version` | Show current Zoomaker version |
## 🤗 Hugging Face Access Token and Custom Cache Location
You might be asked for a [Hugging Face Access Token](https://huggingface.co/docs/hub/security-tokens) during `zoomaker install`. Some resources on Hugging Face require accepting the terms of use of the model. You can set your access token by running this command in a terminal. The command `huggingface-cli` is automatically shipped alongside zoomaker.
```bash
huggingface-cli login
```
You can specify a custom cache location by setting the HF_HOME environment variable. The default cache location is `~/.cache/huggingface/`.
```bash
export HF_HOME=/path/to/your/cache
zoomaker install
```
## 🙏 Acknowledgements
- Most of the internal heavy lifting is done be the [huggingface_hub library](https://huggingface.co/docs/huggingface_hub/guides/download) by Hugging Face. Thanks!
- "Zoomaker Safari Hacker Cat" cover image by Alia Tasler, based on this [OpenMoji](https://openmoji.org/library/emoji-1F431-200D-1F4BB/). Thanks!
Raw data
{
"_id": null,
"home_page": "https://github.com/hfg-gmuend/zoomaker",
"name": "zoomaker",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Benedikt Gro\u00df",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/60/d3/146b4fcb9dc75f47effdc56d2a6b38609cf3ffe6126652ef2023d10acc80/zoomaker-0.9.0.tar.gz",
"platform": null,
"description": "\n\nZoomaker - Friendly house keeping for your AI model zoo and related resources.\n========\n\nZoomaker is a command-line tool that helps install AI models, git repositories and run scripts.\n\n- **single source of truth**: all resources are neatly defined in the `zoo.yaml` file\n- **freeze versions**: know exactly which revision of a resources is installed at any time\n- **only download once**: optimize bandwidth and cache your models locally\n- **optimize disk usage**: downloaded models are cached\n\n## \ud83d\ude3b TL;DR\n\n1. Install Zoomaker `pip install zoomaker`\n2. Define your resources in the `zoo.yaml` file\n3. Run `zoomaker install` to install them\n\n\n## \ud83d\udce6 Installation\n\n```bash\npip install zoomaker\n```\n\n## \ud83e\udd81 zoo.yaml Examples\n\nExample of the `zoo.yaml` of a Stable Diffusion project with the [Automatic1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui) image generator:\n\n```yaml\nname: my-automatic1111-model-zoo\nversion: 1.0\ndescription: Lorem ipsum\nauthor: your name\n\nresources:\n image_generator:\n - name: automatic1111\n src: https://github.com/AUTOMATIC1111/stable-diffusion-webui.git\n type: git\n revision: 22bcc7be428c94e9408f589966c2040187245d81\n install_to: ./\n\n models:\n - name: v2-1_768-ema-pruned\n src: stabilityai/stable-diffusion-2-1/v2-1_768-ema-pruned.safetensors\n type: huggingface\n install_to: ./stable-diffusion-webui/models/Stable-diffusion/\n```\n\n<details>\n<summary>`zoo.yaml` example long</summary>\n\n```yaml\nname: my-automatic1111-model-zoo\nversion: 1.0\ndescription: Lorem ipsum\nauthor: your name\n\naliases:\n image_generator: &image_generator ./\n models: &models ./stable-diffusion-webui/models/Stable-diffusion/\n controlnet: &controlnet ./stable-diffusion-webui/models/ControlNet/\n embeddings: &embeddings ./stable-diffusion-webui/embeddings/\n extensions: &extensions ./stable-diffusion-webui/extensions/\n\nresources:\n image_generator:\n - name: automatic1111\n src: https://github.com/AUTOMATIC1111/stable-diffusion-webui.git\n type: git\n revision: 22bcc7be428c94e9408f589966c2040187245d81\n install_to: *image_generator\n\n models:\n - name: v1-5-pruned-emaonly\n src: runwayml/stable-diffusion-v1-5/v1-5-pruned-emaonly.safetensors\n type: huggingface\n install_to: *models\n\n controlnet:\n - name: control_sd15_canny\n src: lllyasviel/ControlNet/models/control_sd15_canny.pth\n type: huggingface\n install_to: *controlnet\n\n embeddings:\n - name: midjourney-style\n src: sd-concepts-library/midjourney-style/learned_embeds.bin\n type: huggingface\n install_to: *embeddings\n rename_to: midjourney-style.bin\n - name: moebius\n src: sd-concepts-library/moebius/learned_embeds.bin\n type: huggingface\n install_to: *embeddings\n rename_to: moebius.bin\n\n extensions:\n - name: sd-webui-tunnels\n src: https://github.com/Bing-su/sd-webui-tunnels.git\n type: git\n install_to: *extensions\n```\n</details>\n\n<details>\n<summary>`zoo.yaml` with script snippets</summary>\n\nHere are a few examples of how to run scripts snippets from the `zoo.yaml` file. For example for starting the Automatic1111's webui, you could setup snippets like these and then run them with `zoomaker run start_webui`. All scripts are run from the root of the project, please adjust the paths accordingly.\n\n```yaml\nscripts:\n start_webui: |\n cd .\\stable-diffusion-webui && call webui.bat\n```\n\n```yaml\nscripts:\n start_webui: |\n conda activate automatic1111\n cd /home/$(whoami)/stable-diffusion-webui/\n ./webui.sh --xformers --no-half\n```\n</details>\n\n<details>\n<summary>`zoo.yaml` with web download</summary>\n\n```yaml\nresources:\n models:\n - name: analog-diffusion-v1\n src: https://civitai.com/api/download/models/1344\n type: download\n install_to: ./stable-diffusion-webui/models/Stable-diffusion/\n rename_to: analog-diffusion-v1.safetensors\n```\nPlease note:\nThe resource `type: download` can be seen as the last resort. Existing web downloads are skipped, but no other caching. It is recommended to avoid web downloads :)\n</details>\n\n## \ud83e\uddee zoo.yaml Structure\n\n<details>\n<summary>Top level:</summary>\n\n- `name` (mandatory)\n- `version`, `description`, `author`, `aliases` (optional)\n- `resources` (mandatory) : `<group-name>` : `[]` (array of resources)\n- `scripts` (optional) : `<script-name>`\n</details>\n\n<details>\n<summary>Resource:</summary>\n\n- `name`, `src`, `type`, `install_to` (mandatory)\n- `rename_to` (optional)\n- `revision` (optional), if none is defined the latest version from the main branch is downloaded\n- `type` can either be `git`, `huggingface` or `download`\n- `api_key` (optional) for civitai\n</details>\n\n## \ud83e\uddde Zoomaker Commands\n\nAll commands are run from the root of the project, where also your `zoo.yaml` file is located.\n\n| Command | Action |\n| :--------------------- | :----------------------------------------------- |\n| `zoomaker install` | Installs resources as defined in `zoo.yaml` |\n| `zoomaker run <script_name>` | Run CLI scripts as defined in `zoo.yaml` |\n| `zoomaker --help` | Get help using the Zoomaker CLI |\n| `zoomaker --version` | Show current Zoomaker version |\n\n\n## \ud83e\udd17 Hugging Face Access Token and Custom Cache Location\n\nYou might be asked for a [Hugging Face Access Token](https://huggingface.co/docs/hub/security-tokens) during `zoomaker install`. Some resources on Hugging Face require accepting the terms of use of the model. You can set your access token by running this command in a terminal. The command `huggingface-cli` is automatically shipped alongside zoomaker.\n\n```bash\nhuggingface-cli login\n```\n\nYou can specify a custom cache location by setting the HF_HOME environment variable. The default cache location is `~/.cache/huggingface/`.\n\n```bash\nexport HF_HOME=/path/to/your/cache\nzoomaker install\n```\n\n## \ud83d\ude4f Acknowledgements\n- Most of the internal heavy lifting is done be the [huggingface_hub library](https://huggingface.co/docs/huggingface_hub/guides/download) by Hugging Face. Thanks!\n- \"Zoomaker Safari Hacker Cat\" cover image by Alia Tasler, based on this [OpenMoji](https://openmoji.org/library/emoji-1F431-200D-1F4BB/). Thanks!\n",
"bugtrack_url": null,
"license": null,
"summary": "Zoomaker - Friendly house keeping for your AI model zoo and related resources.",
"version": "0.9.0",
"project_urls": {
"Documentation": "https://github.com/hfg-gmuend/zoomaker",
"Homepage": "https://github.com/hfg-gmuend/zoomaker",
"Repository": "https://github.com/hfg-gmuend/zoomaker"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "702687f171f4567cc1fdea5f9cb797e86986d990dc39f6c6828adeec5dc3e29d",
"md5": "d1404851cade55937d879c2960b8130d",
"sha256": "625eba31757f47f6b1bf9b1b9830449a1d76fee1242dddf4bcf26f2990d39f20"
},
"downloads": -1,
"filename": "zoomaker-0.9.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d1404851cade55937d879c2960b8130d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 6501,
"upload_time": "2024-09-09T07:05:05",
"upload_time_iso_8601": "2024-09-09T07:05:05.579798Z",
"url": "https://files.pythonhosted.org/packages/70/26/87f171f4567cc1fdea5f9cb797e86986d990dc39f6c6828adeec5dc3e29d/zoomaker-0.9.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "60d3146b4fcb9dc75f47effdc56d2a6b38609cf3ffe6126652ef2023d10acc80",
"md5": "90e165f76c0b974ad49bde639369ba51",
"sha256": "0fc7152389aeeb6bc3dd27fc3cd253a1cfc15e645a25f8fdc891fda6382caed8"
},
"downloads": -1,
"filename": "zoomaker-0.9.0.tar.gz",
"has_sig": false,
"md5_digest": "90e165f76c0b974ad49bde639369ba51",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 5969,
"upload_time": "2024-09-09T07:05:06",
"upload_time_iso_8601": "2024-09-09T07:05:06.627859Z",
"url": "https://files.pythonhosted.org/packages/60/d3/146b4fcb9dc75f47effdc56d2a6b38609cf3ffe6126652ef2023d10acc80/zoomaker-0.9.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-09 07:05:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hfg-gmuend",
"github_project": "zoomaker",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "zoomaker"
}