Skip to content
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

Loading huggingface textual inversions #513

Closed
tmm1 opened this issue Sep 12, 2022 · 4 comments
Closed

Loading huggingface textual inversions #513

tmm1 opened this issue Sep 12, 2022 · 4 comments

Comments

@tmm1
Copy link

tmm1 commented Sep 12, 2022

🤗/sd-concepts-library has prettained textual inversions: https://huggingface.co/sd-concepts-library

would be nice to be able to easily load and use these

cc AUTOMATIC1111/stable-diffusion-webui#151

@lstein
Copy link
Collaborator

lstein commented Sep 12, 2022

The ability to read hugging face .bin files was just added today. You'll find it in the development branch, and documented in docs/features/TEXTUAL_INVERSION.md

@tmm1
Copy link
Author

tmm1 commented Sep 12, 2022

@tmm1 tmm1 closed this as completed Sep 12, 2022
@tmm1
Copy link
Author

tmm1 commented Sep 12, 2022

Looks like training doesn't yet work on M1. Has anyone started looking into this already?

EDIT: #517 (comment)

@tmm1
Copy link
Author

tmm1 commented Sep 13, 2022

I confirmed that this does work.

For example, download https://huggingface.co/sd-concepts-library/ugly-sonic/blob/main/learned_embeds.bin and save as uglysonic.bin

Then run scripts/dream.py --embedding_path uglysonic.bin and you will see:

>> Model loaded in 13.71s
Added terms: *, <ugly-sonic>

Then use the prompt "a photo of <ugly-sonic>" and you will get a photo:

000318 458685514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants