Uh oh!
There was an error while loading. Please reload this page.
[Pipeline] Enhancements to AutoPipeline - #10006
Conversation
bghira
commented
Nov 24, 2024
cc @vladmandic check this out 😹 oh god @suzukimain you genius. thank you. |
i have something similar, but this is pretty clean! needs a bit of cleanup to actually use params - e.g., instead of
use actual |
yiyixuxu
commented
Nov 26, 2024
hi @suzukimain If you make this tool as separate repo, we are happy to add it to our doc and help promote it! |
suzukimain
commented
Nov 26, 2024
Originally, this PR was incorporated into |
bghira
commented
Nov 26, 2024
assuming huggingface doesnt want to support a competitor even if it benefits the user or this project. bummer |
Sorry, what do you mean by “competitor”? |
bghira
commented
Nov 26, 2024
CivitAI as a model hosting provider |
suzukimain
commented
Nov 26, 2024
Oh, I see |
yiyixuxu
commented
Nov 26, 2024
@suzukimain feel free to dress it up and write a nice introduction about it! |
asomoza
commented
Nov 26, 2024
@suzukimain this is cool and I agree that it would work a lot better as an external tool with your library. Do you have plans for something similar with loras? |
suzukimain
commented
Nov 27, 2024
The functions DetailsBy the way, the fromhuggingface_hubimporthf_apiinfo=hf_api.model_info(
"stable-diffusion-v1-5/stable-diffusion-v1-5",
expand=["baseModels"]
)
print(info.baseModels)
# AttributeError: 'ModelInfo' object has no attribute 'baseModels'diffusers/src/diffusers/pipelines/auto_pipeline.py Lines 783 to 791 in dbe8fcb fromdiffusers.pipelines.auto_pipelineimport (
search_huggingface,
search_civitai,
) # Search LoraLora=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 TextualInversionTextualInversion=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") |
yiyixuxu
commented
Nov 28, 2024
cc @stevhliu, where should this go if we want to add a doc page about it (as an external library)? |
suzukimain
commented
Nov 29, 2024
Made it available for use as an external tool.
Made it as usable as possible in the same way as a pull request. pipinstall--quietauto_diffusersfromauto_diffusersimportEasyPipelineForText2Image# Search for Huggingfacepipe=EasyPipelineForText2Image.from_huggingface("any").to("cuda")
img=pipe("cat").images[0]
img.save("cat.png")
# Search for Civitaipipe=EasyPipelineForText2Image.from_civitai("any").to("cuda")
image=pipe("cat").images[0]
image.save("cat.png") |
stevhliu
commented
Dec 2, 2024
suzukimain
commented
Dec 2, 2024
Based on this advice, I have made some revisions here. Is it okay to apply these changes? |
suzukimain
commented
Dec 3, 2024
I intend to apply the changes in this way. |
stevhliu
commented
Dec 3, 2024
Yeah thats fine with me, feel free to apply the changes in #9986 :) |
suzukimain
commented
Dec 15, 2024
hi @stevhliu , What should I do with this PR? |
stevhliu
commented
Dec 16, 2024
I think this can be closed since we your project is here https://github.com/huggingface/diffusers/tree/main/examples/model_search now :) |
suzukimain
commented
Dec 16, 2024
suzukimain
commented
Dec 24, 2024
Add this functionality to auto_diffusers and close this as #9986 and #10358 have been merged. thank you! |
What does this PR do?
This PR adds the ability to automatically search for models from
civitaiandhuggingfacein AutoPipeline and enables the loading of single file checkpoints.From #9986
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@yiyixuxu@asomoza@bghira