diffusers with search engine
Project description
CONTENTS
About The Project
Enhance the functionality of diffusers.
- Search models from Hugging Face and Civitai.
- Officially listed in the Hugging Face Diffusers Community Projects documentation.
Image of the listing location on Hugging Face
Regarding the Civitai API bug
Due to recent specification changes in the Civitai API, we are aware of the following issues:
- Reduced search accuracy
- Some search results not being returned
A temporary workaround has been implemented for the above issues, but since certain search results are still not returned, there is a possibility that some models may not be found.
link: civitai/civitai#1757
How to use
pip install --quiet auto_diffusers
from auto_diffusers import EasyPipelineForText2Image
# Search for Huggingface
pipe = EasyPipelineForText2Image.from_huggingface("search_word").to("cuda")
img = pipe("cat").images[0]
img.save("cat.png")
# Search for Civitai
pipe = EasyPipelineForText2Image.from_civitai("search_word").to("cuda")
image = pipe("cat").images[0]
image.save("cat.png")
Search Civitai and Huggingfacee
# Load Lora into the pipeline.
pipe.auto_load_lora_weights("Detail Tweaker")
# Load TextualInversion into the pipeline.
pipe.auto_load_textual_inversion("EasyNegative", token="EasyNegative")
Search Civitai
[!TIP] If an error occurs, insert the
tokenand 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. (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. (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
[!TIP] If an error occurs, insert the
tokenand 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. ● single_file to search for single file checkpoint ● 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. ● single_file to search for single file checkpoint ● 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
In accordance with Apache-2.0 license
Acknowledgement
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file auto_diffusers-2.0.36.tar.gz.
File metadata
- Download URL: auto_diffusers-2.0.36.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7af74f3ccacf9e4bb3ad4613b9642eb6838333aaa52e721b4450078bc12efeec
|
|
| MD5 |
bfdb19b174d82f2d1d3153135ef221d2
|
|
| BLAKE2b-256 |
7c17e16319b6df5fafe04c483d26ececf9e05d3b80e259a0389d5bdf8b75f496
|
File details
Details for the file auto_diffusers-2.0.36-py3-none-any.whl.
File metadata
- Download URL: auto_diffusers-2.0.36-py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
866725471057b9f6ff43aef0099371391802211005cf4ced408e74f86bbb528d
|
|
| MD5 |
5f5c492d692170d31507dedded416ca7
|
|
| BLAKE2b-256 |
0b4b1b7b9abb1b5d1d71dd30acc94e51306b9fa11f62305f18fa56b852fda461
|