compel icon indicating copy to clipboard operation
compel copied to clipboard

Show prompt splitting in token log

Open whosawhatsis opened this issue 2 years ago • 2 comments

Since Compel is now handling long prompts for invoke, is it also producing the tokenization log data? I'd really like to see the tokenization log include information about where the prompt was split. I've noticed that images with a photorealistic or nearly-photorealistic style are becoming more 3D-animated-cartoony style when I go over 75 tokens and that logic kicks in. I'm currently experimenting with duplicating that part of the prompt in the second part, but it's tricky with the token log not marking the cutoff point...

Still testing, but I'm getting much better results by splitting up a bunch of my style-enhancing stuff between the beginning and the end of the prompt. The prompt is also pushing 140 tokens now, so filling out the second prompt might be a big part of it. Still experimenting.

whosawhatsis avatar Mar 30 '23 10:03 whosawhatsis

i'm not ignoring this, i've just been trying to come up with a clean architecture for exposing the finally-assembled token tensor that compel assembles from the weighted/blended/cross-attention-controlled/... fragments.......

damian0815 avatar Apr 03 '23 12:04 damian0815

Hmm, yeah, that is tricky...

You could use a multi-dimensional array... I guess the first layer would be two elements (positive and negative), then within each of those, you'd have a layer for blends (each of which also needs to be tagged with a weight, so that might take two layers?). Then within that, you'd need to have an array of 75-token prompts for concatenation, then you need another double layer for weighted prompt fragments, then (unless you just show an individual weight for each token, rather than for fragments), you'd need one more layer for individual tokens within a fragment.

And all of that still doesn't account for swap().

whosawhatsis avatar Apr 03 '23 19:04 whosawhatsis