Customized diffusers with model search and other functions.
Project description
auto_diffusers
CONTENTS
About The Project
Enhance the functionality of diffusers.
- Search models from huggingface and Civitai. (etc..)
How to use
pip install diffusers
pip install auto_diffusers
from diffusers import StableDiffusionPipeline
from auto_diffusers import run_search
model_path = run_search(<keyword>, auto=True, download=False)
pipe = StableDIffusionPipeline.from_single_file(model_path)
Example
pip install --quiet diffusers
pip install --quiet auto_diffusers
from diffusers import StableDiffusionPipeline
from IPython.display import display
from auto_diffusers import run_search
model_path = run_search("Any", auto=True, model_format="diffusers", download=False)
pipe = StableDiffusionPipeline.from_pretrained(model_path).to("cuda")
image = pipe("Mt. Fuji").images[0]
print(f"model_path: {model_path}")
display(image)
Description
Arguments of
run_search
Name | Type | Default | Input Available | Description |
---|---|---|---|---|
search_word | string | ー | Details | Keywords to search models |
auto | bool | True | ー | Minimize user input by selecting the highest-rated models. |
download | bool | False | ー | Returns the path where the file was downloaded. |
model_format | string | "single_file" | all ,diffusers ,single_file |
Specifies the format of the model. Details |
model_type | string | "Checkpoint" | Checkpoint ,TextualInversion ,Hypernetwork ,AestheticGradient ,LORA ,Controlnet ,Poses |
Valid only in Civitai. |
return_path | bool | True | ー | Returns only the path or [model_path, status_dict] . |
branch | string | "main" | ー | Specify the branches of huggingface and civitai. |
local_file_only | bool | False | ー | Search local folders only. In the case of auto , files with names similar to search_word will be given priority. |
search_word
Type | Description |
---|---|
keyword | Keywords to search model |
url | Can be any URL other than huggingface or Civitai. |
Local directory or file path | Search for files with the extensions: .safetensors , .ckpt , .bin |
huggingface path | The following format: < creator > / < repo > |
model_format
Argument | Description |
---|---|
all | In auto, multifolder diffusers format checkpoint takes precedence |
single_file | Only single file checkpoint are searched. |
diffusers | Search only for multifolder diffusers format checkpoint Note that only the huggingface is searched for, since it is not in civitai. |
License
In accordance with BSD-3-Clause 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
auto_diffusers-1.4.7.tar.gz
(40.5 kB
view hashes)
Built Distribution
Close
Hashes for auto_diffusers-1.4.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cc8fe4b017b591c551a1ddeaffbbcaf10a1f90c2398621d91766ba3a6f5646e |
|
MD5 | 5133ae4d03f09e45ab01d8df7453bd3e |
|
BLAKE2b-256 | e4bcf709adf863dc4e2cf5cec7056f62004897de5ab266d4332636764fbb0261 |