https://github.com/meanin2/comfyui-MGnodes
a custom node for comfyui that will allow adding a watermark over an image
https://github.com/meanin2/comfyui-MGnodes
Last synced: 5 months ago
JSON representation
a custom node for comfyui that will allow adding a watermark over an image
- Host: GitHub
- URL: https://github.com/meanin2/comfyui-MGnodes
- Owner: meanin2
- License: mit
- Created: 2025-01-15T13:32:43.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-01-21T11:07:18.000Z (5 months ago)
- Last Synced: 2025-01-21T11:28:18.246Z (5 months ago)
- Language: Python
- Size: 1 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-comfyui - **comfyui-MGnodes**
README
# ComfyUI MGnodes Collection
A collection of custom nodes for ComfyUI focused on simplicity and usability.
## Available Nodes
### 1. Image Watermark Node
Add image watermarks with advanced controls for transparency, positioning, and color manipulation.

Features:
- Add image watermarks with adjustable transparency
- Multiple positioning options (Center, Top Left, Top Right, Bottom Left, Bottom Right, Tiled)
- Scale watermark size
- Remove white background from watermark
- Invert watermark colors
- Preserve transparency in both base image and watermark### 2. Text Extractor Node
A utility node for processing text output from Language Models (LLMs), specifically handling Chain-of-Thought content.
Features:
- Extracts content between `...` tags
- Outputs both cleaned text and extracted thoughts
- Useful for processing LLM outputs with reasoning steps
- Supports multiple think blocks in a single input## Installation
### Option 1: ComfyUI Manager (Recommended)
The easiest way to install is through the ComfyUI Manager. Simply search for "MGnodes" and click install.### Option 2: Manual Installation
1. Navigate to your ComfyUI custom nodes directory:
```bash
cd ComfyUI/custom_nodes/
```2. Clone this repository:
```bash
git clone https://github.com/meanin2/comfyui-MGnodes.git
```3. Restart ComfyUI
## Usage
### Image Watermark Node
1. Load your base image using a "Load Image" node
2. Load your watermark image using another "Load Image" node
3. Connect both to the "Add Image Watermark" node
4. Configure the watermark settings:
- **Position**: Choose where to place the watermark
- **Opacity**: Adjust transparency (0-100%)
- **Scale**: Resize the watermark (10-1000%)
- **Make Black**: Invert the watermark colors
- **Remove White**: Make white pixels transparent### Text Extractor Node
1. Connect any text output (typically from an LLM node) to the Text Extractor
2. The node will output two strings:
- **Answer Text**: The input text with all `...` sections removed
- **CoT Content**: The extracted content from within the `` tags### Example Workflow
Check out the `examples` folder for:
- A complete watermark workflow you can import into ComfyUI
- Sample images used in the showcase
- Test watermark images## Tips
- For best watermark results with "Remove White", ensure your watermark has a clean white background
- When using "Make Black", the inversion happens before white removal
- The watermark mask input is optional and can be used for additional transparency control
- Scale values above 100% will enlarge the watermark, below 100% will shrink it
- For text extraction, multiple `` blocks will be joined with newlines in the CoT output