Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > Sage Utils > Set Text Without Comments

ComfyUI Node: Set Text Without Comments

Class Name

Sage_SetTextWithoutComments

Category
Sage Utils/text
Author
arcum42 (Account age: 6442days)
Extension
Sage Utils
Latest Updated
2026-05-17
Github Stars
0.03K

How to Install Sage Utils

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

Set Text Without Comments Description

Removes comments from text, cleans code, and allows prefix/suffix addition for streamlined output.

Set Text Without Comments:

The Sage_SetTextWithoutComments node is designed to process text by removing comments from it, making it cleaner and more concise. This node is particularly useful when you need to extract meaningful content from code or text files that contain comments in various styles, such as Python (#), C/C++ (// and /* */). By stripping away these comments, the node helps you focus on the core content without the distraction of annotations or explanations that are typically meant for human readers. This functionality is beneficial for AI artists who work with text data that may include programming code or documentation, allowing them to streamline the text for further processing or analysis. The node also allows you to add a prefix or suffix to the cleaned text, providing additional flexibility in formatting the output.

Set Text Without Comments Input Parameters:

str

This parameter represents the input text that you want to process. It can contain any text, including code or documentation with comments. The node will remove comments from this text, leaving only the uncommented content. There are no specific minimum or maximum values for this parameter, as it is a free-form text input. The default value is an empty string.

prefix

The prefix parameter allows you to add a specific string at the beginning of the cleaned text. This can be useful for adding context or labels to the output. It is optional, and if not provided, no prefix will be added. The default value is an empty string.

suffix

Similar to the prefix, the suffix parameter lets you append a string to the end of the cleaned text. This can be used to add closing remarks or additional information to the output. It is also optional, with the default value being an empty string.

Set Text Without Comments Output Parameters:

str_out

The str_out parameter is the output of the node, which contains the text after comments have been removed and any specified prefix or suffix has been added. This cleaned and formatted text is ready for further use or analysis, providing a streamlined version of the original input.

Set Text Without Comments Usage Tips:

  • Use this node when you need to extract the core content from code or text files that include comments, ensuring that only the essential information is retained.
  • Consider using the prefix and suffix parameters to add context or additional information to the cleaned text, making it more informative or suitable for specific applications.

Set Text Without Comments Common Errors and Solutions:

Missing Input Text

  • Explanation: The input text (str) is missing or not provided.
  • Solution: Ensure that you provide a valid text input for the str parameter. This can be done by connecting the appropriate node or manually entering the text.

Invalid Comment Syntax

  • Explanation: The input text contains comment syntax that is not recognized by the node.
  • Solution: Ensure that the comments in the input text follow the standard Python (#), C/C++ (//, /* */) styles. If the text uses a different comment style, consider preprocessing it to match these formats.

Set Text Without Comments Related Nodes

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

Set Text Without Comments