A set of custom nodes to perform image 2 image functions in ComfyUI.
If you find these nodes useful please consider contributing to it's further development. All donations are much appreciated. Buy me a coffee
ComfyShop has been introduced to the ComfyI2I family. Enjoy a comfortable and intuitive painting app. ComfyShop phase 1 is to establish the basic painting features for ComfyUI. To open ComfyShop, simply right click on any image node that outputs an image and mask and you will see the ComfyShop option much in the same way you would see MaskEditor. Current features of ComfyShop include: #
If you're running on Linux, or non-admin account on windows you'll want to ensure /ComfyUI/custom_nodes, ComfyUI_I2I, and ComfyI2I.py has write permissions.
There is an install.bat you can run to install to portable if detected. Otherwise it will default to system and assume you followed ComfyUI's manual installation steps.
Navigate to your /ComfyUI/custom_nodes/ folder Run git clone https://github.com/ManglerFTW/ComfyI2I/ Navigate to your ComfyUI_I2I folder Run pip install -r requirements.txt Start ComfyUI Tools will be located in the I2I menu.
Right click on any image node that has 'IMAGE' and 'MASK' as outputs and select ComfyShop in the pop up menu.
To access the brush menu press shift and the right mouse button anywhere on the canvas. Brush settings can also be changed by keyboard shortcuts which is recommended.
Gain more control over your image editing with the ability to zoom in and out, pan, and autofocus your canvas.
Save to node will save anything painted in greyscale to the 'MASK' output and anything painted in RGB mode to the 'IMAGE' output.
This is a standalone node that can take the colors of one image and transfer them to another.
Choose the amount of colors you would like to extract from each image. Usually between 5-20 is fine. For smaller masked regions you can bring it to 1-5 and it will only extract those that are most dominant.
These controls will effect how the edges of the separated color segments in the source image blur at their respective edges.
Adjust Strength to control how weak or strong you would like the color transfer effect to be.
Adjust Gamma to control the Gamma amount of the resulting image.
Adjust Contrast to control the Contrast amount of the resulting image.
Adjust Brightness to control the Brightness amount of the resulting image.
The Color Transfer node now works with masked regions giving you more control with which areas to transfer color to.
The Color Transfer node works well with masks created with the Mask_Ops node. The example below shows color transfer difference across each individial R, G, B channel.
The mask ops node performs various mask operations on a mask created either from an image or a text prompt.
The Separate_Mask option will tell the node whether to separate the mask by each island, or keep all islands in 1 image. Use 0 if you want to connect to the Color Transfer node.
Type a prompt to create a mask from your image (make sure use_text is set to 1)
The sigma factor can smooth out a mask that has been created by text. The model being used is clipseg and it might not always come out perfectly from the start. You can sometimes adjust sigma to smooth errors.
0 to input a mask and 1 to use a text prompt.
You can adjust this parameter to blend your solid mask with a black and white image of what's underneath it.
Adjust these settings to change the levels of your mask.
Affect the red, green, or blue channel of the underlying image.
Shrink or grow your mask using these settings.
Invert your mask.
Blur your mask.
This node essentially will segment and crop your mask and your image based on the mapped bounding boxes of each mask and then upscale them to 1024x1024, or a custom size of your choice. The images then go to a VAE Encode node to be processed.
The combine and paste node will take the new images from the VAE Decode node, resize them to the bounding boxes of your mask and paste them over the original image. Use color_xfer_factor to adjust the effects of the color transfer.
A Basic workflow with all of the nodes combined has been included in the workflows directory under I2I workflow.json. Use this as a reference to see how they are all connected.
A Basic workflow for Color Transfer has been included in the workflows directory under Color Xfer Workflow.json. Use this as a reference to see how it works.
A Basic workflow for Color Transfer has been included in the workflows directory under Multi_XFer_Workflow.json. Use this as a reference to see how it works.