master
Add custom nodes for commenting out portions of prompts: - PromptComment: Single marker comment stripping - PromptCommentMultiMarker: Multi-marker support (#, //, --) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ComfyUI-PromptComment
Custom nodes that provide comment functionality for ComfyUI prompts.
Features
Write comments in your prompts using markers like # or //.
Comments are automatically removed, outputting a clean prompt.
Installation
Manual Installation
cd ComfyUI/custom_nodes
git clone https://github.com/YOUR_USERNAME/ComfyUI-PromptComment.git
ComfyUI Manager
Search for "PromptComment" in ComfyUI Manager to install.
Nodes
Prompt Comment (Strip)
Simple comment removal node. Specify one type of comment marker.
Inputs:
| Parameter | Description |
|---|---|
| text | Input prompt (multiline supported) |
| comment_style | Comment syntax: #, //, --, Custom |
| custom_marker | String to use when comment_style is Custom |
| remove_empty_lines | Remove empty lines |
| trim_whitespace | Trim whitespace from each line |
Output:
text: Prompt with comments removed
Prompt Comment (Multi-Marker)
Node that recognizes multiple comment markers simultaneously.
Inputs:
| Parameter | Description |
|---|---|
| text | Input prompt (multiline supported) |
| use_hash | Recognize # as comment |
| use_double_slash | Recognize // as comment |
| use_double_dash | Recognize -- as comment |
| remove_empty_lines | Remove empty lines |
| trim_whitespace | Trim whitespace from each line |
Usage Example
Input Prompt:
masterpiece, best quality, # quality tags
1girl, solo, # character
blue hair, red eyes, # appearance
# sitting, standing, # ← entire line is a comment
smile
Output (remove_empty_lines=True):
masterpiece, best quality,
1girl, solo,
blue hair, red eyes,
smile
Workflow Example
[String Literal] → [Prompt Comment] → [CLIP Text Encode]
(prompt) (strip comments) (encode)
License
MIT License
Languages
Python
100%