ComfyUI Node
Prompt Minimizer And Splitter Node (zer0)
A node that optimizes whitespace in a prompt and optionally chunks the prompt tag-wise by token count with a specified prompt separator.
Prompt Minimizer And Splitter Node (zer0)
- Optimized Prompt
- Chunked Prompt
- Token Count (Unoptimized)
- Token Count (Optimized)
◄input_string►
◄encoding_typegpt-4o►
◄token_count75►
◄separator BREAK ►
Categorytext utility
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| input_string | STRING | — | |
| encoding_type | COMBO | gpt-4o | The encoding type to use for tokenization |
| token_countopt | INT | 75 | The maximum prompt length before needing to be broken |
| separatoropt | STRING | BREAK | The separator to use when chunking the prompt |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| Optimized Prompt | STRING | The prompt after stripping whitespace |
| Chunked Prompt | STRING | The prompt after stripping whitespace and splitting |
| Token Count (Unoptimized) | INT | The token count of the unoptimized prompt |
| Token Count (Optimized) | INT | The token count of the optimized prompt |