商务合作请联系email chflame@163.com.
For business cooperation, please contact email chflame@163.com.
A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
It migrate some basic functions of PhotoShop to ComfyUI, aiming to centralize the workflow and reduce the frequency of software switching.
*this workflow (title_example_workflow.json) is in the workflow directory.
Some JSON workflow files in the workflow
directory, That's examples of how these nodes can be used in ComfyUI.
(Taking ComfyUI official portable package and Aki ComfyUI package as examples, please modify the dependency environment directory for other ComfyUI environments)
Recommended use ComfyUI Manager for installation.
Or open the cmd window in the plugin directory of ComfyUI, like ComfyUI\custom_nodes
,type
git clone https://github.com/chflame163/ComfyUI_LayerStyle.git
Or download the zip file and extracted, copy the resulting folder to ComfyUI\custom_ Nodes
for ComfyUI official portable package, double-click the install_requirements.bat
in the plugin directory, for Aki ComfyUI package double-click on the install_requirements_aki.bat
in the plugin directory, and wait for the installation to complete.
Or install dependency packages, open the cmd window in the ComfyUILayerStyle plugin directory like ```ComfyUI\custom Nodes\ComfyUI_LayerStyle``` and enter the following command,
for ComfyUI official portable package, type:
..\..\..\python_embeded\python.exe -s -m pip install .\whl\docopt-0.6.2-py2.py3-none-any.whl
..\..\..\python_embeded\python.exe -s -m pip install .\whl\hydra_core-1.3.2-py3-none-any.whl
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt
.\repair_dependency.bat
for Aki ComfyUI package, type:
..\..\python\python.exe -s -m pip install .\whl\docopt-0.6.2-py2.py3-none-any.whl
..\..\python\python.exe -s -m pip install .\whl\hydra_core-1.3.2-py3-none-any.whl
..\..\python\python.exe -s -m pip install -r requirements.txt
.\repair_dependency.bat
Chinese domestic users from BaiduNetdisk and other users from huggingface.co/chflame163/ComfyUI_LayerStyle
download all files and copy them to ComfyUI\models
folder. This link provides all the model files required for this plugin.
Or download the model file according to the instructions of each node.
If the node cannot load properly or there are errors during use, please check the error message in the ComfyUI terminal window. The following are common errors and their solutions.
This warning message indicates that the ini file cannot be found and does not affect usage. If you do not want to see these warnings, please modify all *.ini.example
files in the plugin directory to *.ini
.
This error is that the psd_tools
were not installed correctly.
Solution:
../../../python_embeded/python.exe -s -m pip install psd_tools
If error occurs during the installation of psd_tool, such as ModuleNotFoundError: No module named 'docopt'
, please download docopt's whl and manual install it.
execute the following command in terminal window:
../../../python_embeded/python.exe -s -m pip install path/docopt-0.6.2-py2.py3-none-any.whl
the path
is path name of whl file.This error is caused by incorrect version of the opencv-contrib-python
package,or this package is overwriteen by other opencv packages.
The reason for the problem is the same as above.
This error is caused by the low version of transformers
package.
This error is caused by the low version of protobuf
package.
repair_dependency.bat
(for Official ComfyUI Protable) or repair_dependency_aki.bat
(for ComfyUI-aki-v1.x) in the plugin folder to automatically fix them.Solution:
Reinstall the onnxruntime
dependency package.
Check the network environment. If you cannot access huggingface.co normally in China, try modifying the huggingface_hub package to force the use hf_mirror.
Find constants.py
in the directory of huggingface_hub
package (usually Lib/site packages/huggingface_hub
in the virtual environment path),
Add a line after import os
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
This error is caused by the mask area being too large or too small when using the PyMatting
method to handle the mask edges.
Solution:
When this error has occurred, please check the network environment.
If this error occurs when executing JoyCaption2
node and it has been confirmed that the model file has been placed in the correct directory,
please check the transformers
dependency package version is at least 4.43.2 or higher.
If transformers
version is higher than or equal to 4.45.0, and also have error message:
Error loading models: De️️scriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
......
Please try downgrading the protobuf
dependency package to 3.20.3, or set environment variables: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
.
**If the dependency package error after updating, please double clicking repair_dependency.bat
(for Official ComfyUI Protable) or repair_dependency_aki.bat
(for ComfyUI-aki-v1.x) in the plugin folder to reinstall the dependency packages.
Commit BenUltra and LoadBenModel nodes. These two nodes are the implementation of PramaLLC/BEN project in ComfyUI.
Download the BEN_Base.pth
and config.json
from huggingface or BaiduNetdisk and copy to ComfyUI/models/BEN
folder.
Merge the PR submitted by jimlee2048, add the LoadBiRefNetModelV2 node, and support loading RMBG 2.0 models.
Download the model files from huggingface or BaiduNetdisk and copy to ComfyUI/models/BiRefNet/RMBG-2.0
folder.
Florence2 nodes support base-PromptGen-v2.0 and large-PromptGen-v2.0, Download base-PromptGen-v2.0
and large-PromptGen-v2.0
two folder from huggingface or BaiduNetdisk and copy to ComfyUI/models/florence2
folder.
SAM2Ultra and ObjectDetector nodes support image batch.
SAM2Ultra and SAM2VideoUltra nodes add support for SAM2.1 model, including kijai's FP16 model. Download model files from BaiduNetdisk or huggingface.co/Kijai/sam2-safetensors and copy to ComfyUI/models/sam2
folder.
Commit JoyCaption2Split and LoadJoyCaption2Model nodes, Sharing the model across multiple JoyCaption2 nodes improves efficiency.
SegmentAnythingUltra and SegmentAnythingUltraV2 add the cache_model
option, Easy to flexibly manage VRAM usage.
Due to the high version requirements of the LlamaVision node for transformers
, which affects the loading of some older third-party plugins, so the LayerStyle plugin has lowered the default requirement to 4.43.2. If you need to run LlamaVision, please upgrade to 4.45.0 or above on your own.
Commit JoyCaption2 and JoyCaption2ExtraOptions nodes. New dependency packages need to be installed.
Use the JoyCaption-alpha-two model for local inference. Can be used to generate prompt words. this node is https://huggingface.co/John6666/joy-caption-alpha-two-cli-mod Implementation in ComfyUI, thank you to the original author.
Download models form BaiduNetdisk and BaiduNetdisk ,
or huggingface/Orenguteng and huggingface/unsloth , then copy to ComfyUI/models/LLM
,
Download models from BaiduNetdisk or huggingface/google , and copy to ComfyUI/models/clip
,
Donwload the cgrkzexw-599808
folder from BaiduNetdisk or huggingface/John6666 , and copy to ComfyUI/models/Joy_caption
。
Commit LlamaVision node, Use the Llama 3.2 vision model for local inference. Can be used to generate prompt words. part of the code for this node comes from ComfyUI-PixtralLlamaMolmoVision, thank you to the original author.
To use this node, the transformers
need upgraded to 4.45.0 or higher.
Download models from BaiduNetdisk or huggingface/SeanScripts , and copy to ComfyUI/models/LLM
.
Commit RandomGeneratorV2 node, add least random range and seed options.
Commit TextJoinV2 node, add delimiter options on top of TextJion.
Commit GaussianBlurV2 node, The parameter accuracy has been improved to 0.01.
Commit UserPromptGeneratorTxtImgWithReference node.
Commit GrayValue node, output the grayscale values corresponding to the RGB color values.
LUT Apply, TextImageV2, TextImage, SimpleTextImage nodes to support defining multiple folders in resource-dir.ini
, separated by commas, semicolons, or spaces. Simultaneously supports refreshing real-time updates.
LUT Apply, TextImageV2, TextImage, SimpleTextImage nodes support defining multi directory fonts and lut folders, and support refreshing and real-time updates.
Commit HumanPartsUltra node, used to generate human body parts masks. It is based on the warrper of metal3d/ComfyUI_Human_Parts, thank the original author.
Download model file from BaiduNetdisk or huggingface and copy to ComfyUI\models\onnx\human-parts
folder.
ObjectDetector nodes add sort by confidence option.
Commit DrawBBoxMask node, used to convert the BBoxes output by the Object Detector node into a mask.
Commit UserPromptGeneratorTxtImg and UserPromptGeneratorReplaceWord nodes, Used to generate text and image prompts and replace prompt content.
Commit PhiPrompt node, Use Microsoft Phi 3.5 text and visual models for local inference. Can be used to generate prompt words, process prompt words, or infer prompt words from images. Running this model requires at least 16GB of video memory.
Download model files from BaiduNetdisk or huggingface.co/microsoft/Phi-3.5-vision-instruct and huggingface.co/microsoft/Phi-3.5-mini-instruct and copy to ComfyUI\models\LLM
folder.
Commit GetMainColors node, it can obtained 5 main colors of image. Commit ColorName node, it can obtain the color name of input color value.
Duplicate the Brightness & Contrast node as BrightnessContrastV2, the Color of Shadow & Highlight node as ColorofShadowHighlight, and Shadow & Highlight Mask to Shadow Highlight Mask V2, to avoid errors in ComfyUI workflow parsing caused by the "&" character in the node name.
Commit VQAPrompt and LoadVQAModel nodes.
Download the model from BaiduNetdisk or huggingface.co/Salesforce/blip-vqa-capfilt-large and huggingface.co/Salesforce/blip-vqa-base and copy to ComfyUI\models\VQA
folder.
Florence2Ultra, Florence2Image2Prompt 和 LoadFlorence2Model nodes support the MiaoshouAI/Florence-2-large-PromptGen-v1.5 and MiaoshouAI/Florence-2-base-PromptGen-v1.5 model.
Download model files from BaiduNetdisk or huggingface.co/MiaoshouAI/Florence-2-large-PromptGen-v1.5 and huggingface.co/MiaoshouAI/Florence-2-base-PromptGen-v1.5 , copy to ComfyUI\models\florence2
folder.
Commit BiRefNetUltraV2 and LoadBiRefNetModel nodes, that support the use of the latest BiRefNet model.
Download model file from BaiduNetdisk or GoogleDrive named BiRefNet-general-epoch_244.pth
to ComfyUI/Models/BiRefNet/pth
folder. You can also download more BiRefNet models and put them here.
ExtendCanvasV2 node support negative value input, it means image will be cropped.
The default title color of nodes is changed to blue-green, and nodes in LayerStyle, LayerColor, LayerMask, LayerUtility, and LayerFilter are distinguished by different colors.
The Object Detector nodes added sort bbox option, which allows sorting from left to right, top to bottom, and large to small, making object selection more intuitive and convenient. The nodes released yesterday has been abandoned, please manually replace it with the new version node (sorry).
Commit SAM2Ultra, SAM2VideoUltra, ObjectDetectorFL2, ObjectDetectorYOLOWorld, ObjectDetectorYOLO8, ObjectDetectorMask and BBoxJoin nodes.
Download models from BaiduNetdisk or huggingface.co/Kijai/sam2-safetensors and copy to ComfyUI/models/sam2
folder,
Download models from BaiduNetdisk or GoogleDrive and copy to ComfyUI/models/yolo-world
folder.
This update introduces new dependencies, please reinstall the dependency package.
Commit RandomGenerator node, Used to generate random numbers within a specified range, with outputs of int, float, and boolean, supporting batch generation of different random numbers by image batch.
Commit EVF-SAMUltra node, it is implementation of EVF-SAM in ComfyUI. Please download model files from BaiduNetdisk or huggingface/EVF-SAM2, huggingface/EVF-SAM to ComfyUI/models/EVF-SAM
folder(save the models in their respective subdirectories).
Due to the introduction of new dependencies package, after the plugin upgrade, please reinstall the dependency packages.
Commit ImageTaggerSave and ImageAutoCropV3 nodes. Used to implement the automatic trimming and marking workflow for the training set (the workflow image_tagger_save.json
is located in the workflow directory).
Commit CheckMaskV2 node, Added the simple
method to detect masks more quickly.
Commit ImageReel and ImageReelComposite nodes to composite multiple images on a canvas.
NumberCalculatorV2 and NumberCalculator add the min
and max
method.
Optimize node loading speed.
Florence2Image2Prompt add support for thwri/CogFlorence-2-Large-Freeze
and thwri/CogFlorence-2.1-Large
models. Please download the model files from BaiduNetdisk or huggingface/CogFlorence-2-Large-Freeze and huggingface/CogFlorence-2.1-Large , then copy it to ComfyUI/models/florence2
folder.
Merge branch from ClownsharkBatwing "Use GPU for color blend mode", the speed of some layer blends by more than ten times.
Commit Florence2Ultra, Florence2Image2Prompt and LoadFlorence2Model nodes.
TransparentBackgroundUltra node add new model support. Please download the model file according to the instructions.
Commit SegformerUltraV2, SegfromerFashionPipeline and SegformerClothesPipeline nodes, used for segmentation of clothing. please download the model file according to the instructions.
Commit install_requirements.bat
and install_requirements_aki.bat
, One click solution to install dependency packages.
Commit TransparentBackgroundUltra node, it remove background based on transparent-background model.
Change the VitMatte model of the Ultra node to a local call. Please download all files of vitmatte model to the ComfyUI/models/vitmatte
folder.
GetColorToneV2 node add the mask
method to the color selection option, which can accurately obtain the main color and average color within the mask.
ImageScaleByAspectRatioV2 node add the "background_color" option.
LUT Apply Add the "strength" option.
Commit AutoAdjustV2 node, add optional mask input and support for multiple automatic color adjustment modes.
Due to the upcoming discontinuation of gemini-pro vision services, PromptTagger and PromptEmbellish have added the "gemini-1.5-flash" API to continue using it.
Ultra nodes added the option to run VitMatte
on the CUDA device, resulting in a 5-fold increase in running speed.
Commit QueueStop node, used to terminate the queue operation.
Optimize performance of the VitMate
method for Ultra nodes when processing large-size image.
CropByMaskV2 add option to round the cutting size by multiples.
Commit CheckMask node, it detect whether the mask contains sufficient effective areas. Commit HSVValue node, it convert color values to HSV values.
BooleanOperatorV2, NumberCalculatorV2, Integer, Float, Boolean nodes add string output to output the value as a string for use with SwitchCase.
Commit SwitchCase node, Switches the output based on the matching string. Can be used for any type of data switching.
Commit String node, Used to output a string. It is the TextBox simplified node.
Commit If node,Switches output based on Boolean conditional input. Can be used for any type of data switching.
Commit StringCondition node, Determines whether the text contains or does not contain a substring.
Commit NumberCalculatorV2 node,Add the nth root operation. Commit BooleanOperatorV2 node, Increasing greater/less than, greater/less then or equal logical judgment. The two nodes can access numeric inputs and can input numeric values within the node. Note: Numeric input takes precedence. Values in nodes will not be valid when there is input.
Commit SD3NegativeConditioning node, Encapsulate the four nodes of Negative Condition in SD3 into a separate node.
ImageRemoveAlpha node add optional mask input.
Commit HLFrequencyDetailRestore node, Using low-frequency filtering and high-frequency preserving to restore image details, the fusion is better.
Commit AddGrain and MaskGrain nodes, Add noise to a picture or mask.
Commit FilmV2 node, The fastgrain method is added on the basis of the previous one, and the noise generation speed is 10 times faster.
Commit ImageToMask node, it can be converted image into mask. Supports converting any channel in LAB, RGBA, YUV, and HSV modes into masks, while providing color scale adjustment. Support mask optional input to obtain masks that only include valid parts.
The blackpoint and whitepoint options in some nodes have been changed to slider adjustment for a more intuitive display. Include MaskEdgeUltraDetailV2, SegmentAnythingUltraV2, RmBgUltraV2,PersonMaskUltraV2,BiRefNetUltra, SegformerB2ClothesUltra, BlendIfMask and Levels.
ImageScaleRestoreV2 and ImageScaleByAspectRatioV2 nodes add the total_pixel
method to scale images.
Commit MediapipeFacialSegment node,Used to segment facial features, including left and right eyebrows, eyes, lips, and teeth.
Commit BatchSelector node,Used to retrieve specified images or masks from batch images or masks.
LayerUtility creates new subdirectories such as SystemIO, Data, and Prompt. Some nodes are classified into subdirectories.
Commit MaskByColor node, Generate a mask based on the selected color.
Commit LoadPSD node, It read the psd format, and output layer images. Note that this node requires the installation of the psd_tools
dependency package, If error occurs during the installation of psd_tool, such as ModuleNotFoundError: No module named 'docopt'
, please download docopt's whl and manual install it.
Commit SegformerB2ClothesUltra node, it used to segment character clothing. The model segmentation code is fromStartHua, thanks to the original author.
SaveImagePlus node adds the output workflow to the json function, supports %date
and %time
to embeddint date or time to path and filename, and adds the preview switch.
Commit SaveImagePlus node,It can customize the directory where the picture is saved, add a timestamp to the file name, select the save format, set the image compression rate, set whether to save the workflow, and optionally add invisible watermarks to the picture.
Commit AddBlindWaterMark, ShowBlindWaterMark nodes, Add invisible watermark and decoded watermark to the picture. Commit CreateQRCode, DecodeQRCode nodes, It can generate two-dimensional code pictures and decode two-dimensional codes.
ImageScaleRestoreV2, ImageScaleByAspectRatioV2, ImageAutoCropV2 nodes add options for width
and height
, which can specify width or height as fixed values.
Commit PurgeVRAM node, Clean up VRAM an RAM.
Commit AutoAdjust node, it can automatically adjust image contrast and white balance.
Commit RGBValue node to output the color value as a single decimal value of R, G, B. This idea is from vxinhao, Thanks.
Commit seed node to output the seed value. The ImageMaskScaleAs, ImageScaleBySpectRatio, ImageScaleBySpectRatioV2, ImageScaleRestore, ImageScaleRestoreV2 nodes increase width
, height
output.
Commit Levels node, it can achieve the same color levels adjustment function as Photoshop.Sharp&Soft add the "None" option.
Commit BlendIfMask node, This node cooperates with ImgaeBlendV2 or ImageBlendAdvanceV2 to achieve the same Blend If function as Photoshop.
Commit ColorTemperature and ColorBalance nodes, used to adjust the color temperature and color balance of the picture.
Add new types of Blend Mode V2 between images. now supports up to 30 blend modes. The new blend mode is available for all V2 versions that support mixed mode nodes, including ImageBlend V2, ImageBlendAdvance V2, DropShadow V2, InnerShadow V2, OuterGlow V2, InnerGlow V2, Stroke V2, ColorOverlay V2, GradientOverlay V2.
Part of the code for BlendMode V2 is from Virtuoso Nodes for ComfyUI. Thanks to the original authors.
Commit YoloV8Detect node.
Commit QWenImage2Prompt node, this node is repackage of the ComfyUI_VLM_nodes's UForm-Gen2 Qwen Node
, thanks to the original author.
Commit BooleanOperator, NumberCalculator, TextBox, Integer, Float, Booleannodes. These nodes can perform mathematical and logical operations.
Commit ExtendCanvasV2 node,support color value input.
Commit AutoBrightness node,it can automatically adjust the brightness of image.
CreateGradientMask node add center
option.
Commit GetColorToneV2 node, can select the main and average colors for the background or body.
Commit ImageRewardFilter node, can filter out poor quality pictures.
Ultra nodes add VITMatte(local)
method, You can choose this method to avoid accessing huggingface.co if you have already downloaded the model before.
Commit HDR Effect node,it enhances the dynamic range and visual appeal of input images. this node is repackage of HDR Effects (SuperBeasts.AI).
Commit CropBoxResolve node.
Commit BiRefNetUltra node, it using the BiRefNet model to remove background has better recognition ability and ultra-high edge details.
Commit ImageAutoCropV2 node, it can choose not to remove the background, support mask input, and scale by long or short side size.
Commit ImageHub node, supports up to 9 sets of Image and Mask switching output, and supports random output.
Commit TextJoin node.
Commit PromptEmbellish node. it output polished prompt words, and support inputting images as references.
Ultra nodes have been fully upgraded to V2 version, with the addition of VITMatte edge processing method, which is suitable for handling semi transparent areas. Include MaskEdgeUltraDetailV2, SegmentAnythingUltraV2, RmBgUltraV2 and PersonMaskUltraV2 nodes.
Commit Color of Shadow & Highlight node, it can adjust the color of the dark and bright parts separately. Commit Shadow & Highlight Mask node, it can output mask for dark and bright areas.
Commit CropByMaskV2 node, On the basis of the original node, it supports crop_box
input, making it convenient to cut layers of the same size.
Commit SimpleTextImage node, it generate simple typesetting images and masks from text. This node references some of the functionalities and code of ZHO-ZHO-ZHO/ComfyUI-Text_Image-Composite.
Commit PromptTagger node,Inference the prompts based on the image. and it can replace key word for the prompt(need apply for Google Studio API key). Upgrade ColorImageV2 and GradientImageV2,support user customize preset sizes and size_as input.
Commit LaMa node, it can erase objects from the image based on the mask. this node is repackage of IOPaint.
Commit ImageRemoveAlpha and ImageCombineAlpha nodes, alpha channel of the image can be removed or merged.
Commit ImageScaleRestoreV2 and ImageScaleByAspectRatioV2 nodes, supports scaling images to specified long or short edge sizes.
Commit PersonMaskUltra node, Generate masks for portrait's face, hair, body skin, clothing, or accessories. the model code for this node comes from a-person-mask-generator.
Commit LightLeak node, this filter simulate the light leakage effect of the film.
Commit Film node, this filter simulate the grain, dark edge, and blurred edge of the film, support input depth map to simulate defocus. it is reorganize and encapsulate of digitaljohn/comfyui-propost.
Commit ImageAutoCrop node, which is designed to generate image materials for training models.
Commit ImageScaleByAspectRatio node, it can be scaled image or mask according to frame ratio.
Fix the bug of color gradation in LUT Apply node rendering, and this node now support for log color space. *Please load the dedicated log lut file for the log color space image.
Commit CreateGradientMask node. Commit LayerImageTransform and LayerMaskTransform nodes.
Commit MaskEdgeUltraDetail node, it process rough masks to ultra fine edges.Commit Exposure node.
Commit Sharp & Soft node, it can enhance or smooth out image details. Commit MaskByDifferent node, it compare two images and output a Mask. Commit SegmentAnythingUltra node, Improve the quality of mask edges. *If SegmentAnything is not installed, you will need to manually download the model.
All nodes have fully supported batch images, providing convenience for video creation. (The CropByMask node only supports cuts of the same size. if a batch mask_for_crop inputted, the data from the first sheet will be used.)
Commit RemBgUltra and PixelSpread nodes significantly improved mask quality. *RemBgUltra requires manual model download.
Commit TextImage node, it generate text images and masks.
Add new types of blend mode between images. now supports up to 19 blend modes. add color_burn, color_dodge, linear_burn, linear_dodge, overlay, soft_light, hard_light, vivid_light, pin_light, linear_light and hard_mix. The newly added blend mode is applicable to all nodes that support blend mode.
Commit ColorMap filter node to create a pseudo color heatmap effect.
Commit WaterColor and SkinBeauty nodes。These are image filters that generate watercolor and skin smoothness effects.
Commit ImageShift node to shift the image and output a displacement seam mask, making it convenient to create continuous textures.
Commit ImageMaskScaleAs node to adjust the image or mask size based on the reference image.
Commit ImageScaleRestore node to work with CropByMask for local upscale and repair works.
Commit CropByMask and RestoreCropBox nodes. The combination of these two can partially crop and redraw the image before restoring it.
Commit ColorAdapter node, that can automatically adjust the color tone of the image.
Commit MaskStroke node, it can generate mask contour strokes.
Add LayerColor node group, used to adjust image color. it include LUT Apply, Gamma, Brightness & Contrast, RGB, YUV, LAB adn HSV.
Commit ImageChannelSplit and ImageChannelMerge nodes.
Commit MaskMotionBlur node.
Commit SoftLight node.
Commit ChannelShake node, that is filter, can produce channel dislocation effect similar like Tiktok logo.
Commit MaskGradient node, can create a gradient in the mask.
Commit GetColorTone node, can obtain the main color or average color of the image. Commit MaskGrow and MaskEdgeShrink nodes.
Commit MaskBoxDetect node, which can automatically detect the position through the mask and output it to the composite node. Commit XY to Percent node to convert absolute coordinates to percent coordinates. Commit GaussianBlur node. Commit GetImageSize node.
Commit ExtendCanvas node.
Commit ImageBlendAdvance node. This node allows for the synthesis of background images and layers of different sizes, providing a more free synthesis experience. Commit PrintInfo node as a workflow debugging aid.
Commit ColorImage and GradientImage nodes, Used to generate solid and gradient color images.
Commit GradientOverlay and ColorOverlay nodes. Add invalid mask input judgment and ignore it when invalid mask is input.
Commit InnerGlow, InnerShadow and MotionBlur nodes.
Renaming all completed nodes, the nodes are divided into 4 groups:LayerStyle, LayerMask, LayerUtility, LayerFilter. workflows containing old version nodes need to be manually replaced with new version nodes.
OuterGlow node has undergone significant modifications by adding options for brightness, _lightcolor, and _glowcolor.
Commit MaskInvert node.
Commit ColorPick node.
Commit Stroke node.
Commit MaskPreview node.
Commit ImageOpacity node.
The layer_mask is not a mandatory input now. it is allowed to use layers and masks with different shapes, but the size must be consistent.
Commit ImageBlend node.
Commit OuterGlow node.
Commit DropShadow node.
Nodes are divided into 5 groups according to their functions: LayerStyle, LayerColor, LayerMask, LayerUtility and LayerFilter.
Generate shadow
Node options:
Generate outer glow
Node options:
Generate inner shadow
Node options:
Generate inner glow
Node options:
Generate a stroke of layer。
Node options:
Generate gradient overlay
Node options:
Generate color overlay
Node options:
Apply LUT to the image. only supports .cube format.
Node options:
*LUT folder is defined in resource_dir.ini
, this file is located in the root directory of the plug-in, and the default name is resource_dir.ini.example
. to use this file for the first time, you need to change the file suffix to .ini
.
Open the text editing software and find the line starting with "LUT_dir=", after "=", enter the custom folder path name.
support defining multiple folders in resource-dir.ini
, separated by commas, semicolons, or spaces.
all .cube files in this folder will be collected and displayed in the node list during ComfyUI initialization.
If the folder set in ini is invalid, the LUT folder that comes with the plugin will be enabled.
Automatically adjust the brightness, contrast, and white balance of the image. Provide some manual adjustment options to compensate for the shortcomings of automatic adjustment.
Node Options:
On the basis of AutoAdjust, add mask input and only calculate the content inside the mask for automatic color adjustment. Add multiple automatic adjustment modes.
The following changes have been made based on AutoAdjust:
Automatically adjust too dark or too bright image to moderate brightness, and support mask input. When mask input, only the content of the mask part is used as the data source of the automatic brightness. The output is still the whole adjusted image.
Node options:
Auto adjust the color tone of the image to resemble the reference image.
Node options:
Change the exposure of the image.
Adjust the color of the dark and bright parts of the image.
Node options:
Node option:
A replica of the Color of Shadow & Highlight
node, with the "&" character removed from the node name to avoid ComfyUI workflow parsing errors.
Change the color temperature of the image.
Node Options:
Change the levels of image.
Node Options:
*If the black_point or output_black_point value is greater than white_point or output_white_point, the two values are swapped, with the larger value used as white_point and the smaller value used as black_point.
Change the color balance of an image.
Node Options:
Change the gamma value of the image.
Node options:
Change the brightness, contrast, and saturation of the image.
Node options:
A replica of the Brightness & Contrast
node, with the "&" character removed from the node name to avoid ComfyUI workflow parsing errors.
Adjust the RGB channels of the image.
Node options:
Adjust the YUV channels of the image.
Node options:
Adjust the LAB channels of the image.
Node options:
Adjust the HSV channels of the image.
Node options:
Used for compositing layers, allowing for compositing layer images of different sizes on the background image, and setting positions and transformations. multiple mixing modes are available for selection, and transparency can be set.
The node provide layer transformation_methods and anti_aliasing options. helps improve the quality of synthesized images.
The node provides mask output that can be used for subsequent workflows.
Node options:
Crop the image according to the mask range, and set the size of the surrounding borders to be retained. This node can be used in conjunction with the RestoreCropBox and ImageScaleRestore nodes to crop and modify upscale parts of image, and then paste them back in place.
Node options:
min_bounding_rect
is the minimum bounding rectangle of block shape, max_inscribed_rect
is the maximum inscribed rectangle of block shape, and mask-area
is the effective area for masking pixels.Output:
The V2 upgraded version of CropByMask. Supports crop_box input, making it easy to cut layers of the same size.
The following changes have been made based on CropByMask:
mask_for_crop
reanme to mask
。crop_box
. If there are inputs here, mask detection will be ignored and this data will be directly used for cropping.round_to_multiple
to round the trimming edge length multiple. For example, setting it to 8 will force the width and height to be multiples of 8.Restore the cropped image to the original image by CropByMask.
Node options:
Parsing the corp_box
to x
, y
, width
, height
.
Image scaling. when this node is used in pairs, the image can be automatically restored to its original size on the second node.
Node options:
Outputs:
The V2 upgraded version of ImageScaleRestore.
Node options:
The following changes have been made based on ImageScaleRestore:
scale_by
to specify the length of the edge.Scale the image or mask to the size of the reference image (or reference mask).
Node options:
*Only limited to input images and masks. forcing the integration of other types of inputs will result in node errors.
Outputs:
Scale the image or mask by aspect ratio. the scaled size can be rounded to a multiple of 8 or 16, and can be scaled to the long side size.
Node options:
Outputs:
V2 Upgraded Version of ImageScaleByAspectRatio
Node options:
The following changes have been made based on ImageScaleByAspectRatio:
Inference the prompts based on the image. this node is repackage of the ComfyUI_VLM_nodes's UForm-Gen2 Qwen Node
, thanks to the original author.
Download model files from huggingface or Baidu Netdisk to ComfyUI/models/LLavacheckpoints/files_for_uform_gen2_qwen
folder.
Node Options:
Use the Llama 3.2 vision model for local inference. Can be used to generate prompt words. part of the code for this node comes from ComfyUI-PixtralLlamaMolmoVision, thank you to the original author.
To use this node, the transformers
need upgraded to 4.45.0 or higher.
Download models from BaiduNetdisk or huggingface/SeanScripts , and copy to ComfyUI/models/LLM
.
Node Options:
Use the JoyCaption-alpha-two model for local inference. Can be used to generate prompt words. this node is https://huggingface.co/John6666/joy-caption-alpha-two-cli-mod Implementation in ComfyUI, thank you to the original author.
Download models form BaiduNetdisk and BaiduNetdisk ,
or huggingface/Orenguteng and huggingface/unsloth , then copy to ComfyUI/models/LLM
,
Download models from BaiduNetdisk or huggingface/google , and copy to ComfyUI/models/clip
,
Donwload the cgrkzexw-599808
folder from BaiduNetdisk or huggingface/John6666 , and copy to ComfyUI/models/Joy_caption
。
Node Options:
The node of JoyCaption2 separate model loading and inference, and when multiple JoyCaption2 nodes are used, the model can be shared to improve efficiency.
Node Options:
JoyCaption2's model loading node, used in conjunction with JoyCaption2Split.
Node Options:
The extra_options parameter node of JoyCaption2.
Node Options:
refer_character_name
.Use Microsoft Phi 3.5 text and visual models for local inference. Can be used to generate prompt words, process prompt words, or infer prompt words from images. Running this model requires at least 16GB of video memory.
Download model files from BaiduNetdisk or huggingface.co/microsoft/Phi-3.5-vision-instruct and huggingface.co/microsoft/Phi-3.5-mini-instruct and copy to ComfyUI\models\LLM
folder.
Node Options:
UserPrompt preset for generating SD text to image prompt words.
Node options:
UserCompt preset for generating SD text to image prompt words based on input content.
Node options:
UserPrompt preset used to replace a keyword in text with different content. This is not only a simple replacement, but also a logical sorting of the text based on the context of the prompt words to achieve the rationality of the output content.
Node options:
Inference the prompts based on the image. it can replace key word for the prompt. This node currently uses Google Gemini API as the backend service. Please ensure that the network environment can use Gemini normally.
Please apply for your API key on Google AI Studio, And fill it in api_key.ini
, this file is located in the root directory of the plug-in, and the default name is api_key.ini.example
. to use this file for the first time, you need to change the file suffix to .ini
. Open it using text editing software, fill in your API key after google_api_key=
and save it.
Node options:
Enter simple prompt words, output polished prompt words, and support inputting images as references, and support Chinese input. This node currently uses Google Gemini API as the backend service. Please ensure that the network environment can use Gemini normally.
Please apply for your API key on Google AI Studio, And fill it in api_key.ini
, this file is located in the root directory of the plug-in, and the default name is api_key.ini.example
. to use this file for the first time, you need to change the file suffix to .ini
. Open it using text editing software, fill in your API key after google_api_key=
and save it.
Node options:
Use the Florence 2 model to infer prompt words. The code for this node section is fromyiwangsimple/florence_dw, thanks to the original author.
*When using it for the first time, the model will be automatically downloaded. You can also download the model file from BaiduNetdisk to ComfyUI/models/florence2
folder.
Node Options:
Use the blip-vqa model for visual question answering. Part of the code for this node is referenced from celoron/ComfyUI-VisualQueryTemplate, thanks to the original author.
*Download model files from BaiduNetdisk or huggingface.co/Salesforce/blip-vqa-capfilt-large and huggingface.co/Salesforce/blip-vqa-base and copy to ComfyUI\models\VQA
folder.
Node Options:
Load the blip-vqa model.
Node Options:
Shift the image. this node supports the output of displacement seam masks, making it convenient to create continuous textures.
Node options:
A simple node for composit layer image and background image, multiple blend modes are available for option, and transparency can be set.
Node options:
Display multiple images in one reel. Text annotations can be added to each image in the reel. By using the ImageReelComposite node, multiple reel can be combined into one image.
Node Options:
Output:
Combine multiple reel into one image.
Node Options:
resource_dir.ini
, this file is located in the root directory of the plug-in, and the default name is resource_dir.ini.example
.
to use this file for the first time, you need to change the file suffix to .ini
.
Open the text editing software and find the line starting with "FONT_dir=", after "=", enter the custom folder path name.
support defining multiple folders in resource-dir.ini
, separated by commas, semicolons, or spaces.
all font files in this folder will be collected and displayed in the node list during ComfyUI initialization.
If the folder set in ini is invalid, the font folder that comes with the plugin will be enabled.Adjust image opacity
Node option:
Modify web extensions from mtb nodes. Select colors on the color palette and output RGB values, thanks to the original author.
Node options:
Output type:
Output the color value as a single R, G, B three decimal values. Supports HEX and DEC formats for ColorPicker node output.
Node Options:
Output color values as individual decimal values of H, S, and V (maximum value of 255). Supports HEX and DEC formats for ColorPicker node output.
Node Options:
Output grayscale values based on color values. Supports outputting 256 level and 100 level grayscale values.
Node Options:
Outputs:
Obtain the main color or average color from the image and output RGB values.
Node options:
Output type:
V2 upgrade of GetColorTone. You can specify the dominant or average color to get the body or background.
The following changes have been made on the basis of GetColorTong:
Output:
Obtain the main color of the image. You can obtain 5 colors.
Node Options:
Outputs:
Output the most similar color name in the color palette based on the color value.
Node Options:
xkcd
includes 949 colors, css3
includes 147 colors, and html4
includes 16 colors.Output:
Extend the canvas
Node options:
V2 upgrade to ExtendCanvas.
Based on ExtendCanvas, color is modified to be a string type, and it supports external ColorPicker
input, Support negative value input, it means image will be cropped.
Convert absolute coordinates to percentage coordinates.
Node options:
This node is used to transform layer_image separately, which can change size, rotation, aspect ratio, and mirror flip without changing the image size.
Node options:
Similar to LayerImageTransform node, this node is used to transform the layer_mask separately, which can scale, rotate, change aspect ratio, and mirror flip without changing the mask size.
Node options:
Generate an image of a specified color and size.
Node options:
The V2 upgraded version of ColorImage.
The following changes have been made based on ColorImage:
*Only limited to input images and masks. forcing the integration of other types of inputs will result in node errors.
**The preset size is defined in custom_size.ini
, this file is located in the root directory of the plug-in, and the default name is custom_size.ini.example
. to use this file for the first time, you need to change the file suffix to .ini
. Open with text editing software. Each row represents a size, with the first value being width and the second being height, separated by a lowercase "x" in the middle. To avoid errors, please do not enter extra characters.
Generate an image with a specified size and color gradient.
Node options:
The V2 upgraded version of GradientImage.
The following changes have been made based on GradientImage:
*Only limited to input images and masks. forcing the integration of other types of inputs will result in node errors.
**The preset size is defined in custom_size.ini
, this file is located in the root directory of the plug-in, and the default name is custom_size.ini.example
. to use this file for the first time, you need to change the file suffix to .ini
. Open with text editing software. Each row represents a size, with the first value being width and the second being height, separated by a lowercase "x" in the middle. To avoid errors, please do not enter extra characters.
Rating bulk pictures and outputting top-ranked pictures. it used [ImageReward] (https://github.com/THUDM/ImageReward) for image scoring, thanks to the original authors.
Node options:
Outputs:
Generate simple typesetting images and masks from text. This node references some of the functionalities and code of ZHO-ZHO-ZHO/ComfyUI-Text_Image-Composite, thanks to the original author.
Node options:
*Only limited to input image and mask. forcing the integration of other types of inputs will result in node errors.
**The font folder is defined in resource_dir.ini
, this file is located in the root directory of the plug-in, and the default name is resource_dir.ini.example
. to use this file for the first time, you need to change the file suffix to .ini
.
Open the text editing software and find the line starting with "FONT_dir=", after "=", enter the custom folder path name.
support defining multiple folders in resource-dir.ini
, separated by commas, semicolons, or spaces.
all font files in this folder will be collected and displayed in the node list during ComfyUI initialization.
If the folder set in ini is invalid, the font folder that comes with the plugin will be enabled.
Generate images and masks from text. support for adjusting the spacing between words and lines, horizontal and vertical adjustments, it can set random changes in each character, including size and position.
Node options:
*Only limited to input image and mask. forcing the integration of other types of inputs will result in node errors.
**The font folder is defined in resource_dir.ini
, this file is located in the root directory of the plug-in, and the default name is resource_dir.ini.example
. to use this file for the first time, you need to change the file suffix to .ini
.
Open the text editing software and find the line starting with "FONT_dir=", after "=", enter the custom folder path name.
support defining multiple folders in resource-dir.ini
, separated by commas, semicolons, or spaces.
all font files in this folder will be collected and displayed in the node list during ComfyUI initialization.
If the folder set in ini is invalid, the font folder that comes with the plugin will be enabled.
This node is merged from heshengtao. The PR modifies the scaling of the image text node based on the TextImage node. The font spacing follows the scaling, and the coordinates are no longer based on the top left corner of the text, but on the center point of the entire line of text. Thank you for the author's contribution.
Erase objects from the image based on the mask. this node is repackage of IOPaint, powered by state-of-the-art AI models, thanks to the original author.
It is have LaMa, LDM, ZITS,MAT, FcF, Manga models and the SPREAD method to erase. Please refer to the original link for the introduction of each model.
Please download the model files from lama models(BaiduNetdisk) or lama models(Google Drive) to ComfyUI/models/lama
folder.
Node optons:
Split the image channel into individual images.
Node options:
Merge each channel image into one image.
Node options:
Remove the alpha channel from the image and convert it to RGB mode. you can choose to fill the background and set the background color.
Node options:
Merge the image and mask into an RGBA mode image containing an alpha channel.
Automatically cutout and crop the image according to the mask. it can specify the background color, aspect ratio, and size for output image. this node is designed to generate the image materials for training models.
*Please refer to the model installation methods for SegmentAnythingUltra and RemBgUltra.
Node options:
Output: cropped_image: Crop and replace the background image. box_preview: Crop position preview. cropped_mask: Cropped mask.
The V2 upgrad version of ImageAutoCrop
, it has made the following changes based on the previous version:
fill_background
. When set to False, the background will not be processed and any parts beyond the frame will not be included in the output range.aspect_ratio
adds the original
option.scale_by
to specify the length of the edge.Automatically crop the image to the specified size. You can input a mask to preserve the specified area of the mask. This node is designed to generate image materials for training the model.
Node Options:
Outputs: cropped_image: The cropped image. box_preview: Preview of cutting position.
Using low frequency filtering and retaining high frequency to recover image details. Compared to kijai's DetailTransfer, this node is better integrated with the environment while retaining details.
Node Options:
Obtain the width and height of the image.
Output:
Switch output from multiple input images and masks, supporting 9 sets of inputs. All input items are optional. if there is only image or mask in a set of input, the missing item will be output as None.
Node options:
random-output
option is True, this setting will be ignored.output
setting will be ignored and a random set will be output among all valid inputs.Retrieve specified images or masks from batch images or masks.
Node Options:
Combine multiple paragraphs of text into one.
Added delimiter options on the basis of TextJoin.
Used to provide assistance for workflow debugging. When running, the properties of any object connected to this node will be printed to the console.
This node allows any type of input.
Output a string.
Output a string. same as TextBox.
Output a integer value.
Output a floating-point value with a precision of 5 decimal places.
Output a boolean value.
Used to generate random value within a specified range, with outputs of int, float, and boolean. Supports batch and list generation, and supports batch generation of a set of different random number lists based on image batch.
Node Options:
Outputs: int: Integer random number. float: Float random number. bool: Boolean random number.
On the based of RandomGenerator, add the least random range and seed options.
Node Options:
Outputs: int: Integer random number. float: Float random number. bool: Boolean random number.
Performs mathematical operations on two numeric values and outputs integer and floating point results. Supported operations include+
, -
, ```,
/,
**,
//,
%```.
* The input only supports boolean, integer, and floating point numbers, forcing in other data will result in error.
The upgraded version of NumberCalculator has added numerical inputs within nodes and square root operations. The square root operation option is nth_root
Note: The input takes priority, and when there is input, the values within the node will be invalid.
Perform a Boolean operation on two numeric values and output the result*. Supported operations include==
, !=
, and
, or
, xor
, not
, min
, max
.
* The input only supports boolean, integer, and floating point numbers, forcing in other data will result in error. The and
operation between the values outputs a larger number, and the or
operation outputs a smaller number.
The upgraded version of Boolean Operator has added numerical inputs within nodes and added judgments for greater than, less than, greater than or equal to, and less than or equal to.
Note: The input takes priority, and when there is input, the values within the node will be invalid.
Determine whether the text contains or does not contain substrings, and output a Boolean value.
Node Options:
include
determines whether it contains a substring, and exclude
determines whether it does not.Check if the mask contains enough valid areas and output a Boolean value.
Node Options:
On the basis of CheckMask, the method
option has been added, which allows for the selection of different detection methods. The area_percent
is changed to a floating point number with an accuracy of 2 decimal places, which can detect smaller effective areas.
Node Options:
simple
and detectability
. The simple method only detects whether the mask is completely black, while the detect_percent method detects the proportion of effective areas.
Switches output based on Boolean conditional input. It can be used for any type of data switching, including but not limited to numeric values, strings, pictures, masks, models, latent, pipe pipelines, etc.
Node Options:
Switches the output based on the matching string. It can be used for any type of data switching, including but not limited to numeric values, strings, pictures, masks, models, latent, pipe pipelines, etc. Supports up to 3 sets of case switches.
Compare case to switch_condition
, if the same, output the corresponding input. If there are the same cases, the output is prioritized in order. If there is no matching case, the default input is output.
Note that the string is case sensitive and Chinese and English full-width and half-width.
Node Options:
case_1
. This input is optional.case_2
. This input is optional.case_3
. This input is optional.
Stop the current queue. When executed at this node, the queue will stop. The workflow diagram above illustrates that if the image is larger than 1Mega pixels, the queue will stop executing.
Node Options:
stop
, it will be determined whether to stop based on the input conditions. If you choose continue
, ignore the condition to continue executing the queue.
Clean up GPU VRAM and system RAM. any type of input can be accessed, and when executed to this node, the VRAM and garbage objects in the RAM will be cleaned up. Usually placed after the node where the inference task is completed, such as the VAE Decode node.
Node Options:
Enhanced save image node. You can customize the directory where the picture is saved, add a timestamp to the file name, select the save format, set the image compression rate, set whether to save the workflow, and optionally add invisible watermarks to the picture. (Add information in a way that is invisible to the naked eye, and use the ShowBlindWaterMark
node to decode the watermark). Optionally output the json file of the workflow.
Node Options:
png
and jpg
. Note that only png format is supported for RGBA mode pictures.ShowBlindWaterMark
node can decode watermarks. Note that pictures with watermarks are recommended to be saved in png format, and lower-quality jpg format will cause watermark information to be lost.* Enter%date
for the current date (YY-mm-dd) and %time
for the current time (HH-MM-SS). You can enter /
for subdirectories. For example, %date/name_%tiem
will output the image to the YY-mm-dd
folder, with name_HH-MM-SS
as the file name prefix.
The node used to save the training set images and their text labels, where the image files and text label files have the same file name. Customizable directory for saving images, adding timestamps to file names, selecting save formats, and setting image compression rates.
*The workflow image_tagger_stave.exe is located in the workflow directory.
Node Options:
png
and jpg
. Note that only png format is supported for RGBA mode pictures.* Enter%date
for the current date (YY-mm-dd) and %time
for the current time (HH-MM-SS). You can enter /
for subdirectories. For example, %date/name_%tiem
will output the image to the YY-mm-dd
folder, with name_HH-MM-SS
as the file name prefix.
Add an invisible watermark to a picture. Add the watermark image in a way that is invisible to the naked eye, and use the ShowBlindWaterMark
node to decode the watermark.
Node Options:
Decoding the invisible watermark added to the AddBlindWaterMark
and SaveImagePlus
nodes.
Generate a square QR code picture.
Node Options:
Decoding the QR code.
Node Options:
Load the PSD format file and export the layers.
Note that this node requires the installation of the psd_tools
dependency package, If error occurs during the installation of psd_tool, such as ModuleNotFoundError: No module named 'docopt'
, please download docopt's whl and manual install it.
Node Options:
ComfyUI/input
, where previously loaded psd images can be selected.Outputs: flat_image: PSD preview image. layer_iamge: Find the layer output. all_layers: Batch images containing all layers.
Encapsulate the four nodes of Negative Condition in SD3 into a separate node.
Node Options:
Reproduction of Photoshop's layer Style - Blend If function. This node outputs a mask for layer composition on the ImageBlend or ImageBlendAdvance nodes.
mask
is an optional input, and if you enter a mask here, it will act on the output.
Node Options:
gray
, red
, green
, and blue
.Detect the area where the mask is located and output its position and size.
Node options:
min_bounding_rect
is the minimum bounding rectangle of block shape, max_inscribed_rect
is the maximum inscribed rectangle of block shape, and mask-area
is the effective area for masking pixels.Output:
Nodes that use ultra fine edge masking processing methods, the latest version of nodes includes: SegmentAnythingUltraV2, RmBgUltraV2, BiRefNetUltra, PersonMaskUltraV2, SegformerB2ClothesUltra and MaskEdgeUltraDetailV2.
There are three edge processing methods for these nodes:
PyMatting
optimizes the edges of the mask by using a closed form matching to mask trimap.GuideFilter
uses opencv guidedfilter to feather edges based on color similarity, and performs best when edges have strong color separation.VitMatte
uses the transformer vit model for high-quality edge processing, preserving edge details and even generating semi transparent masks.
Note: When running for the first time, you need to download the vitmate model file and wait for the automatic download to complete. If the download cannot be completed, you can run the command huggingface-cli download hustvl/vitmatte-small-composition-1k
to manually download.
After successfully downloading the model, you can use VITMatte(local)
without accessing the network.device
set whether to use CUDA for vitimate operations, which is about 5 times faster than CPU. max_megapixels
set the maximum image size for vitmate operation, and oversized images will be reduced in size. For 16G VRAM, it is recommended to set it to 3.*Download all model files from BaiduNetdisk or Huggingface to ComfyUI/models/vitmatte
folder.
The following figure is an example of the difference in output between three methods.
Improvements to ComfyUI Segment Anything, thanks to the original author.
*Please refer to the installation of ComfyUI Segment Anything to install the model. If ComfyUI Segment Anything has been correctly installed, you can skip this step.
ComfyUI/models/bert-base-uncased
folder.ComfyUI/models/grounding-dino
folder.ComfyUI/models/sams
folder.
*Or download them from GroundingDino models on BaiduNetdisk and SAM models on BaiduNetdisk .
Node options:
The V2 upgraded version of SegmentAnythingUltra has added the VITMatte edge processing method.(Note: Images larger than 2K in size using this method will consume huge memory)
On the basis of SegmentAnythingUltra, the following changes have been made:
This node is modified from kijai/ComfyUI-segment-anything-2. Thank to kijai for making significant contributions to the Comfyui community.
SAM2 Ultra node only support single image. If you need to process multiple images, please first convert the image batch to image list.
*Download models from BaiduNetdisk or huggingface.co/Kijai/sam2-safetensors and copy to ComfyUI/models/sam2
folder.
Node Options:
SAM2 Video Ultra node support processing multiple frames of images or video sequences. Please define the recognition box data in the first frame of the sequence to ensure correct recognition.
https://github.com/user-attachments/assets/4726b8bf-9b98-4630-8f54-cb7ed7a3d2c5
https://github.com/user-attachments/assets/b2a45c96-4be1-4470-8ceb-addaf301b0cb
Node Options:
bboxes
and first_frame_mask
must have least one input. If first_frame_mask inputed, bbboxes will be ignored.bboxes
and first_frame_mask
must have least one input. If first_frame_mask inputed, bbboxes will be ignored.Use the Florence2 model to identify objects in images and output recognition box data.
*Download models from BaiduNetdisk and copy to ComfyUI/models/florence2
folder.
Node Options:
Use the YOLO-World model to identify objects in images and output recognition box data.
*Download models from BaiduNetdisk or GoogleDrive and copy to ComfyUI/models/yolo-world
folder.
Node Options:
Use the YOLO-8 model to identify objects in images and output recognition box data.
*Download models from GoogleDrive or BaiduNetdisk and copy to ComfyUI/models/yolo
folder.
Node Options:
Use mask as recognition box data. All areas surrounded by white areas on the mask will be recognized as an object. Multiple enclosed areas will be identified separately.
Node Options:
Merge recognition box data.
Node Options:
Draw the recognition BBoxes data output by the Object Detector node as a mask.
Node Options:
This node is implementation of EVF-SAM in ComfyUI.
*Please download model files from BaiduNetdisk or huggingface/EVF-SAM2, huggingface/EVF-SAM to ComfyUI/models/EVF-SAM
folder(save the models in their respective subdirectories).
Node Options:
Using the segmentation function of the Florence2 model, while also having ultra-high edge details.
The code for this node section is from spacepxl/ComfyUI-Florence-2, thanks to the original author.
*Download the model files from BaiduNetdisk to ComfyUI/models/florence2
folder.
Node Options:
Florence2 model loader. *When using it for the first time, the model will be automatically downloaded.
At present, there are base, base-ft, large, large-ft, DocVQA, SD3-Captioner and base-PromptGen models to choose from.
Remove background. compared to the similar background removal nodes, this node has ultra-high edge details.
This node combines the Alpha Matte node of Spacepxl's ComfyUI-Image-Filters and the functionality of ZHO-ZHO-ZHO's ComfyUI-BRIA_AI-RMBG, thanks to the original author.
*Download model files from BRIA Background Removal v1.4 or BaiduNetdisk to ComfyUI/models/rmbg/RMBG-1.4
folder. This model can be used for non-commercial purposes.
Node options:
The V2 upgraded version of RemBgUltra has added the VITMatte edge processing method.(Note: Images larger than 2K in size using this method will consume huge memory)
On the basis of RemBgUltra, the following changes have been made:
It is the implementation of PramaLLC/BEN project in ComfyUI. Thank you to the original author.
Download the BEN_Base.pth
and config.json
from huggingface or BaiduNetdisk and copy to ComfyUI/models/BEN
folder.
Node Options:
Load the BEN model.
Node Options:
Using the BiRefNet model to remove background has better recognition ability and ultra-high edge details. The code for the model part of this node comes from Viper's ComfyUI-BiRefNet,thanks to the original author.
*From https://huggingface.co/ViperYX/BiRefNet or BaiduNetdisk download the BiRefNet-ep480.pth
,pvt_v2_b2.pth
,pvt_v2_b5.pth
,swin_base_patch4_window12_384_22kto1k.pth
, swin_large_patch4_window12_384_22kto1k.pth
5 files to ComfyUI/models/BiRefNet
folder.
Node options:
This node supports the use of the latest BiRefNet model.
*Download model file from BaiduNetdisk or GoogleDrive named BiRefNet-general-epoch_244.pth
to ComfyUI/Models/BiRefNet/pth
folder. You can also download more BiRefNet models and put them here.
Node Options:
Load the BiRefNet model.
Node Options:
CoomfyUI/models/BiRefNet/pth
folder for selection.This node is a PR submitted by jimlee2048 and supports loading RMBG-2.0 models.
Download model files from huggingface or 百度网盘 and copy to ComfyUI/models/BiRefNet/RMBG-2.0
folder.
Node Options:
BiRefNet-General
and RMBG-2.0
. Using the transparent-background model to remove background has better recognition ability and speed, while also having ultra-high edge details.
*From googledrive or BaiduNetdisk download all files to ComfyUI/models/transparent-background
folder.
Node Options:
Generate masks for portrait's face, hair, body skin, clothing, or accessories. Compared to the previous A Person Mask Generator node, this node has ultra-high edge details.
The model code for this node comes from a-person-mask-generator, edge processing code from ComfyUI-Image-Filters,thanks to the original author.
*Download model files from BaiduNetdisk to ComfyUI/models/mediapipe
folder.
Node options:
The V2 upgraded version of PersonMaskUltra has added the VITMatte edge processing method.(Note: Images larger than 2K in size using this method will consume huge memory)
On the basis of PersonMaskUltra, the following changes have been made:
Generate masks for characters' faces, hair, arms, legs, and clothing, mainly used for segmenting clothing.
The model segmentation code is fromStartHua,thanks to the original author.
Compared to the comfyui_segformer_b2_clothes, this node has ultra-high edge details. (Note: Generating images with edges exceeding 2K in size using the VITMatte method will consume a lot of memory)
*Download all model files from huggingface or BaiduNetdisk to ComfyUI/models/segformer_b2_clothes
folder.
Node Options:
Using the segformer model to segment clothing with ultra-high edge details. Currently supports segformer b2 clothes, segformer b3 clothes and segformer b3 fashion。
Download modelfiles from huggingface or BaiduNetdisk to ComfyUI/models/segformer_b2_clothes
folder.
Download modelfiles from huggingface or BaiduNetdisk to ComfyUI/models/segformer_b3_clothes
folder.
*Download modelfiles from huggingface or BaiduNetdisk to ComfyUI/models/segformer_b3_fashion
folder.
Node Options:
Select the segformer clothes model and choose the segmentation content.
Node Options:
Select the segformer fashion model and choose the segmentation content.
Node Options:
Used for generate human body parts masks, it is based on the warrper of metal3d/ComfyUI_Human_Parts, thank the original author.
This node has added ultra-fine edge processing based on the original work. Download model file from BaiduNetdisk or huggingface and copy to ComfyUI\models\onnx\human-parts
folder.
Node Options:
Process rough masks to ultra fine edges. This node combines the Alpha Matte and the Guided Filter Alpha nodes functions of Spacepxl's ComfyUI-Image-Filters, thanks to the original author.
Node options:
The V2 upgraded version of MaskEdgeUltraDetail has added the VITMatte edge processing method.(Note: Images larger than 2K in size using this method will consume huge memory)
This method is suitable for handling semi transparent areas.
On the basis of MaskEdgeUltraDetail, the following changes have been made:
Use the YoloV8 model to detect faces, hand box areas, or character segmentation. Supports the output of the selected number of channels.
Download the model files from GoogleDrive or BaiduNetdisk to ComfyUI/models/yolo
folder.
Node Options:
seg
name can output segmented masks, otherwise they can only output box masks.all
is to merge all mask outputs. The selected number is how many masks to output, sorted by recognition confidence to merge the output.Outputs:
Use the Mediapipe model to detect facial features, segment left and right eyebrows, eyes, lips, and tooth.
*Download the model files from BaiduNetdisk to ComfyUI/models/mediapipe
folder.
Node Options:
Generate a mask based on the selected color.
Node Options:
color
.Convert the image to a mask. Supports converting any channel in LAB, RGBA, YUV, and HSV modes into masks, while providing color scale adjustment. Support mask optional input to obtain masks that only include valid parts.
Node Options:
*If the black_point or output_black_point value is greater than white_point or output_white_point, the two values are swapped, with the larger value used as white_point and the smaller value used as black_point.
Generate masks for the dark and bright parts of the image.
Node options:
A replica of the Shadow & Highlight Mask
node, with the "&" character removed from the node name to avoid ComfyUI workflow parsing errors.
Pixel expansion preprocessing on the masked edge of an image can effectively improve the edges of image composit.
Node options:
Calculate the differences between two images and output them as mask.
Node options:
Grow and shrink edges and blur the mask
Node options:
Smooth transition and shrink the mask edges while preserving edge details.
Node options:
Comparison of MaskGrow and MaskEdgeShrink
Create motion blur on the mask.
Node options:
Create a gradient for the mask from one side. please note the difference between this node and the CreateGradientMask node.
Node options:
Create a gradient mask. please note the difference between this node and the MaskGradient node.
Node options:
gradient_side
is center, the size of the gradient area is adjusted here, positive values are smaller, and negative values are enlarged.*Only limited to input image and mask. forcing the integration of other types of inputs will result in node errors.
Generate mask contour strokes.
Node options:
Generates noise for the mask.
Node Options:
Preview the input mask
Invert the mask
Enhance or smooth out details for image.
Node options:
Make the skin look smoother.
Node options:
Watercolor painting effect
Node option:
Soft light effect, the bright highlights on the screen appear blurry.
Node options:
Channel misalignment. similar to the effect of Tiktok logo.
Node options:
enhances the dynamic range and visual appeal of input images. This node is reorganize and encapsulate of HDR Effects (SuperBeasts.AI), thanks to the original author.
Node options:
Simulate the grain, dark edge, and blurred edge of the film, support input depth map to simulate defocus.
This node is reorganize and encapsulate of digitaljohn/comfyui-propost, thanks to the original author.
Node options:
The upgraded version of the Film node adds the fastgrain method on the basis of the previous one, and the speed of generating noise is accelerated by 10 times. The code for fastgrain is from github.com/spacepxl/ComfyUI-Image-Filters BetterFilmGrain node, thanks to the original authors.
Simulate the light leakage effect of the film. please download model file from Baidu Netdisk or [Google Drive]([light_leak.pkl(Google Drive)(https://drive.google.com/file/d/1DcH2Zkyj7W3OiAeeGpJk1eaZpdJwdCL-/view?usp=sharing)) and copy to ComfyUI/models/layerstyle
folder.
Node options:
Pseudo color heat map effect.
Node options:
Make the image motion blur
Node options:
Make the image gaussian blur
Node options:
Gaussian blur. Change the parameter precision to floating-point number, with a precision of 0.01
Node options:
Add noise to the picture.
Node Options:
1 The layer_image, layer_mask and the background_image(if have input), These three items must be of the same size.
2 The mask not a mandatory input item. the alpha channel of the image is used by default. If the image input does not include an alpha channel, the entire image's alpha channel will be automatically created. if have masks input simultaneously, the alpha channel will be overwrite by the mask.
3 The Blend Mode include normal, multply, screen, add, subtract, difference, darker, color_burn, color_dodge, linear_burn, linear_dodge, overlay, soft_light, hard_light, vivid_light, pin_light, linear_light, and hard_mix. all of 19 blend modes in total.
*Preview of the blend mode
3 The BlendModeV2 include normal, dissolve, darken, multiply, color burn, linear burn, darker color, lighten, screen, color dodge, linear dodge(add), lighter color, dodge, overlay, soft light, hard light, vivid light, linear light, pin light, hard mix, difference, exclusion, subtract, divide, hue, saturation, color, luminosity, grain extract, grain merge all of 30 blend modes in total.
Part of the code for BlendMode V2 is from Virtuoso Nodes for ComfyUI. Thanks to the original authors.
*Preview of the Blend Mode V2
4 The RGB color described by hexadecimal RGB format, like '#FA3D86'.
5 The layer_image and layer_mask must be of the same size.
LayerStyle nodes follows the MIT license, Some of its functional code comes from other open-source projects. Thanks to the original author. If used for commercial purposes, please refer to the original project license to authorization agreement.