ComfyUI > Nodes > Basic data handling > removesuffix

ComfyUI Node: removesuffix

Class Name

Basic data handling: StringRemovesuffix

Category
Basic/STRING
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

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

removesuffix Description

The `StringRemovesuffix` node automates suffix removal from strings, aiding text data standardization.

removesuffix:

The StringRemovesuffix node is designed to simplify the process of removing a specified suffix from a string. This node is particularly useful when you need to clean up or standardize text data by ensuring that certain unwanted suffixes are removed from the end of strings. If the string ends with the specified suffix, the node will return a new string with the suffix removed; otherwise, it will return the original string unchanged. This functionality is essential for tasks that involve text processing, where maintaining consistency in string formats is crucial. By automating the removal of suffixes, this node helps streamline workflows and reduces the need for manual text editing.

removesuffix Input Parameters:

string

The string parameter represents the input text from which you want to remove a suffix. It is the main text that will be processed by the node. The default value is an empty string (""), which means if no input is provided, the node will operate on an empty string. This parameter is crucial as it determines the primary content that the node will evaluate and potentially modify.

suffix

The suffix parameter specifies the text that you want to remove from the end of the input string. If the input string ends with this suffix, the node will remove it; otherwise, the string will remain unchanged. The default value is an empty string (""), indicating that if no suffix is specified, the node will not attempt to remove any text. This parameter is essential for defining the specific ending sequence you wish to eliminate from the input string.

removesuffix Output Parameters:

string

The output parameter is a string that represents the result of the suffix removal operation. If the input string ends with the specified suffix, this output will be the input string minus the suffix. If the suffix is not present at the end of the input string, the output will be identical to the input string. This output is important as it provides the cleaned or unchanged version of the input string, depending on whether the suffix was present.

removesuffix Usage Tips:

  • Ensure that the suffix parameter accurately reflects the exact sequence you wish to remove from the end of the input string to avoid unexpected results.
  • Use this node in conjunction with other string processing nodes to build comprehensive text manipulation workflows, such as cleaning up file names or standardizing data entries.

removesuffix Common Errors and Solutions:

Suffix not removed

  • Explanation: This error occurs when the specified suffix is not present at the end of the input string, resulting in no change to the string.
  • Solution: Double-check the suffix parameter to ensure it matches the exact ending of the input string. Consider using the StringEndswith node to verify the presence of the suffix before attempting removal.

Empty input string

  • Explanation: If the input string is empty, the node will return an empty string, as there is no content to process.
  • Solution: Ensure that the input string is not empty before passing it to the node, or handle empty strings appropriately in your workflow to avoid unnecessary processing.

removesuffix Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
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.

removesuffix