Skip to content

[Community] Enhanced Model Search #10417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 6, 2025
Merged

Conversation

suzukimain
Copy link
Contributor

What does this PR do?

This PR adds the functionality to search for Lora and textual_inversion in Model Search, as mentioned in a previous comment

!wget https://raw.githubusercontent.com/suzukimain/auto_diffusers/refs/heads/master/src/auto_diffusers/pipeline_easy.py

from pipeline_easy import EasyPipelineForText2Image

pipeline = EasyPipelineForText2Image.from_civitai("Dream")
# checkpoint_path: https://civitai.com/models/4384?modelVersionId=128713

pipeline.auto_load_lora_weights("Detail Tweaker")
# lora_path: https://civitai.com/models/58390?modelVersionId=62833
# trained_words: None

pipeline.auto_load_textual_inversion("EasyNegative", token="EasyNegative")
# textual_inversion_path: EasyNegative -> https://civitai.com/models/7808?modelVersionId=9208

About textual_inversion

This is also related to #10373. Due to the incompatibility of textual_inversion between SD 1.5 and SD 2.1, I have made it dynamically obtained based on the shape of the tokenizer.

Other major changes

  • Update the map to load single-file checkpoints with AutoPipeline
  • Change the displayed URL when loading the model to the URL of the site where the model is hosted.

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Jan 31, 2025
@yiyixuxu yiyixuxu added close-to-merge and removed stale Issues that haven't received updates labels Jan 31, 2025
@yiyixuxu
Copy link
Collaborator

hi @suzukimain can you run make style?

@suzukimain
Copy link
Contributor Author

Hello @yiyixuxu I made some minor adjustments and ran make style.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@yiyixuxu yiyixuxu merged commit 145522c into huggingface:main Feb 6, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants