A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
The LayerUtility: ImageHub node in the ComfyUI_LayerStyle repository is a utility node designed to manage and output images and masks based on multiple input options. This node allows users to selectively choose which input to output or to randomly select from provided inputs. It is especially useful in situations where multiple image and mask combinations are available, and a specific one needs to be chosen dynamically by the workflow.
The ImageHub node is designed to receive up to nine sets of images and masks, process them, and then output a single image and mask based on user-defined criteria or random selection. It provides an interface to easily switch between multiple inputs, making it versatile for complex UI design scenarios in ComfyUI.
The ImageHub node accepts the following inputs:
Output: An integer value that determines which set of inputs to output. This integer ranges from 1 to 9.
Random Output: A boolean flag that, when enabled, randomly selects from the list of available (non-empty) inputs.
Each optional input consists of an image and mask pair. You can provide up to nine sets:
Each image accepts an image input, while each mask accepts a mask input. These inputs can be utilized independently.
The ImageHub node produces the following outputs:
The ImageHub node plays a significant role in workflows where dynamic selection from multiple image-mask sets is required. Some potential use cases include:
Conditional Image Processing: When different processing pipelines might be needed for different images, the ImageHub node can act as a decision point to select the appropriate pipeline.
Randomized Workflows: By enabling the random output feature, workflows can dynamically vary their output, providing more variability and testing opportunities.
Sequential Composition: In scenarios where sequential steps are dependent on specific inputs, the ImageHub node can ensure that only the desired inputs are processed at a given point in the sequence.
Selective Output: Users can specify exactly which input set to output by setting the output parameter, allowing for precise control in workflows.
Random Selection: When experimentation or variability is desired, the random output functionality enables the node to choose randomly among available input options.
Error Handling: The node provides error messages and logging to notify users when inputs are missing or when the selected output option does not have a corresponding input.
Overall, the LayerUtility: ImageHub node serves as a robust tool in ComfyUI for managing and selecting between multiple image and mask inputs, offering versatility and ease of use in complex UI developments.