ComfyUI Extension: comfyui-watermark-remover

Authored by Slartibart23

Created

Updated

0 stars

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

A custom ComfyUI node that batch-processes files from an input folder, removes every sentence containing the word "Watermark", and saves cleaned files to an output folder. Supports dry run and case-sensitive modes. (Description by CC)

Looking for a different extension?

Custom Nodes (1)

README

ComfyUI – Watermark Sentence Remover

A custom ComfyUI node that batch-processes .txt files from an input folder, removes every sentence containing the word "Watermark", and saves the cleaned files to an output folder – keeping the original filenames.


Features

  • Processes all .txt files in the specified input folder sequentially
  • Removes any sentence that contains the word Watermark (case-insensitive by default)
  • Saves cleaned files to a user-defined output folder with the original filename
  • Creates the output folder automatically if it does not exist
  • Optional Dry Run mode – analyse without writing any files
  • Optional Case Sensitive mode
  • Returns a status message, file count, and removed-sentence count as node outputs
  • Compatible with Python 3.13+

Installation

  1. Clone or download this repository into your ComfyUI custom nodes folder:
cd ComfyUI/custom_nodes/
git clone https://github.com/Slartibart23/comfyui-watermark-remover.git
  1. Restart ComfyUI.

The node will appear in the node menu under text β€Ί processing as "Watermark Sentence Remover 🧹".


Node Inputs

| Input | Type | Required | Description | |---|---|---|---| | input_folder | STRING | βœ… | Full path to the folder containing source .txt files | | output_folder | STRING | βœ… | Full path to the folder where cleaned files will be saved | | dry_run | BOOLEAN | βž– | If enabled, no files are written (default: off) | | case_sensitive | BOOLEAN | βž– | If enabled, only Watermark (capital W) is matched (default: off) |

Node Outputs

| Output | Type | Description | |---|---|---| | status_message | STRING | Human-readable processing summary | | files_processed | INT | Number of files successfully processed | | sentences_removed | INT | Total number of sentences removed across all files |


How It Works

Sentences are identified by the period . character as a terminator.

Example input:

This is a normal sentence. This image contains a Watermark from Example Corp. Enjoy your day.

Example output:

This is a normal sentence. Enjoy your day.

The sentence "This image contains a Watermark from Example Corp." is detected and removed. The surrounding sentences are left intact.


Running Tests

cd comfyui-watermark-remover
pip install pytest
python -m pytest tests/ -v

Requirements

  • Python 3.13+
  • ComfyUI (any recent version)
  • No additional Python packages required (uses standard library only)

License

MIT License – see LICENSE for details.

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Learn more