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

[Help request] "mask_token" input and multiple attributes example #11

Open
MoonMoon82 opened this issue May 30, 2023 · 1 comment
Open

Comments

@MoonMoon82
Copy link

Great work! For simple prompts like in your example, these nodes are great!

But, could you please add an example of the "Cutoff Regions To Conditioning" node regarding the "mask_token" input?
I can't figure out for what and how it can be used.
It would also be helpful if you can show how to deal with multiple attributes like "white black striped tie".

Thank you in advance!

@BlenderNeko
Copy link
Owner

the mask_token is the thing that is used to mask off the target words in the prompt. This can be any textual representation of a token, but is best set to something neutral, when you leave this blank it will default to the end of sentence token, but you could also put e.g. , in that box. Then when you have e.g. blue hair, yellow eyes with the targets blue and yellow and the regions blue hair, and yellow eyes it will create the prompts , hair , yellow eyes and blue hair, , eyes.

as for the second question, you can have multiple targets per region.

target_text: defines the set of tokens that will be masked off (i.e. the tokens we wish to limit to the region) this is a space separated list of words. If you want to match a sequence of words use underscores instead of spaces, e.g. "a_series_of_connected_tokens". If you want to match a word that actually contains underscores escape the underscore, e.g. "the_target_tokens". You can target textual inversion embeddings using the default syntax but do note that any underscores in the name of the embedding have to be escaped in this input field.

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