LayerStyle

2167
By chflame
Updated 15 days ago
View on GitHub →See Common Issues →

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.

Available Nodes

LayerUtility: GetImageSize

LayerUtility: GetImageSize Node Documentation

Overview

The LayerUtility: GetImageSize node is a component of the ComfyUI LayerStyle Repository. This node is designed to determine the size of an image, providing essential information for further image processing tasks within a ComfyUI workflow.

Functionality

The primary functionality of this node is to extract and return the width and height of a given image. It allows users to obtain image dimensions, which can be critical for customizing visual elements or for ensuring compatibility with other components within a UI layout.

Inputs

Required Inputs

  • Image: This node requires a single input, which is an image. The image input should be in a format recognizable by the node, commonly expected to be a tensor format image.

Outputs

The LayerUtility: GetImageSize node produces three outputs:

  1. Width (INT): The width of the input image, returned as an integer.
  2. Height (INT): The height of the input image, returned as an integer.
  3. Original Size (BOX): A pair of integers representing the width and height of the image. This output is provided as a tuple for convenience.

Usage

Within ComfyUI workflows, this node can be utilized whenever there is a need to determine or verify the dimensions of an image. For example, it can be beneficial in scenarios where subsequent processing or layout decisions depend on knowing the image size, such as resizing operations, aspect ratio calculations, or conditional branching in processes based on image dimensions.

Special Features and Considerations

  • Format Handling: Although the node primarily expects images in tensor format, it internally processes the image and converts it to a format suitable for size extraction. This feature abstracts some of the complexities of image format conversions for the user.

  • Category: The node is categorized under 😺dzNodes/LayerUtility, ensuring that users can find it easily when navigating node categories in ComfyUI.

This node provides essential utility for image dimension extraction, enabling more dynamic and adaptable design workflows within ComfyUI. Users can incorporate it into their UI building processes to create more responsive and tailored layouts.