Nodes/ComfyUI Text-Driven Workflows/Prompt Token Counter (Text-Driven)
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.

By kanryu·Created 3 months ago·Updated 3 months ago· 0
Prompt Token Counter (Text-Driven)
      prompt
      CategoryText-Driven Workflows

      Inputs (1)

      NameTypeDefaultDescription
      promptSTRING

      Outputs (0)

      No outputs