How do you load multiple concepts and tokens at once?

As the title says, how can this be achieved? Is this possible? Like if you name each bin as the concept name, would the tokenizer and text encoder accept all the concepts in the embeds path, as well as take all the tokens? Does anyone have an example? I’m thinking it’d be cool to just an option to load the HF concepts library at once, and then to try and out stuff, or in combination, use their tokens.

This is possible, but not done automatically. In the textual inversion inference notebook there’s code to load one of the trained embeddings. Essentially, repeating the process you could download several trained concepts at once and use them all in a single prompt.

That’s sorta what I figured, but wasn’t entirely sure. It looked like the names for the methods actually expected multiple embeds to be loaded, not just one.

Another question. In that notebook, it has a hidden example for loading a manual embed from URL. But when I do this, I get a invalid v error. Is this feature currently broken? It seems to be related to manually adding the token for the downloaded embed instead of using token file.

I think that cell should work if you put an URL to a embeddings file in embeds_url and leave the other one empty. For example, you can try this URL: https://huggingface.co/sd-concepts-library/alf/resolve/main/learned_embeds.bin that I took from the “Files” tab of the corresponding concept trained by a community member here.

The downside is that you need to know the token that was used for training. You can easily print it in the notebook by adding a line print(trained_token) as the last line of the function in the next cell, as shown here: