Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
ComfyUI node that let you pick the way in which prompt weights are interpreted
| Date | Stars |
|---|---|
| 2026-07-24 | 439 |
| 2026-07-25 | 439 |
| 2026-07-28 | 439 |
| 2026-07-30 | 439 |
| 2026-08-06 | 439 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Advanced CLIP Text Encode This repo contains 4 nodes for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) that allows for more control over the way prompt weighting should be interpreted. --- ### BNK_CLIPTextEncodeAdvanced node settings To achieve this, a CLIP Text Encode (Advanced) node is introduced with the following 2 settings: #### token_normalization: determines how token weights are normalized. Currently supports the following options: - **none**: does not alter the weights. - **mean**: shifts weights such that the mean of all meaningful tokens becomes 1. - **length**: divides token weight of long words or embeddings between all the tokens. It does so in a manner that the magnitude of the weight change remains constant between different lengths of tokens. E.g. if a word is expressed as 3 tokens and it has a weight of 1.5 all tokens get a weight of around 1.29 because sqrt(3 * pow(0.35, 2)) = 0.5. - **length+mean**: divides token weight of long words, and then shifts the mean to 1. #### weight_interpretation: Determines how up/down weighting should be handled. Currently supports the following options: - **comfy**: the default in ComfyUI, CLIP vectors are lerped between the prompt and a completely empty prompt. - **A1111**: CLip vectors are scaled by their weight - **compel**: Interprets weights similar to [compel](https://github.com/damian0815/compel). Compel up-weights the same as comfy, but mixes masked embeddings to accomplish down-weighting (more on this later). - **comfy++**: When up-weighting, each word is lerped between the prompt and a prompt where the word is masked off. Additionally uses compel style down-weighting. - **down_weight**: rescales weights such that the maximum weight is one. This means that you will only ever be down-weighting. Uses compel style down-weighting. <details> <summary> Intuition behind weight interpretation methods </summary> ### up weighting the diagram below visualizes the 3 different way in which the 3 methods to transform the clip embeddings to achieve up-weighting  As can be seen, in A1111 we use weights to travel on the line between the zero vector and the vector corresponding to the token embedding. This can be seen as adjusting the magnitude of the embedding which both makes our final embedding point more in the direction the thing we are up weighting (or away when down weighting) and creates stronger activations out of SD because of the bigger numbers. Comfy also creates a direction starting from a single point but instead uses the vector embedding corresponding to a completely empty prompt. we are now traveling on a line that approximates the epitome of a certain thing. Despite the magnitude of the vector not growing as fast as in A1111 this is actually quite effective and can result in SD quite aggressively chasing concepts that are up-weighted. Comfy++ does not start from a single point but instead travels between the presence and absence of a concept in the prompt. Despite the idea being similar to that of comfy it is a lot less aggressive. #### visual comparison of the different methods Below a short clip of the prompt `cinematic wide shot of the ocean, beach, (palmtrees:1.0), at sunset, milkyway`, where the weight of palmtree slowly increasses from 1.0 to 2.0 in 20 steps. (made using [silicon29](https://huggingface.co/Xynon/SD-Silicon) in SD 1.5) https://user-images.githubusercontent.com/126974546/232336840-e9076b7c-3799-4335-baaa-992a6b8cad8a.mp4 ### down-weighting One of the issues with using the above methods for down-weighting is that the embedding vectors associated with a token do not just contain "information" about that token, but actually pull in a lot of context about the entire prompt. Most of the information they contain seemingly is about that specific token, which is why theses various up-weighting interpretations work,
Excerpt of 6,235 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:62f9c2a9e6ad17e8, topic:stable-diffusion, topic:comfyui