Add Label
KJNodes/text
AddLabelCreates a new with the given text, and concatenates it to either above or below the input image. Note that this changes the input image's height! Fonts are loaded from this folder: ComfyUI/custom_nodes/ComfyUI-KJNodes/fonts
Example
JSON Example
{
"class_type": "AddLabel",
"inputs": {
"image": [
"node_id",
0
],
"text_x": 10,
"text_y": 2,
"height": 48,
"font_size": 32,
"font_color": "white",
"label_color": "black",
"font": "FreeMono.ttf",
"text": "Text",
"direction": "up"
}
}This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.
Inputs
| Name | Type | Status | Constraints | Default |
|---|---|---|---|---|
image | IMAGE | required | - | - |
text_x | INT | required | min: 0, max: 4096, step: 1 | 10 |
text_y | INT | required | min: 0, max: 4096, step: 1 | 2 |
height | INT | required | min: -1, max: 4096, step: 1 | 48 |
font_size | INT | required | min: 0, max: 4096, step: 1 | 32 |
font_color | STRING | required | - | "white" |
label_color | STRING | required | - | "black" |
font | ENUM3 options
| required | - | - |
text | STRING | required | - | "Text" |
direction | ENUM5 options
| required | - | "up" |
caption | STRING | optional | - | "" |
Outputs
| Index | Name | Type | Is List | Connection Reference |
|---|---|---|---|---|
0 | IMAGE | IMAGE | No | ["{node_id}", 0] |
How to connect to these outputs
To connect another node's input to an output from this node, use the connection reference format:
["node_id", output_index]Where node_id is the ID of this AddLabel node in your workflow, and output_index is the index from the table above.
Example
If this node has ID "5" in your workflow:
IMAGE (IMAGE):["5", 0]
Was this page helpful?