ComfyUI > Nodes > Mikey Nodes > Text Preserve (Mikey)

ComfyUI Node: Text Preserve (Mikey)

Class Name

TextPreserve

Category
Mikey/Text
Author
bash-j (Account age: 4196days)
Extension
Mikey Nodes
Latest Updated
2024-06-15
Github Stars
0.08K

How to Install Mikey Nodes

Install this extension via the ComfyUI Manager by searching for Mikey Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Mikey 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Text Preserve (Mikey) Description

Handle and manipulate text data, preserving specific elements while allowing dynamic modifications for AI-driven art and text projects.

Text Preserve (Mikey):

The TextPreserve node is designed to handle and manipulate text data within a workflow, ensuring that specific text elements are preserved while allowing for dynamic modifications. This node is particularly useful for AI artists who need to maintain certain text structures or elements while applying transformations such as search and replace, wildcard processing, and random value generation. By preserving the original text and applying controlled modifications, TextPreserve helps maintain the integrity of the text data while enabling creative flexibility. This node is essential for workflows that require consistent text handling and dynamic text generation, making it a valuable tool for AI-driven art and text-based projects.

Text Preserve (Mikey) Input Parameters:

text

The text parameter is the primary input text that you want to process. This text will undergo various transformations such as search and replace, wildcard processing, and random value generation. The original text is preserved for reference and comparison. There are no specific minimum or maximum values for this parameter, as it can be any string of text.

result_text

The result_text parameter is the text that will be generated as a result of the transformations applied to the text parameter. This parameter is used to store the final output after all modifications have been made. Like the text parameter, it can be any string of text.

unique_id

The unique_id parameter is an optional identifier used to uniquely identify the text within the workflow. This ID helps in tracking and managing the text data across different nodes and processes. If not provided, it defaults to None.

extra_pnginfo

The extra_pnginfo parameter is an optional JSON object that contains additional information about the workflow. This information is used for search and replace operations and to store metadata about the text transformations. If provided as a string, it will be parsed into a JSON object. If not provided, it defaults to None.

prompt

The prompt parameter is an optional JSON object that contains prompt data for the workflow. This data is used to guide the text transformations and store metadata about the inputs and results. If provided as a string, it will be parsed into a JSON object. If not provided, it defaults to None.

Text Preserve (Mikey) Output Parameters:

text

The text output parameter is the final transformed text after all modifications have been applied. This text reflects the changes made through search and replace, wildcard processing, and random value generation. It is the primary output of the node and can be used in subsequent nodes or processes within the workflow.

preserve_text

The preserve_text output parameter is the original input text that was preserved for reference. This text remains unchanged and serves as a comparison point to understand the modifications made to the text output parameter. It is useful for tracking the original state of the text before any transformations were applied.

Text Preserve (Mikey) Usage Tips:

  • Use the unique_id parameter to track and manage text data across different nodes, ensuring consistency and easy reference.
  • Leverage the extra_pnginfo and prompt parameters to provide additional context and metadata for the text transformations, enhancing the flexibility and control over the modifications.
  • Experiment with wildcard syntax and random value generation to create dynamic and varied text outputs, adding creative elements to your AI-driven projects.

Text Preserve (Mikey) Common Errors and Solutions:

Invalid JSON format in extra_pnginfo or prompt

  • Explanation: This error occurs when the extra_pnginfo or prompt parameter is provided as a string but is not in a valid JSON format.
  • Solution: Ensure that the extra_pnginfo and prompt parameters are correctly formatted JSON strings. Use a JSON validator to check the format before passing them to the node.

Missing unique_id in workflow nodes

  • Explanation: This error occurs when the unique_id provided does not match any node ID in the extra_pnginfo workflow.
  • Solution: Verify that the unique_id matches an existing node ID in the extra_pnginfo workflow. Ensure that the node ID is correctly referenced and exists in the workflow.

Wildcard syntax errors

  • Explanation: This error occurs when the wildcard syntax in the text parameter is incorrect or malformed.
  • Solution: Check the wildcard syntax in the text parameter to ensure it follows the correct format {option1|option2}. Correct any syntax errors and reprocess the text.

Random value generation errors

  • Explanation: This error occurs when the random value generation syntax in the text parameter is incorrect or out of bounds.
  • Solution: Ensure that the random value generation syntax <random:lower_bound:upper_bound> is correctly formatted and that the bounds are valid numbers. Adjust the bounds if necessary and reprocess the text.

Text Preserve (Mikey) Related Nodes

Go back to the extension to check out more related nodes.
Mikey Nodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.