Skip to main content

Create Text On Path

KJNodes/masking/generate
CreateTextOnPath

Creates a mask or batch of masks with the specified text. Locations are center locations.

Example

JSON Example
{
  "class_type": "CreateTextOnPath",
  "inputs": {
    "coordinates": "",
    "text": "text",
    "frame_width": 512,
    "frame_height": 512,
    "font": "FreeMono.ttf",
    "font_size": 42,
    "alignment": "center",
    "text_color": "white"
  }
}

This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.

Inputs

NameTypeStatusConstraintsDefault
coordinatesSTRINGrequired--
textSTRINGrequired-"text"
frame_widthINTrequiredmin: 16, max: 4096, step: 1512
frame_heightINTrequiredmin: 16, max: 4096, step: 1512
fontENUM
3 options
  • FreeMono.ttf
  • FreeMonoBoldOblique.otf
  • TTNorms-Black.otf
required--
font_sizeINTrequired-42
alignmentENUM
3 options
  • left
  • center
  • right
required-"center"
text_colorSTRINGrequired-"white"
size_multiplierFLOAToptional-[1]

Outputs

IndexNameTypeIs ListConnection Reference
0imageIMAGENo["{node_id}", 0]
1maskMASKNo["{node_id}", 1]
2mask_invertedMASKNo["{node_id}", 2]
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 CreateTextOnPath 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]
  • mask (MASK): ["5", 1]
  • mask_inverted (MASK): ["5", 2]
Was this page helpful?