Visit ComfyUI Online for ready-to-use ComfyUI environment
Powerful post-processing node for visually striking effects by sorting pixels based on criteria, offering control over arrangement and artistic distortions.
PixelSort is a powerful post-processing node designed to create visually striking effects by sorting pixels within an image based on specific criteria. This node allows you to manipulate the arrangement of pixels either horizontally or vertically, creating unique and artistic distortions. By leveraging parameters such as direction, span limit, sorting criteria (hue, saturation, or value), and sorting order, PixelSort provides a high degree of control over the final output. This node is particularly useful for generating abstract art, enhancing textures, or adding a creative twist to your images.
The image
parameter is the primary input image that you want to apply the pixel sorting effect to. This should be provided as a tensor representing the image data.
The mask
parameter is an image that defines the areas where the pixel sorting effect should be applied. Pixels corresponding to non-zero values in the mask will be sorted, while others will remain unchanged. This allows for selective application of the effect.
The direction
parameter determines the orientation of the pixel sorting. It can be set to either horizontal
or vertical
, dictating whether the pixels are sorted along rows or columns, respectively. This choice significantly impacts the visual outcome of the effect.
The span_limit
parameter sets the maximum length of contiguous pixel spans that will be sorted. It is an integer value with a default of 50, a minimum of 0, and a maximum of 100, adjustable in steps of 5. A higher span limit allows for longer stretches of sorted pixels, while a lower limit results in shorter, more frequent sorting.
The sort_by
parameter specifies the attribute used to sort the pixels. It can be set to hue
, saturation
, or value
, each corresponding to different aspects of the pixel's color in the HSV color space. This choice affects the sorting order and the resulting visual effect.
The order
parameter determines the sorting order of the pixels. It can be set to forward
for ascending order or backward
for descending order. This parameter influences the direction in which the pixels are rearranged, adding another layer of customization to the effect.
The output of the PixelSort node is an IMAGE
tensor that contains the processed image with the pixel sorting effect applied. This output can be used directly in your workflow for further processing or as a final artistic piece.
direction
settings to see how horizontal and vertical sorting affect the visual outcome.mask
parameter to apply the effect selectively, allowing you to highlight specific areas of your image.span_limit
to control the granularity of the sorting effect. Smaller values create more intricate patterns, while larger values produce broader strokes.sort_by
options to explore how sorting by hue, saturation, or value changes the appearance of the effect.order
settings with other parameters to achieve unique and unexpected results.span_limit
value is outside the allowed range.span_limit
is set within the range of 0 to 100, and adjust it in steps of 5 as needed.sort_by
parameter is set to an unsupported value.sort_by
parameter is set to one of the allowed values: hue
, saturation
, or value
.order
parameter is set to an unsupported value.order
parameter is set to either forward
or backward
.© Copyright 2024 RunComfy. All Rights Reserved.