<div align="center">

[![Chinese](https://img.shields.io/badge/Language-Simplified%20Chinese-red?style=for-the-badge)](./README.md)
[![English](https://img.shields.io/badge/Language-English-blue?style=for-the-badge)](./README.en.md)

</div>

# ComfyUI_Element_easy


A collection of small nodes for convenient use. Due to laziness, the code has not been merged. Includes: Minimax_H3-LatentUpscaler, Smart merge images, LoadImage_Preview, Element_SigmaGraph, Element ImageCurve, Element HueSat, Element HueBright, Element HueHue, Frame Calculator, ImageSize Div, black_white_color, chessboard, empty_image_rgb, image_pad_blur, mask_noise_element, mask_stroke, random_chars, text_line_break.


## Installation

- **Manual Installation (Manual Installation)**<br>
Enter the ./ComfyUI/custom_nodes directory and run the following code:<br>

      git clone https://github.com/supElement/ComfyUI_Element_easy.git

- **Install using Manager (Install using Manager)**<br>

  Search for ComfyUI_Element_easy in the ComfyUI manager and then install with --.


## Update

## v1.5.2

  - The Minimax_H3-LatentUpscaler_Adv node introduces conditional scaling modes, which can be selected to ignore (pass_through), align without scaling (NO_refs), or scale (refs). The quality is best with the scale (refs) mode.

## v1.5.0
  
  Adds Minimax_H3-LatentUpscaler spatial latent scaling node, which only scales the spatial latent of the video and does not perform any processing on the audio. The output port is Minimax H3 latent.
  - Adds Minimax_H3-LatentUpscaler_Adv spatial latent scaling node with verification.
  - Fixed some bugs.


## v1.4.8
  
  Enhanced the algorithm for correcting minor image distortion and color matching in the Smart merge images node.
  - The model used is not required. If the relevant options are selected, the model will be automatically downloaded to \ComfyUI\models\elementEasy during the node execution. You can also copy the elementEasy folder from the models folder in this repository to \ComfyUI\models\elementEasy, so there is no need to download the model again.

## v1.4.7
  
  Added support for block merging in the Smart merge images node. That is, when multiple images are input to the edited_crop_B port, the output is a single merged image.
  - Note: The images input to the edited_crop_B port must be Batch and not list. If it is a list, it must be converted to a batch by the Image List To Batch node.

## v1.4.6
  
  Added preview button support for KJnode GetNode nodes to the Element ImageCurve, Element HueSat, Element HueBright, and Element HueHue nodes; modified the curve type of the Element ImageCurve node.

## v1.4.5
  
  Modified the interaction logic of Element_SigmaGraph, Element ImageCurve, Element HueSat, Element HueBright, and Element HueHue nodes, changing to single-click the left mouse button to add points, and the new points can be directly dragged; Enhanced the influence of Element HueBright node on low saturation colors, increasing the adjustment range of brightness.

## v1.4.4
  
  Fixed the bug in the linear mode "L" output of the Element_SigmaGraph node, added the max value output parameter, and added forced correction output.

## v1.4.3（Optimized in V1.4.8）
  
  Added Smart merge images node.
  - Smartly merge images when there are enough common features between two images.
  - Correct the pixel offset and color difference generated by editing models (Flux2 Klein, Qwen Edit, etc.) after editing images. The usage method in this case: connect the original image and the edited image to the original_image and edited_crop_B input ports respectively.
  - Merge the cropped image to the original image when conditions allow, the most reliable merging plan: original_image + edited_crop_B + original_crop_A. Where original_crop_A is the unmodified or deformed image cut from original_image.
  - Add color matching mode Adaptive Local (strong), which can better correct the color difference generated after the image is edited. Two additional parameters are added for this mode: adapt_thresh (color difference threshold).
  - Add adapt_local_match parameter, providing more options for mask fusion in the color matching mode Adaptive Local (strong).
  - Optimize the fusion method of the Smart merge images node, and it has better correction for pixel offset and color shift generated after editing by editing models (Flux2 Klein, Qwen Edit, etc.). 
  - Add support for block merging to the Smart merge images node. That is, when multiple images are input to the edited_crop_B port, the output is a single merged image. Note: The images input to the edited_crop_B port must be Batch and not list. If it is a list, it must be converted to a batch by the Image List To Batch node.

  ![image](https://github.com/user-attachments/assets/0e341594-8b59-45af-8ece-59382ace50e4)


## v1.4.0

  - Added an optional image input port to the LoadImage_Preview node, which can be used to bridge the preview and editing; optimized the layout of the editing panel.
  - Optimized the preview logic of Element ImageCurve, Element HueSat, Element HueBright, and Element HueHue nodes.

## v1.3.8 
Important Update!!!
- Merged Element_SigmaGraph and Element_SigmaGraph(curve) nodes into Element_SigmaGraph; removed the numerical display box for graph_data.
- Added a mode switch button "C" smooth curve mode and linear mode in the Element_SigmaGraph node.
- Fixed the problem where the sigma output of the Element_SigmaGraph node does not match the curve in curve mode.
- Fixed the problem of screen freezing and blocking when quickly reducing the height of the Element_SigmaGraph node.
- Fixed the problem where the LoadImage_Preview node may not be deletable in some cases; optimized the LoadImage_Preview node.

## v1.3.5 （Optimized in v1.4.0）
  
  Added LoadImage_Preview node, which uses part of the code from the image_loader_with_previews node in the ComfyUI-nhknodes extension by author Enashka.<br>
  - Main function: browse image files in the specified path, select one after entering the editing panel (draw a mask or draw rectangles, circles, etc. on the image).
  - Shift+left click: draw lines, squares, or circles.
  - L-alpha: used to load image alpha to the canvas.
  - Return: return to the image browsing panel.

  ![image](https://github.com/user-attachments/assets/f5d64913-2980-493c-b70a-a60855f2ae16)


## v1.3.1 （Optimized in V1.4.5）
  
  Added Element HueBright (Hue vs Brightness) and Element HueHue (Hue vs Hue) nodes, curve adjustment, real-time preview supports single images and sequence frame images. Click to add points, right-click to remove points.

## v1.3.0 （Optimized in V1.4.5）
  
  Added Element HueSat node, curve adjustment (Hue vs Saturation), real-time preview supports single images and sequence frame images. Click to add points, right-click to remove points.<br>
  - Note: Do not add points at both ends of the curve at the same time, as this will not cause an error, but it will make the other point invalid. Only one endpoint is needed to complete the color adjustment in real-time because the curves at both ends are closed loops.

  ![Image](https://github.com/user-attachments/assets/627e1951-244b-4b13-937c-23c8d98748e8)

## v1.2.7 （Optimized in V1.4.5）
  
  Added Element ImageCurve node, curve color adjustment, real-time preview supports single images and sequence frame images. Click to add points, right-click to remove points.

  ![Image](https://github.com/user-attachments/assets/f3bcfd71-eaba-4933-aa97-01ee6eefad62)

## v1.2.4 （fix in V1.4.4，Optimized in V1.4.5）
  
  Added Element_SigmaGraph node with custom sigma, the original code comes from the author Temult's TWanSigmaGraph node https://github.com/Temult/TWanSigmaGraph , modified, optimized, and added a lot of content.

  - Added an optional latent input port to synchronize the loading and unloading order of ltx audio vae.<br>
  - Added an optional custom_sigmas input port, adding the function of executing alone, which is convenient to store existing sigma sequences as presets<br>
  - Click to add control points at the position of the curve with the mouse, and keep other control points unchanged when adding or subtracting points. Remove control point X-axis movement restriction
  - Added max value output parameter, and added forced correction output.

  ![image](https://github.com/user-attachments/assets/dce72d55-41a6-4a2e-9f6c-4350ef229dcd)

## v1.2.3
  
  Added ImageSize Div node.

![image](https://github.com/user-attachments/assets/6f53211f-f695-4db6-9483-9da984d193ef)


## v1.2.2
  
  Added Frame Calculator node, which calculates the result as "rounded up" + 1 and can be selected in Seconds or frame mode.

  ![image](https://github.com/user-attachments/assets/0a922590-c3bb-4504-8708-443476c3ac03)


## v1.1.3
  
  Added Black White Color node, the input port's mask will be added with the mask generated by the node by ADD operation.

  The original purpose of the ChessboardPattern node was to suppress the pixel offset problem after style transformation in qwenEdit, first transform the style of the mask area, then transform the invert mask area (but it needs two sampling, this method does not work in the Klein model), later it was found that the ChessboardPattern mask will affect the recognition of the object by the model, so the Black White Color node was created. Try to make the area of black and white regions average to reduce the problem of inconsistent hue.
  
  ![image](https://github.com/user-attachments/assets/c715e5e6-1ff3-46ff-9d48-a0a87d2506df)


## v0.0.9

  Added ChessboardPattern node, creating a black and white checkerboard image, which can be selected to determine the unit size of the square cell in "by_grid_size" or "by_rows_and_cols" modes.

  ![image](https://github.com/user-attachments/assets/466bc026-adc5-42cd-abe5-c28f323dd482)


## v0.0.8

  Added Image Noise Using Mask node, which is convenient to add random noise to the mask area of the image, and can adjust the size and transparency of the noise, and can choose whether it is grayscale mode.
  
  Added Image Pad & Blur node, target width and target height, the extension is automatically calculated when there is input (when the parameter is smaller than the original image, it is clip mode), at this time the alignment parameter takes effect, and alignment mode (center alignment, left alignment, right alignment, top alignment, bottom alignment, left top alignment, left bottom alignment, right top alignment, right bottom alignment) can be selected.
  Pad mode can be selected as constant, reflect, edge, and the other is the same as reflect. When the constant mode is selected, feathering controls the overall blurring degree, content_blur controls the blurring degree of the expanded area of the original image. When the constant mode is selected, the background_color parameter takes effect, compatible with rgb color and HEX color code (16-bit color code).

![screen shot 2026-01-17 134457](https://github.com/user-attachments/assets/17b9af6d-e8d2-4c35-9e13-6822e6bfa266)
![screen shot 2026-01-17 134251](https://github.com/user-attachments/assets/e864a294-c70c-4409-9573-c357b6437158)

  

  
## v0.0.7

  Added Mask Stroke node, mask outline, supports independent control of inner and outer outline width and blur degree, and supports adding overall weight to non-outline areas (making the output mask without weight of 0 areas).
  
  ![node screenshot 2025-12-05 011534](https://github.com/user-attachments/assets/56b86fb6-758a-4d6c-8fa1-997b6bc9ee9d)

  
## v0.0.6

Empty Image RGB：Supports RGB and 16-bit color information input, the node will automatically identify color information color_code. Output pure color images, with image size output ports, the image size will be approximated according to divisible_by (integer division).

Text Line Break： Break the input text into lines according to the number of characters, supports Chinese, English, and mixed Chinese and English, supports punctuation symbols to avoid the head and tail. Convenient to connect prompts with generated images, which requires other nodes, such as the Add Label node in Kjnode. Random Chars (Append)：Add invalid special characters (characters and number can be customized) to the input text, mainly to make the generated image have greater changes without destroying the prompt intention (unknown whether it works), because the random changes in the image composition generated by qwen_image and Z_image models are small. Here "invalid" is relative.
                       Can simply set the insertion position (before, end, insert), where insert inserts the number of characters evenly into the position behind each punctuation mark of the original text, from back to front distribution.




![node screenshot 2025-12-04 164008](https://github.com/user-attachments/assets/1cdacfe2-7c7a-4434-9f48-1ec571bb19ab)