ComfyUI > Nodes > ComfyUI-Addoor > 🌻 Text Indexer

ComfyUI Node: 🌻 Text Indexer

Class Name

AD_TextIndexer

Category
🌻 Addoor/Batch
Author
ADDOOR (Account age: 2884days)
Extension
ComfyUI-Addoor
Latest Updated
2025-01-24
Github Stars
0.03K

How to Install ComfyUI-Addoor

Install this extension via the ComfyUI Manager by searching for ComfyUI-Addoor
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Addoor 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

🌻 Text Indexer Description

Efficiently manage and index text entries for sequential or random access, with flexibility in retrieval methods and optional file name association.

🌻 Text Indexer:

The AD_TextIndexer node is designed to efficiently manage and index a list of text entries, providing a systematic way to access and utilize these texts in a sequential or random manner. This node is particularly useful for tasks that require batch processing of text data, such as generating prompts or managing datasets for AI art projects. By allowing you to specify an increment for sequential access or a seed for random selection, the AD_TextIndexer offers flexibility in how texts are indexed and retrieved. It also supports optional file name association, which can be useful for tracking or organizing text entries. The node's ability to filter out system files ensures that only relevant text data is processed, enhancing its utility in various creative workflows.

🌻 Text Indexer Input Parameters:

texts

This parameter accepts a list of text entries that you want to index. It is the core input for the node, as it determines the pool of texts from which selections will be made. If a single text is provided, it will be converted into a list. This parameter is required and must be provided for the node to function.

increment

The increment parameter controls the sequential selection of text entries. It determines how many steps forward the index should move after each selection. A value of 0 will result in random selection based on the seed, while a positive integer will increment the index by that amount. The default value is 1, with a minimum of 0 and a maximum of 1000.

seed

The seed parameter is used to initialize the random number generator when increment is set to 0, allowing for reproducible random selections. It ensures that the same sequence of random selections can be generated if the same seed is used. The default value is 0, with a minimum of 0 and a maximum of 18,446,744,073,709,551,615 (0xffffffffffffffff).

file_names

This optional parameter allows you to associate a list of file names with the text entries. If provided, each selected text will be paired with its corresponding file name. If not provided, the index will be used as the file name. This parameter is useful for organizing or tracking text entries.

index

The index parameter specifies the starting point for text selection. It allows you to begin indexing from a specific text entry. A value of 0 or 1 will start from the first text. This parameter is optional, with a default value of 0, and it must be an integer.

🌻 Text Indexer Output Parameters:

text

This output provides the selected text entry based on the current index or random selection. It is the primary output of the node, representing the text that has been indexed and retrieved.

file_name

The file_name output gives the name associated with the selected text. If file_names were provided, it will be the corresponding file name; otherwise, it will be a generated name based on the index.

current_index

This output indicates the current index position within the list of texts. It reflects the position of the selected text and is useful for tracking the progress of text indexing.

total_texts

The total_texts output provides the total number of text entries available for indexing. It helps in understanding the scope of the text data being processed.

🌻 Text Indexer Usage Tips:

  • To ensure consistent random selections, use the same seed value across different runs when increment is set to 0.
  • Utilize the file_names parameter to maintain a clear association between texts and their corresponding files, especially when dealing with large datasets.
  • Adjust the increment value to control the pace of sequential text selection, which can be useful for batch processing tasks.

🌻 Text Indexer Common Errors and Solutions:

Invalid input type for texts

  • Explanation: The texts parameter must be a list or a single string that can be converted into a list.
  • Solution: Ensure that the input for texts is either a list of strings or a single string.

Increment or seed not an integer

  • Explanation: The increment and seed parameters must be integers.
  • Solution: Verify that the values provided for increment and seed are integers, and convert them if necessary.

Index out of range

  • Explanation: The specified index is outside the range of available text entries.
  • Solution: Check that the index value is within the bounds of the text list length and adjust it accordingly.

🌻 Text Indexer Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Addoor
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 Playground, enabling artists to harness the latest AI tools to create incredible art.