auto-diffusers


Nameauto-diffusers JSON
Version 2.0.14 PyPI version JSON
download
home_pagehttps://github.com/suzukimain/auto_diffusers
SummaryCustomized diffusers with model search and other functions.
upload_time2024-12-06 14:12:17
maintainerNone
docs_urlNone
authorsuzukimain
requires_pythonNone
licenseApache 2.0 License
keywords huggingface civitai diffusers model search deep learning diffusion pytorch stable diffusion
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # auto_diffusers


<p>
    <a href="https://github.com/suzukimain/auto_diffusers/blob/main/LICENSE"><img alt="GitHub release" src="https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=social"></a>
</p>
<p>
    <a href="https://pepy.tech/project/auto_diffusers"><img alt="GitHub release" src="https://static.pepy.tech/badge/auto_diffusers"></a>
    <a href="https://github.com/suzukimain/auto_diffusers/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/suzukimain/auto_diffusers.svg"></a>
    <img src="https://visitor-badge.laobi.icu/badge?page_id=suzukimain.auto_diffusers" alt="Visitor Badge">
</p>


>CONTENTS
+ [About The Project](#About_The_Project)
+ [How to use](#How_to_use)
+ [Search Hubs](#Search_Civitai_and_Huggingfacee)
  - [Search Civitai](#Search_Civitai)
  - [Search Huggingface](#Search_Huggingface)
+ [License](#License)
+ [Acknowledgement](#Acknowledgement)

## About The Project<a name = "About_The_Project"></a>
Enhance the functionality of diffusers.
* Search models from huggingface and Civitai.


##  How to use<a name = "How_to_use"></a>

```python
pip install --quiet auto_diffusers
```

```python
from auto_diffusers import EasyPipelineForText2Image

# Search for Huggingface
pipe = EasyPipelineForText2Image.from_huggingface("any").to("cuda")
img = pipe("cat").images[0]
img.save("cat.png")


# Search for Civitai
pipe = EasyPipelineForText2Image.from_civitai("any").to("cuda")
image = pipe("cat").images[0]
image.save("cat.png")

```

## Search Civitai and Huggingfacee<a name = "Search_Civitai_and_Huggingfacee"></a>

```python
from pipeline_easy import (
    search_huggingface,
    search_civitai,
) 

# Search Lora
Lora = search_civitai(
    "Keyword_to_search_Lora",
    model_type="LORA",
    base_model = "SD 1.5",
    download=True,
    )
# Load Lora into the pipeline.
pipeline.load_lora_weights(Lora)


# Search TextualInversion
TextualInversion = search_civitai(
    "EasyNegative",
    model_type="TextualInversion",
    base_model = "SD 1.5",
    download=True
)
# Load TextualInversion into the pipeline.
pipeline.load_textual_inversion(TextualInversion, token="EasyNegative")
```

### Search Civitai<a name = "Search_Civitai"></a>

> [!TIP]
> **If an error occurs, insert the `token` and run again.**

#### `EasyPipeline.from_civitai` parameters

| Name            | Type                   | Default       | Description                                                                    |
|:---------------:|:----------------------:|:-------------:|:-----------------------------------------------------------------------------------:|
| search_word     | string, Path           | ー            | The search query string. Can be a keyword, Civitai URL, local directory or file path. |
| model_type      | string                 | `Checkpoint`  | The type of model to search for.  <br>(for example `Checkpoint`, `TextualInversion`, `Controlnet`, `LORA`, `Hypernetwork`, `AestheticGradient`, `Poses`)      |
| base_model      | string                 | None          | Trained model tag (for example  `SD 1.5`, `SD 3.5`, `SDXL 1.0`) |
| torch_dtype     | string, torch.dtype    | None          | Override the default `torch.dtype` and load the model with another dtype.     |
| force_download  | bool                   | False         | Whether or not to force the (re-)download of the model weights and configuration files, overriding the cached versions if they exist. |
| cache_dir       | string, Path | None    | Path to the folder where cached files are stored. |
| resume          | bool   | False         | Whether to resume an incomplete download. |
| token           | string | None          | API token for Civitai authentication. |


#### `search_civitai` parameters

| Name            | Type           | Default       | Description                                                                    |
|:---------------:|:--------------:|:-------------:|:-----------------------------------------------------------------------------------:|
| search_word     | string, Path   | ー            | The search query string. Can be a keyword, Civitai URL, local directory or file path. |
| model_type      | string         | `Checkpoint`  | The type of model to search for. <br>(for example `Checkpoint`, `TextualInversion`, `Controlnet`, `LORA`, `Hypernetwork`, `AestheticGradient`, `Poses`)   |
| base_model      | string         | None          | Trained model tag (for example  `SD 1.5`, `SD 3.5`, `SDXL 1.0`)                        |
| download        | bool           | False         | Whether to download the model.                                   |
| force_download  | bool           | False         | Whether to force the download if the model already exists.                          |
| cache_dir       | string, Path   | None          | Path to the folder where cached files are stored.                              |
| resume          | bool           | False         | Whether to resume an incomplete download.                                           |
| token           | string         | None          | API token for Civitai authentication.                                               |
| include_params  | bool           | False         | Whether to include parameters in the returned data.           |
| skip_error      | bool           | False         | Whether to skip errors and return None.                                             |

### Search Huggingface<a name = "Search_Huggingface"></a>

> [!TIP]
> **If an error occurs, insert the `token` and run again.**

#### `EasyPipeline.from_huggingface` parameters

| Name                  | Type                | Default        | Description                                                      |
|:---------------------:|:-------------------:|:--------------:|:----------------------------------------------------------------:|
| search_word           | string, Path        | ー             | The search query string. Can be a keyword, Hugging Face URL, local directory or file path, or a Hugging Face path (`<creator>/<repo>`). |
| checkpoint_format     | string              | `single_file`  | The format of the model checkpoint.<br>● `single_file` to search for `single file checkpoint` <br>●`diffusers` to search for `multifolder diffusers format checkpoint` |
| torch_dtype           | string, torch.dtype | None           | Override the default `torch.dtype` and load the model with another dtype. |
| force_download        | bool                | False          | Whether or not to force the (re-)download of the model weights and configuration files, overriding the cached versions if they exist. |
| cache_dir             | string, Path        | None           | Path to a directory where a downloaded pretrained model configuration is cached if the standard cache is not used.   |
| token                 | string, bool        | None           | The token to use as HTTP bearer authorization for remote files.  |


#### `search_huggingface` parameters

| Name                  | Type                | Default        | Description                                                      |
|:---------------------:|:-------------------:|:--------------:|:----------------------------------------------------------------:|
| search_word           | string, Path        | ー             | The search query string. Can be a keyword, Hugging Face URL, local directory or file path, or a Hugging Face path (`<creator>/<repo>`). |
| checkpoint_format     | string              | `single_file`  | The format of the model checkpoint. <br>● `single_file` to search for `single file checkpoint` <br>●`diffusers` to search for `multifolder diffusers format checkpoint` |
| pipeline_tag          | string              | None           | Tag to filter models by pipeline.                                |
| download              | bool                | False          | Whether to download the model.                                   |
| force_download        | bool                | False          | Whether or not to force the (re-)download of the model weights and configuration files, overriding the cached versions if they exist. |
| cache_dir             | string, Path        | None           | Path to a directory where a downloaded pretrained model configuration is cached if the standard cache is not used.   |
| token                 | string, bool        | None           | The token to use as HTTP bearer authorization for remote files.  |
| include_params        | bool                | False         | Whether to include parameters in the returned data.               |
| skip_error            | bool                | False         | Whether to skip errors and return None.                           |


## License<a name = "License"></a>
In accordance with [Apache-2.0 license](https://github.com/suzukimain/auto_diffusers/blob/master/LICENSE)


## Acknowledgement<a name = "Acknowledgement"></a>

I have used open source resources and free tools in the creation of this project.

I would like to take this opportunity to thank the open source community and those who provided free tools.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/suzukimain/auto_diffusers",
    "name": "auto-diffusers",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "huggingface civitai diffusers model search deep learning diffusion pytorch stable diffusion",
    "author": "suzukimain",
    "author_email": "subarucosmosmain@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/9f/bd/5c2092fce27dce43f35de2463e7fda578642f9ccc1ff2337b375c22de9b3/auto_diffusers-2.0.14.tar.gz",
    "platform": null,
    "description": "# auto_diffusers\n\n\n<p>\n    <a href=\"https://github.com/suzukimain/auto_diffusers/blob/main/LICENSE\"><img alt=\"GitHub release\" src=\"https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=social\"></a>\n</p>\n<p>\n    <a href=\"https://pepy.tech/project/auto_diffusers\"><img alt=\"GitHub release\" src=\"https://static.pepy.tech/badge/auto_diffusers\"></a>\n    <a href=\"https://github.com/suzukimain/auto_diffusers/releases\"><img alt=\"GitHub release\" src=\"https://img.shields.io/github/release/suzukimain/auto_diffusers.svg\"></a>\n    <img src=\"https://visitor-badge.laobi.icu/badge?page_id=suzukimain.auto_diffusers\" alt=\"Visitor Badge\">\n</p>\n\n\n>CONTENTS\n+ [About The Project](#About_The_Project)\n+ [How to use](#How_to_use)\n+ [Search Hubs](#Search_Civitai_and_Huggingfacee)\n  - [Search Civitai](#Search_Civitai)\n  - [Search Huggingface](#Search_Huggingface)\n+ [License](#License)\n+ [Acknowledgement](#Acknowledgement)\n\n## About The Project<a name = \"About_The_Project\"></a>\nEnhance the functionality of diffusers.\n* Search models from huggingface and Civitai.\n\n\n##  How to use<a name = \"How_to_use\"></a>\n\n```python\npip install --quiet auto_diffusers\n```\n\n```python\nfrom auto_diffusers import EasyPipelineForText2Image\n\n# Search for Huggingface\npipe = EasyPipelineForText2Image.from_huggingface(\"any\").to(\"cuda\")\nimg = pipe(\"cat\").images[0]\nimg.save(\"cat.png\")\n\n\n# Search for Civitai\npipe = EasyPipelineForText2Image.from_civitai(\"any\").to(\"cuda\")\nimage = pipe(\"cat\").images[0]\nimage.save(\"cat.png\")\n\n```\n\n## Search Civitai and Huggingfacee<a name = \"Search_Civitai_and_Huggingfacee\"></a>\n\n```python\nfrom pipeline_easy import (\n    search_huggingface,\n    search_civitai,\n) \n\n# Search Lora\nLora = search_civitai(\n    \"Keyword_to_search_Lora\",\n    model_type=\"LORA\",\n    base_model = \"SD 1.5\",\n    download=True,\n    )\n# Load Lora into the pipeline.\npipeline.load_lora_weights(Lora)\n\n\n# Search TextualInversion\nTextualInversion = search_civitai(\n    \"EasyNegative\",\n    model_type=\"TextualInversion\",\n    base_model = \"SD 1.5\",\n    download=True\n)\n# Load TextualInversion into the pipeline.\npipeline.load_textual_inversion(TextualInversion, token=\"EasyNegative\")\n```\n\n### Search Civitai<a name = \"Search_Civitai\"></a>\n\n> [!TIP]\n> **If an error occurs, insert the `token` and run again.**\n\n#### `EasyPipeline.from_civitai` parameters\n\n| Name            | Type                   | Default       | Description                                                                    |\n|:---------------:|:----------------------:|:-------------:|:-----------------------------------------------------------------------------------:|\n| search_word     | string, Path           | \u30fc            | The search query string. Can be a keyword, Civitai URL, local directory or file path. |\n| model_type      | string                 | `Checkpoint`  | The type of model to search for.  <br>(for example `Checkpoint`, `TextualInversion`, `Controlnet`, `LORA`, `Hypernetwork`, `AestheticGradient`, `Poses`)      |\n| base_model      | string                 | None          | Trained model tag (for example  `SD 1.5`, `SD 3.5`, `SDXL 1.0`) |\n| torch_dtype     | string, torch.dtype    | None          | Override the default `torch.dtype` and load the model with another dtype.     |\n| force_download  | bool                   | False         | Whether or not to force the (re-)download of the model weights and configuration files, overriding the cached versions if they exist. |\n| cache_dir       | string, Path | None    | Path to the folder where cached files are stored. |\n| resume          | bool   | False         | Whether to resume an incomplete download. |\n| token           | string | None          | API token for Civitai authentication. |\n\n\n#### `search_civitai` parameters\n\n| Name            | Type           | Default       | Description                                                                    |\n|:---------------:|:--------------:|:-------------:|:-----------------------------------------------------------------------------------:|\n| search_word     | string, Path   | \u30fc            | The search query string. Can be a keyword, Civitai URL, local directory or file path. |\n| model_type      | string         | `Checkpoint`  | The type of model to search for. <br>(for example `Checkpoint`, `TextualInversion`, `Controlnet`, `LORA`, `Hypernetwork`, `AestheticGradient`, `Poses`)   |\n| base_model      | string         | None          | Trained model tag (for example  `SD 1.5`, `SD 3.5`, `SDXL 1.0`)                        |\n| download        | bool           | False         | Whether to download the model.                                   |\n| force_download  | bool           | False         | Whether to force the download if the model already exists.                          |\n| cache_dir       | string, Path   | None          | Path to the folder where cached files are stored.                              |\n| resume          | bool           | False         | Whether to resume an incomplete download.                                           |\n| token           | string         | None          | API token for Civitai authentication.                                               |\n| include_params  | bool           | False         | Whether to include parameters in the returned data.           |\n| skip_error      | bool           | False         | Whether to skip errors and return None.                                             |\n\n### Search Huggingface<a name = \"Search_Huggingface\"></a>\n\n> [!TIP]\n> **If an error occurs, insert the `token` and run again.**\n\n#### `EasyPipeline.from_huggingface` parameters\n\n| Name                  | Type                | Default        | Description                                                      |\n|:---------------------:|:-------------------:|:--------------:|:----------------------------------------------------------------:|\n| search_word           | string, Path        | \u30fc             | The search query string. Can be a keyword, Hugging Face URL, local directory or file path, or a Hugging Face path (`<creator>/<repo>`). |\n| checkpoint_format     | string              | `single_file`  | The format of the model checkpoint.<br>\u25cf `single_file` to search for `single file checkpoint` <br>\u25cf`diffusers` to search for `multifolder diffusers format checkpoint` |\n| torch_dtype           | string, torch.dtype | None           | Override the default `torch.dtype` and load the model with another dtype. |\n| force_download        | bool                | False          | Whether or not to force the (re-)download of the model weights and configuration files, overriding the cached versions if they exist. |\n| cache_dir             | string, Path        | None           | Path to a directory where a downloaded pretrained model configuration is cached if the standard cache is not used.   |\n| token                 | string, bool        | None           | The token to use as HTTP bearer authorization for remote files.  |\n\n\n#### `search_huggingface` parameters\n\n| Name                  | Type                | Default        | Description                                                      |\n|:---------------------:|:-------------------:|:--------------:|:----------------------------------------------------------------:|\n| search_word           | string, Path        | \u30fc             | The search query string. Can be a keyword, Hugging Face URL, local directory or file path, or a Hugging Face path (`<creator>/<repo>`). |\n| checkpoint_format     | string              | `single_file`  | The format of the model checkpoint. <br>\u25cf `single_file` to search for `single file checkpoint` <br>\u25cf`diffusers` to search for `multifolder diffusers format checkpoint` |\n| pipeline_tag          | string              | None           | Tag to filter models by pipeline.                                |\n| download              | bool                | False          | Whether to download the model.                                   |\n| force_download        | bool                | False          | Whether or not to force the (re-)download of the model weights and configuration files, overriding the cached versions if they exist. |\n| cache_dir             | string, Path        | None           | Path to a directory where a downloaded pretrained model configuration is cached if the standard cache is not used.   |\n| token                 | string, bool        | None           | The token to use as HTTP bearer authorization for remote files.  |\n| include_params        | bool                | False         | Whether to include parameters in the returned data.               |\n| skip_error            | bool                | False         | Whether to skip errors and return None.                           |\n\n\n## License<a name = \"License\"></a>\nIn accordance with [Apache-2.0 license](https://github.com/suzukimain/auto_diffusers/blob/master/LICENSE)\n\n\n## Acknowledgement<a name = \"Acknowledgement\"></a>\n\nI have used open source resources and free tools in the creation of this project.\n\nI would like to take this opportunity to thank the open source community and those who provided free tools.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0 License",
    "summary": "Customized diffusers with model search and other functions.",
    "version": "2.0.14",
    "project_urls": {
        "Homepage": "https://github.com/suzukimain/auto_diffusers"
    },
    "split_keywords": [
        "huggingface",
        "civitai",
        "diffusers",
        "model",
        "search",
        "deep",
        "learning",
        "diffusion",
        "pytorch",
        "stable",
        "diffusion"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "faa266ad94675596de6729d4f867abfb0c801c518c7935b9fce78d389ccd15e5",
                "md5": "bda0d6baf6539a29583720729dc0d300",
                "sha256": "a830666bca470aeb38abf632d9b05c130e2c08e2fff253a471876612ed13defb"
            },
            "downloads": -1,
            "filename": "auto_diffusers-2.0.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bda0d6baf6539a29583720729dc0d300",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18073,
            "upload_time": "2024-12-06T14:12:16",
            "upload_time_iso_8601": "2024-12-06T14:12:16.235253Z",
            "url": "https://files.pythonhosted.org/packages/fa/a2/66ad94675596de6729d4f867abfb0c801c518c7935b9fce78d389ccd15e5/auto_diffusers-2.0.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9fbd5c2092fce27dce43f35de2463e7fda578642f9ccc1ff2337b375c22de9b3",
                "md5": "833a80b5bb78efd39c741929ef61fb7b",
                "sha256": "9926986eaf7d1dc10dd6f12e6e84830e746c77a0f91acf0a395a42370ac9bb42"
            },
            "downloads": -1,
            "filename": "auto_diffusers-2.0.14.tar.gz",
            "has_sig": false,
            "md5_digest": "833a80b5bb78efd39c741929ef61fb7b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19466,
            "upload_time": "2024-12-06T14:12:17",
            "upload_time_iso_8601": "2024-12-06T14:12:17.947989Z",
            "url": "https://files.pythonhosted.org/packages/9f/bd/5c2092fce27dce43f35de2463e7fda578642f9ccc1ff2337b375c22de9b3/auto_diffusers-2.0.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-06 14:12:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "suzukimain",
    "github_project": "auto_diffusers",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "auto-diffusers"
}
        
Elapsed time: 0.37882s