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

Dealing with CLIP's 77 token limit #49

Open
yhdanid opened this issue Jan 22, 2024 · 2 comments
Open

Dealing with CLIP's 77 token limit #49

yhdanid opened this issue Jan 22, 2024 · 2 comments

Comments

@yhdanid
Copy link

yhdanid commented Jan 22, 2024

Often when processing the generation request, a message like this is printed out, "The following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: [" and then a list of what was truncated is shown.

This 77 token limit makes for a very short prompts that can frustrate producing good or desirable results. While I understand that this is not an exclusive PhotoMaker's issue, as others have certainly faced the same issue, it is my understanding however that a solution to this problem was implemented in most UI's of SD software.

Researching this matter, I've even come across a working solution proposed on the diffusers github issue's page [1]. There is also the Compel library [2]. It would be nice if some solution is implemented to allow a longer prompt in this implementation of PhotoMaker.

Regards

[1] huggingface/diffusers#2136 (comment)
[2] https://github.com/damian0815/compel#compel

@xpeng
Copy link

xpeng commented Feb 5, 2024

is there any node for ComfyUI can link or weighted multiple prompt text(each less than 77 tokens) to one output?

@jslegers
Copy link

Related : huggingface/diffusers#2136

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

3 participants