ComfyUI > Nodes > ComfyUI Level Pixel > Text Choice Parser [LP]

ComfyUI Node: Text Choice Parser [LP]

Class Name

TextChoiceParser|LP

Category
LevelPixel/Text
Author
LevelPixel (Account age: 647days)
Extension
ComfyUI Level Pixel
Latest Updated
2026-02-24
Github Stars
0.03K

How to Install ComfyUI Level Pixel

Install this extension via the ComfyUI Manager by searching for ComfyUI Level Pixel
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Level Pixel 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 Choice Parser [LP] Description

Facilitates dynamic text generation by parsing strings with embedded choices and variables.

Text Choice Parser [LP]| Text Choice Parser [LP]:

The TextChoiceParser| Text Choice Parser [LP] node is designed to facilitate dynamic text generation by allowing you to parse and manipulate text strings with embedded choices and variables. This node is particularly useful for creating varied and customizable text outputs, which can be beneficial in creative applications such as AI art descriptions or narrative generation. By leveraging a combination of predefined variables and random choice selections within the text, the node enables you to produce diverse outputs from a single input template. This flexibility can enhance the creative process by introducing variability and adaptability in text-based content.

Text Choice Parser [LP]| Text Choice Parser [LP] Input Parameters:

text

The text parameter is a required input that accepts a string, which can be multiline. This string serves as the template for text generation, where you can embed variables and choice patterns. The text can include placeholders for variables in the format [variable_name] and choice patterns in the format {option1|option2|...}. The node will replace these placeholders with the corresponding values or randomly selected options. There is no explicit minimum or maximum value for the text length, but it should not exceed 10,000 characters to ensure efficient processing.

variables

The variables parameter is an optional input that also accepts a multiline string. This string should contain key-value pairs, where each line represents a variable assignment in the format key=value. These variables are used to replace corresponding placeholders in the text parameter. If no variables are provided, the node will skip the variable replacement step. This parameter allows you to customize the text output by dynamically inserting specific values.

seed

The seed parameter is an optional integer input that influences the randomness of choice selections within the text. By default, it is set to 0, which means the node will use the current time in milliseconds as the seed, ensuring different outputs on each execution. You can specify a fixed seed value to produce consistent and repeatable results. The seed value must be a non-negative integer, with a maximum value of 0xffffffffffffffff.

Text Choice Parser [LP]| Text Choice Parser [LP] Output Parameters:

text

The text output parameter returns a string that represents the processed version of the input text. This output includes all variable replacements and randomly selected choices, resulting in a customized and potentially varied text output. The output is crucial for applications that require dynamic text generation, as it provides the final, user-defined content ready for use in further processing or display.

Text Choice Parser [LP]| Text Choice Parser [LP] Usage Tips:

  • To ensure consistent results across multiple runs, specify a fixed seed value. This is particularly useful when you need reproducible outputs for testing or iterative design processes.
  • Use the variables parameter to manage and update text content dynamically without altering the main text template. This approach can streamline the process of generating multiple variations of a text.

Text Choice Parser [LP]| Text Choice Parser [LP] Common Errors and Solutions:

"Text too large to process at once"

  • Explanation: This error occurs when the input text exceeds the maximum allowed length of 10,000 characters.
  • Solution: Reduce the size of the input text by breaking it into smaller segments or simplifying the content to fit within the character limit.

"Variable not found"

  • Explanation: This error might occur if a placeholder in the text does not have a corresponding variable defined in the variables parameter.
  • Solution: Ensure that all placeholders in the text have matching key-value pairs in the variables input. Double-check for any typos or missing entries.

Text Choice Parser [LP] Related Nodes

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

Text Choice Parser [LP]