ComfyUI > Nodes > Endless ️🌊✨ Nodes > Prompt Counter

ComfyUI Node: Prompt Counter

Class Name

PromptCounter

Category
Endless 🌊✨/BatchProcessing
Author
BiffMunky (Account age: 3336days)
Extension
Endless ️🌊✨ Nodes
Latest Updated
2025-07-25
Github Stars
0.07K

How to Install Endless ️🌊✨ Nodes

Install this extension via the ComfyUI Manager by searching for Endless ️🌊✨ Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Endless ️🌊✨ Nodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Prompt Counter Description

Efficiently counts and previews text prompts for AI art, supporting pipe/newline formats.

Prompt Counter:

The PromptCounter node is designed to efficiently process and count multiple text prompts, which are essential in AI art generation workflows. This node is particularly useful for managing and organizing prompts that are either pipe-separated or newline-separated, allowing for flexibility in input formats. By counting the number of prompts and providing a preview of the first few, it helps you quickly assess the volume and content of your input data. This functionality is beneficial for artists who need to handle large batches of prompts, ensuring that they can easily manage and verify their inputs before proceeding with further processing or generation tasks. The node also offers an option to print the results to the console, providing immediate feedback and enhancing the user experience.

Prompt Counter Input Parameters:

prompts

The prompts parameter is a string input that contains the text prompts you wish to process. These prompts can be formatted either as pipe-separated or newline-separated strings, allowing for flexibility depending on your data source. The node will parse this input to count the number of distinct prompts, which is crucial for batch processing tasks. There are no specific minimum or maximum values for this parameter, but it should contain at least one valid prompt to avoid errors.

The print_to_console parameter is a boolean input that determines whether the results of the prompt counting should be printed to the console. When set to True, the node will output the count and a preview of the prompts directly to the console, providing immediate feedback. This can be particularly useful for debugging or when you need to quickly verify the input data. The default value is typically False, meaning the console output is optional and can be enabled as needed.

Prompt Counter Output Parameters:

count

The count output parameter represents the total number of prompts identified in the input string. This integer value is crucial for understanding the scale of your input data and for planning subsequent processing steps. It provides a clear indication of how many prompts will be handled in the next stages of your workflow.

preview

The preview output parameter is a string that provides a brief overview of the first few prompts from the input. This preview includes the total count of prompts and lists the first five prompts, if available, followed by an indication of any additional prompts not shown. This output is valuable for quickly verifying the content and structure of your input data, ensuring that it aligns with your expectations before proceeding.

Prompt Counter Usage Tips:

  • Use the print_to_console option to quickly verify the number and content of your prompts, especially when working with large datasets.
  • Ensure your prompts are correctly formatted as either pipe-separated or newline-separated strings to avoid parsing errors and ensure accurate counting.

Prompt Counter Common Errors and Solutions:

No valid prompts found. Please enter at least one prompt.

  • Explanation: This error occurs when the input string does not contain any valid prompts, possibly due to incorrect formatting or an empty input.
  • Solution: Check your input string to ensure it contains at least one valid prompt, formatted correctly as either pipe-separated or newline-separated text.

Error encoding prompt <i+1> '<prompt>': <e>

  • Explanation: This error indicates a problem with encoding a specific prompt, which could be due to unsupported characters or an issue with the encoding process.
  • Solution: Review the problematic prompt for any unusual characters or formatting issues. If necessary, simplify the prompt or use a fallback encoding method.

Prompt Counter Related Nodes

Go back to the extension to check out more related nodes.
Endless ️🌊✨ Nodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.