-
Notifications
You must be signed in to change notification settings - Fork 47
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
Prompt Size not Equal to Each Other #95
Comments
same here |
Hello, thank you for reporting the issue. Could you also provide an exact reproducer with the prompts used to generate this error? |
@cavusmustafa I am also getting the exact same error. I'll provide the prompts and console output inline here and would be happy to assist with debugging. The bug occurs when there are an unequal length of 75 token chunks between the positive and negative prompts. In my provided example, the positive prompt falls into the first 75 token chunk and the negative extends into the second chunk (150 tokens). Note that if the positive prompt also extends into the second chunk and each are logically 150 tokens, the script will work. Any time they are unequal, it will fail. Positive Prompt:
Negative Prompt:
Steps to reproduce the problem Use the prompts supplied above, or any other prompts that extend the token length past the initial 75 token limit, into a second chunk for either the negative or positive prompt. The issue is very easy to reproduce if one of your prompts is long and the other is short. Full console output, including prompts
|
It's not a fix, but it works for me if I remove all negative embeddings (like "badhandv4", "CyberRealistic_Negative-neg", etc.). It also helps to remove all BREAK, make negative prompt shorter. But it doesn't always work. |
same proplem,any Negative Prompt input will report this error |
Not any - just no equal. |
met the same issue |
Working on a fix for this, will update on this thread |
Is there an existing issue for this?
What happened?
Positive Prompt maximum token size does not equal negative prompt maximum token size or denominator size. There is no max, but its like the fraction of prompts and how its arranged.
Steps to reproduce the problem
Basically use automatic1111 to go over 75 tokens for positive prompt and leave negative prompt blank. So I get 100/150 for positive and 0/75 for negative prompt. Basically the prompts must equal. It is not token size of maximum for each, but rather they must equal each other. Positve prompt denominator must equal negative prompt denominator. Eg: 1/75 =33/75. 100/150 = 81/150. Those work, but not when the denominators not equal. Eg: 1/75 100/150. 100/150 1/75.
What should have happened?
It should work no matter what size of prompt for positive or negative.
Sysinfo
ValueError:
prompt_embeds
andnegative_prompt_embeds
must have the same shape when passed directly, but got:prompt_embeds
torch.Size([1, 154, 768]) !=negative_prompt_embeds
torch.Size([1, 77, 768]).What browsers do you use to access the UI ?
No response
Console logs
Additional information
Please make an easy way to solve this in stable diffusion open vino toolkit. I am a newbie at editing python codes for open vino so I may struggle. Having an easy replaced script in the stable diffusion files or a minor edit that works on all models and loras, etc.
Thanks if reply.
The text was updated successfully, but these errors were encountered: