Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-CustomNodeKit > 索引选择器

ComfyUI Node: 索引选择器

Class Name

IndexSelectorNode

Category
Custom Nodes
Author
user2318 (Account age: 2574days)
Extension
ComfyUI-CustomNodeKit
Latest Updated
2026-07-16
Github Stars
0.05K

How to Install ComfyUI-CustomNodeKit

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

索引选择器 Description

Efficiently extract specific paths from multi-line strings for easy file path management and retrieval.

索引选择器:

The IndexSelectorNode is designed to efficiently extract specific paths from a multi-line string of paths, which can be particularly useful when dealing with large datasets or collections of file paths. This node allows you to specify an index to select a particular path from the list, making it easier to manage and utilize specific files within a larger collection. By providing a straightforward method to access individual paths, the IndexSelectorNode simplifies the process of handling file paths, ensuring that you can quickly and easily retrieve the exact path you need for further processing or analysis. This functionality is especially beneficial in scenarios where paths are dynamically generated or collected from various sources, allowing for seamless integration and manipulation within your workflow.

索引选择器 Input Parameters:

combined_string

The combined_string parameter is a multi-line string input that contains paths, with each path on a separate line. This parameter serves as the source from which specific paths will be selected based on the provided index. It is crucial for the node's operation as it provides the data set from which a particular path is extracted. The input is expected to be a string, and it is important to ensure that each path is correctly formatted and separated by a newline character. This parameter does not have a default value, as it is required for the node to function.

index

The index parameter is an integer that specifies which path to select from the combined_string. It starts from 0, meaning that an index of 0 will select the first path in the list. The parameter allows you to pinpoint the exact path you wish to extract, providing flexibility and precision in handling file paths. The default value is 0, with a minimum value of 0 and a maximum value of 1000. If the index is out of range, the node will output an empty string, indicating that no valid path was found at the specified index.

索引选择器 Output Parameters:

selected_path

The selected_path output is a string that contains the path selected based on the provided index. This output is crucial as it represents the specific path extracted from the combined_string, allowing you to use it in subsequent operations or nodes. If the index is out of range, this output will be an empty string, indicating that no valid path was selected.

file_name

The file_name output is a string that represents the name of the file extracted from the selected path. This output is useful for identifying the specific file within the path, enabling further file-specific operations or manipulations. If the index is out of range, this output will be an empty string.

last_folder

The last_folder output is a string that denotes the last folder in the path hierarchy of the selected path. This output provides context about the directory structure of the selected path, which can be useful for organizing or categorizing files. If the index is out of range, this output will be an empty string.

索引选择器 Usage Tips:

  • Ensure that the combined_string input is correctly formatted with each path on a new line to avoid unexpected results.
  • Use the index parameter to precisely select the path you need, keeping in mind that it starts from 0.
  • If you are unsure about the number of paths in the combined_string, consider implementing a check to avoid out-of-range errors.

索引选择器 Common Errors and Solutions:

Index out of range

  • Explanation: This error occurs when the specified index is greater than the number of paths available in the combined_string.
  • Solution: Verify the number of paths in the combined_string and ensure that the index is within the valid range.

Empty combined_string

  • Explanation: If the combined_string is empty or not properly formatted, the node will not be able to extract any paths.
  • Solution: Check that the combined_string contains valid paths, each separated by a newline character, and is not empty.

索引选择器 Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-CustomNodeKit
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.

索引选择器