ComfyUI > Nodes > CRT-Nodes > Remove Lines (CRT)

ComfyUI Node: Remove Lines (CRT)

Class Name

CRT_RemoveLines

Category
CRT/Text
Author
CRT (Account age: 1707days)
Extension
CRT-Nodes
Latest Updated
2026-03-16
Github Stars
0.1K

How to Install CRT-Nodes

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

Remove Lines (CRT) Description

Removes specified lines from text input, including optional empty lines, for streamlined data.

Remove Lines (CRT):

The CRT_RemoveLines node is designed to streamline and refine text data by removing unwanted lines from a given text input. This node is particularly useful for cleaning up text by eliminating specified numbers of lines from the beginning and end of the text, as well as optionally removing empty lines throughout. By providing a straightforward method to manipulate text, this node helps you focus on the most relevant content, making it easier to manage and process text data for various creative and analytical purposes. Whether you're preparing text for further processing or simply need to tidy up your data, CRT_RemoveLines offers a flexible and efficient solution.

Remove Lines (CRT) Input Parameters:

text

This parameter accepts the text input that you want to process. It is a string value and serves as the primary data source for the node's operations. The text can be any length, and the node will apply the specified line removal operations to this input.

early_lines

This integer parameter specifies the number of lines to remove from the beginning of the text. It allows you to skip over a set number of initial lines that may not be relevant to your needs. The value can range from 0 to 9999, with a default of 0, meaning no lines are removed from the start unless specified.

last_lines

This integer parameter determines the number of lines to remove from the end of the text. It is useful for discarding trailing lines that may be unnecessary or redundant. The range is from 0 to 9999, with a default of 0, indicating that no lines are removed from the end unless specified.

remove_empty_lines

This boolean parameter controls whether empty lines within the text should be removed. When set to True, any lines that are empty or contain only whitespace will be excluded from the final output. The default value is False, meaning empty lines are retained unless this option is enabled.

Remove Lines (CRT) Output Parameters:

text

The output is a string that represents the processed text after the specified lines have been removed. This output reflects the original text minus the early and last lines specified, and optionally, without any empty lines if that option was selected. The result is a cleaner, more focused version of the input text, ready for further use or analysis.

Remove Lines (CRT) Usage Tips:

  • Use the early_lines and last_lines parameters to quickly trim unwanted sections from your text, such as headers or footers, that are not needed for your analysis or presentation.
  • Enable the remove_empty_lines option to ensure that your text output is compact and free of unnecessary whitespace, which can be particularly useful when preparing text for display or further processing.

Remove Lines (CRT) Common Errors and Solutions:

Empty text input

  • Explanation: If the input text is empty, the node will return an empty string as there are no lines to process.
  • Solution: Ensure that the text input is not empty before passing it to the node. Check your data source or input method to confirm that text is being correctly provided.

Invalid parameter values

  • Explanation: Providing values outside the specified range for early_lines or last_lines can lead to unexpected behavior.
  • Solution: Double-check that the values for early_lines and last_lines are within the allowed range of 0 to 9999. Adjust the values accordingly to ensure they are valid.

Remove Lines (CRT) Related Nodes

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

Remove Lines (CRT)