damian0815 / compel

A prompting enhancement library for transformers-type text embedding systems
MIT License
519 stars 47 forks source link

Incorrect pooled embeds #96

Open BitPhinix opened 2 months ago

BitPhinix commented 2 months ago

While benchmarking our internal prompt weighting, I noticed that compel's pooled embeddings change with different prompt weighting.

I.e. pooled embeds of test != pooled embeds of (test)0.9. Compel tokenizes and encodes the prompt string, including weighting syntax, for the pooled embeds. This doesn't seem intuitive or expected.

I don't have the bandwidth to create a PR for this, but it should be quite simple to fix.

bonlime commented 1 month ago

@BitPhinix why do you think we need to pool the original prompt string? let's say i have a prompt "a girl with (green)0.2 hair" where i want "green" to be very slow, in the pooled prompt I want it to be small as well