ComfyUI-KJNodes
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
CreateTextOnPath
CreateTextOnPath Node Documentation
Overview
The CreateTextOnPath node within the ComfyUI-KJNodes repository is used to generate images and masks containing text placed at specific coordinates. The coordinates are given in a certain frame and the text can be customized in terms of appearance such as color, font, and size. This node is helpful in creating images that integrate dynamic textual information at desired locations, which can be useful for a variety of visual effects in ComfyUI workflows.
Features and Functionality
- Generates images or masks with the given text at specified coordinates.
- Allows customization of text properties such as font, font size, alignment, and color.
- Outputs a mask and an inverted mask which can be used for further image processing or effects.
- Supports batch processing, enabling the generation of multiple images with varied text positions and sizes in one operation.
Inputs
Required Inputs
-
Coordinates: The coordinates where the text will appear on the image. This should be provided as a list of JSON-formatted strings specifying x and y positions.
-
Text: The textual content to be placed on the images/masks. This is a multiline string allowing complex texts to be formatted.
-
Frame Width: The width of the frame or the canvas where the text will be placed.
-
Frame Height: The height of the frame or the canvas where the text will be placed.
-
Font: The font used for rendering the text. The node supports a variety of font files that can be selected.
-
Font Size: The size of the font for the text.
-
Alignment: Determines the alignment of the text. Options include left, center, or right.
-
Text Color: The color of the text, specified as a string (e.g., 'white', 'black', 'red').
Optional Inputs
- Size Multiplier: A list of float values that adjusts the size of the text for each frame. This allows for dynamic resizing of text across a batch of images.
Outputs
-
Image: An image tensor containing the rendered text. This image can be used directly or further processed in the workflow.
-
Mask: A mask where the text is represented, useful for masking purposes or for applying effects only on the text.
-
Mask Inverted: An inverted version of the mask, useful in cases where operations need to be applied to parts of the image outside of the text.
Usage in ComfyUI Workflows
The CreateTextOnPath node is versatile and can be integrated into various workflows within ComfyUI, such as:
-
Data Annotation: Adding annotations or labels to data visualizations or imagery for better interpretation and analysis.
-
Visual Effects: Creating personalized, stylized, or informational overlays on images.
-
Dynamic Content Creation: Generating images that require dynamic placements of text, whether in animations or batch processing tasks.
Special Features or Considerations
- This node requires the coordinates and size multipliers to match the batch size, ensuring that each image or mask is rendered correctly without errors.
- Font files must be placed in the appropriate directory for node access, and paths should be verified correctly to prevent load failures.
- Text alignment and color properties offer aesthetic control over how the text is presented in relation to the coordinates specified.
Additional Notes
Ensure that the node's requirements regarding input formats, such as JSON for coordinates, are adhered to. Misformatted inputs can lead to errors in processing or unexpected outputs. Additionally, this node can be an integral part of creating interactive or engaging visual content when used in conjunction with other nodes in ComfyUI.