Visit ComfyUI Online for ready-to-use ComfyUI environment
Add text captions to images with font selection, text wrapping, and positioning for visual enhancement and metadata support.
The Image Caption node is designed to add text captions to images, making it a valuable tool for AI artists who want to annotate or enhance their visual creations with descriptive text. This node allows you to input an image and overlay it with a caption using a specified font. The node handles text wrapping, font selection, and positioning to ensure the caption is visually appealing and fits well within the image dimensions. It also supports additional metadata and prompt-based text modifications, making it versatile for various creative and functional applications.
This parameter takes the input image to which the caption will be added. The image should be in a format supported by the node, such as JPEG or PNG. The image is processed to ensure it is in the correct mode and size for captioning.
This parameter specifies the font file to be used for the caption text. The font file must be accessible and valid. If the font file does not exist, an exception will be raised. The font size is set to 32 by default, but this can be adjusted within the node's implementation.
This parameter is the text that will be overlaid on the image. The caption can be modified based on additional metadata or prompts provided. The text is wrapped and positioned to fit within the image dimensions, ensuring readability and aesthetic appeal.
This optional parameter allows you to provide additional metadata that can be used to modify the caption text. If not provided, an empty dictionary is used by default. This metadata can be useful for dynamic text generation based on image content or other contextual information.
This optional parameter provides a prompt that can influence the caption text. The prompt can be used in conjunction with the extra_pnginfo to dynamically generate or modify the caption, making it more relevant to the image content or desired outcome.
The output image is the original input image with the caption text overlaid. The caption is added in a visually appealing manner, ensuring it fits well within the image dimensions and maintains readability.
The output mask is a tensor that represents the areas of the image where the caption text has been added. This mask can be useful for further image processing or analysis, allowing you to isolate the captioned areas.
<font_file>
<image>
© Copyright 2024 RunComfy. All Rights Reserved.