ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Broken prompt weighting

Open notdanilo opened this issue 1 year ago • 4 comments

Expected Behavior

prompts person (smiling:0.0) & person should be similar In other worlds: prompt = person + smiling * 0.0 => prompt = person

These are outputs from InvokeAI person smiling person smiling person person person (smiling)0.0 person (smiling)0 0 person (smiling)1.0 person (smiling)1 0

Actual Behavior

image

Steps to Reproduce

workflow.json

Debug Logs

Nothing important here.

Other

No response

notdanilo avatar Aug 22 '24 20:08 notdanilo

It's also important to note that person (smiling:0.0) also outputs a person smiling.

notdanilo avatar Aug 22 '24 20:08 notdanilo

It's also important to note that person (smiling:0.0) also outputs a person smiling.

What about the space between person and smiling? As far as I know, there's a difference between person and person , which means they will tokenize differently. You should put the space in the parenthesis with your weighted word/phrase. That way, if they are equal to 0.0, it should remove them, along with the empty space.

RandomGitUser321 avatar Aug 23 '24 00:08 RandomGitUser321

I see your point and I will bring these examples. But I suspect that “person ” should be closer to “person” than “person smiling”.

Em qui., 22 de ago. de 2024 às 21:08, RandomGitUser321 < @.***> escreveu:

It's also important to note that person (smiling:0.0) also outputs a person smiling.

What about the space between person and smiling? As far as I know, there's a difference between person and person , which means they will tokenize differently. You should put the space in the parenthesis with your weighted word.

— Reply to this email directly, view it on GitHub https://github.com/comfyanonymous/ComfyUI/issues/4550#issuecomment-2305944331, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIFAVAOAZDUBP5QJLZ37KTZSZ4QHAVCNFSM6AAAAABM65IGJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVHE2DIMZTGE . You are receiving this because you authored the thread.Message ID: @.***>

notdanilo avatar Aug 23 '24 02:08 notdanilo

Interpretation of weighting is not that simple. Each tool has its own interpretation of weighting.

I recommend reading the Intuition behind weight interpretation methods part in this repo. https://github.com/BlenderNeko/ComfyUI_ADV_CLIP_emb

ltdrdata avatar Aug 24 '24 00:08 ltdrdata