ComfyUI Node
Prompt Token Counter (Text-Driven)
A prompt token counter node designed for Stable Diffusion 1.5 and SDXL. Executing this node or running the project calculates an approximate token count for the generation prompt. Because a strictly accurate calculation requires a massive dictionary, the algorithm is simplified, making this count a close estimate for reference only. - 65 tokens or fewer: Background turns Green. - 66 to 75 tokens: Background turns Yellow. - 76 tokens or more: Background turns Red. Tokens beyond 76 are pushed into the second chunk (section) or later. These tokens have a significantly lower probability of being referenced during rendering, potentially causing image degradation or generation breakdown.
Prompt Token Counter (Text-Driven)
◄prompt—►
CategoryText-Driven Workflows
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — |
Outputs (0)
No outputs