← See All Custom Node Packs

comfyui-deploy

1517
By BennyKok
Updated 7 months ago
View on GitHub →See Common Issues →

Run ComfyUI Easily with InstaSD

Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

ComfyUIDeployStringCombine

ComfyUIDeployStringCombine Node Documentation

Overview

The ComfyUIDeployStringCombine node is a component designed for the ComfyUI Deploy platform, which is an open-source infrastructure for deploying generative workflows. This node specializes in string manipulation and offers capabilities for combining and transforming text across ComfyUI workflows.

Functionality

The primary purpose of the ComfyUIDeployStringCombine node is to handle operations involving strings, such as appending text or replacing specific parts of a string using plain string substitution or regular expressions. It also provides an option to tidy up the resulting text output by cleaning up redundant spaces and punctuation.

Input Parameters

The node accepts the following inputs:

Required Inputs

  • Action: Specifies the operation to be performed on the input strings. It accepts two possible values:

    • append: Combines the input texts.
    • replace: Replaces occurrences within the primary text according to specified patterns or strings.
  • Tidy Tags: Determines whether the resulting text should be tidied by removing unnecessary spaces and punctuation. Available options are:

    • yes: Enables tidying.
    • no: Disables tidying.

Optional Inputs

  • Text A: The primary string input. This can be either a standalone string or the initial content on which other strings or replacements are applied.
  • Text B: Serves as additional input, either to be appended to Text A or used as a search pattern or string to be replaced within Text A.
  • Text C: Used in conjunction with the replace operation as the new content that will replace the occurrences found by Text B.

Output

The node produces a single output in the form of an updated string based on the selected action and input parameters. This output can be used as part of subsequent operations within the ComfyUI workflows.

Use Cases in ComfyUI Workflows

The ComfyUIDeployStringCombine node can be utilized in various scenarios within ComfyUI workflows:

  1. String Combination: Useful for merging multiple textual inputs into a single cohesive string, helpful in generating user messages, combining log data, or creating complex descriptions.

  2. Pattern-Based Text Replacement: Allows for dynamic modification of strings by replacing certain patterns, which can be valuable in data parsing, templating systems, or modifying narrative content for generative tasks.

  3. Output Tidying: Ensures that the resulting text output is clean and properly formatted, eliminating excess spaces and correcting punctuation, thereby improving the quality of textual outputs.

Special Features and Considerations

  • When using the replace action, if Text B is framed with slashes (e.g., /pattern/), it is treated as a regular expression. This capability allows for advanced text processing beyond simple string replacement.

  • The tidying feature is particularly helpful in maintaining consistent and readable outputs. It automatically handles redundant spaces, misplaced commas, and other minor formatting issues to produce a polished end result.

  • This node is part of the broader ComfyDeploy ecosystem and benefits from seamless integration with other nodes and tools provided by the framework, allowing for sophisticated and flexible generative workflows that extend across different machines and environments.

By utilizing the ComfyUIDeployStringCombine node, users can effectively manage and manipulate strings within their generative workflows, contributing to enhanced automation and creative processing capacities.