shiimizu / ComfyUI-PhotoMaker-Plus

PhotoMaker for ComfyUI
GNU General Public License v3.0
210 stars 21 forks source link

Prompts after trigger word #39

Open Shady319 opened 1 week ago

Shady319 commented 1 week ago

Perhaps not a bug but I just want to confirm;

Anything I enter after the trigger word is ignored. If I start with “photo of girl img in a red dress” then I get a closeup photo of just the face.

If I enter “photo of a girl in a red dress img” then I get a girl in a red dress, but the resemblance isn’t as strong as it would be if img was at the beginning.

I should add that I am use openai comfy, it shows no updates, and it did the same thing when I loaded the v2 example. Before the most recent update though I do know that the v2 example default prompt would render per the prompt.

shiimizu commented 1 week ago

Yes, that's because the preceding token gets repeated n * 2 amount of times for v2, where n is the amount of images. It's just n for v1. So if you have 3 images and the word before img is man, there will be a total of 6 man tokens in the prompt (man * 3 * 2).

With the recent change, I added the * 2 cause I wanted it to be the same as the original code, but seems like it was okay before, since I got the same results if I just repeated my images twice using the RepeatImageBatch node.