ComfyUI > Nodes > ComfyUI-LogicUtils > Manual Choice Int

ComfyUI Node: Manual Choice Int

Class Name

ManualChoiceInt

Category
Logic Gates
Author
aria1th (Account age: 3016days)
Extension
ComfyUI-LogicUtils
Latest Updated
2026-01-21
Github Stars
0.1K

How to Install ComfyUI-LogicUtils

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

Manual Choice Int Description

Parses a string to extract an integer based on a specified separator and index.

Manual Choice Int:

The ManualChoiceInt node is designed to parse a given input string, split it based on a specified separator, and return a specific choice as an integer. This node is particularly useful when you have a list of integer values embedded in a single string and you need to extract a particular value based on its position in the list. By allowing you to specify the separator and the index of the desired choice, this node provides flexibility in handling various string formats. Its primary goal is to facilitate the extraction of integer values from complex strings, making it a valuable tool for logic operations where precise integer selection is required.

Manual Choice Int Input Parameters:

input_string

The input_string parameter is a string that contains the list of integer values you want to parse. These values should be separated by a specific character, which you will define using the separator parameter. The default value for this parameter is "1$2$3", which means that the string contains three integer values separated by the $ character. This parameter is crucial as it holds the data from which you will extract your integer choice.

separator

The separator parameter defines the character used to split the input_string into individual choices. By default, this is set to "$", but you can change it to any character that suits your data format. The separator is essential for correctly parsing the input string and ensuring that the values are split accurately for selection.

index

The index parameter specifies the position of the integer value you wish to extract from the split list. It is an integer value with a default of 0, meaning it will select the first value in the list by default. The index must be within the range of available choices, starting from 0 up to the number of choices minus one. This parameter allows you to target and retrieve a specific integer from the list.

Manual Choice Int Output Parameters:

INT

The output of the ManualChoiceInt node is an integer, denoted as INT. This output represents the integer value extracted from the input_string based on the specified index. The importance of this output lies in its ability to provide a precise integer value from a potentially complex string, enabling further logic operations or calculations in your workflow.

Manual Choice Int Usage Tips:

  • Ensure that the separator you choose does not appear within the integer values themselves, as this could lead to incorrect parsing of the input_string.
  • Double-check the index value to ensure it falls within the valid range of indices for the split list, as an out-of-range index will cause errors.

Manual Choice Int Common Errors and Solutions:

IndexError: list index out of range

  • Explanation: This error occurs when the specified index is greater than the number of available choices in the split list.
  • Solution: Verify that the index is within the valid range by ensuring it is less than the number of elements obtained after splitting the input_string.

ValueError: invalid literal for int() with base 10

  • Explanation: This error happens when the selected choice cannot be converted to an integer, possibly due to non-numeric characters.
  • Solution: Check the input_string to ensure that all choices are valid integers and that the separator is correctly defined to avoid splitting within numeric values.

Manual Choice Int Related Nodes

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

Manual Choice Int