How to use nodes


Updated:

There are a few ways to start editing within the comfUI. ComfUI is a drag and drop platform - which means you can drag images from outside of ComfUI or paste in text or images anywhere into the ComfUI canvas

You can also drag in nodes. The general idea of ComfUI is to connect nodes to one another to form workflows. To connect a node, simply drag an output from one node into another node’s input.

Nodes are color coded by their type and can only be connected to other nodes that take their output as an input. A node’s outline will turn blue when you’re able to connect two nodes to one another.

Additionally, some nodes can have more than one input and output. When this is the case, extra inputs and outputs are usually labeled with what they expect.

To navigate the ComfUI canvas you can scroll or use your keyboard. Arrow keys will navigate you around the canvas while holding down command + arrow keys will toggle between different nodes.

You can multi-select nodes and make batch edits such as dragging them around the canvas, deleting, or copying and pasting. You can also group nodes together to condense multiple nodes into a single group node.

Tensor.art are constantly adding new nodes to ComfyUI. Here’s an exhaustive list of all the nodes that are currently available.

Utility nodes

  • Batch (images) provides a container for multiple images that can be processed as a batch. You can drag and drop images into a batch node. If you’re running Stable Diffusion, for example, and are outputting four images, you can send those images to the batch (images) node to see all four results. Batch nodes are also used as entry points and exit points for workflow templates - which we’ll cover in the workflow section

  • Batch (text) provides a container for multiple pieces of text or documents that can be processed as a batch. You can drag and drop text snippets or text documents into a Batch node. Batch nodes are also used as entry points and exit points for workflow templates - which we’ll cover in the workflow section

  • Notes allow you to annotate your canvas and do things like describe the functions of complex workflows. You can connect a single notes node to multiple other nodes

  • Repeater will repeat the content (be it an image or text) of a previous node. Repeater nodes are useful for when you need to use the same input and send it to multiple other nodes

  • Save to folder will save any data provided to it to the folder you specify on your computer

  • Sequencer iterates through a list of items (like images) at a fixed interval. However, instead of looping through the list one item at a time, the Sequencer node can send multiple items at each interval. The number of items is defined by the node's window, while the distance from the current window is defined by the node's stride

  • Shortcut allows you to incorporate a MacOS shortcut into your workflow.

  • Size configures the width and height of an image. The size node will default to 512 x 512

  • Timer fires an event at a configurable time interval

Image nodes

  • Animated Image uses a series of images to create videos or APNG and GIF images

  • Aspect ratio crops an image to the selected aspect ratio.

  • Blend with mask uses the black regions of a mask to remove parts of an image. When provided with a background image, this node will use the black areas of an image mask to erase parts of the foreground image, which will let the background image shine through. You can combine a transparent foreground image (produced with the color node) with a background image to create a transparent cutout in the background image.

  • Canny uses a canny edge-detection algorithm to show the edges of an image. Use the canny node in conjunction with the Stable Diffusion node to control which parts of an image Stable Diffusion draws into. The canny node works well for objects and structured poses, but it can also outline facial features such as wrinkles.

  • Color creates an image from a color of your choice.

  • Composite places two images on top of one another. Use the composite node to place a foreground image on top of a background image. This node is especially useful when foreground options have transparent regions.

  • Crop transparent pixels will crop an image to the bounds of its opaque pixels. 

  • Depth map creates a grayscale image that represents the distance of objects in the original image to the camera. This node is useful as an input to the Stable Diffusion node.

  • Desaturate adjusts an image’s saturation level based on a slider

  • Detect poses will estimate human poses that are present in an image. You can click and drag joints to change a pose

  • Dominant colors finds up to 12 dominant colors in an image and extracts them

  • Erase object lets you paint over an object to remove it from an image

  • Find faces will identify a face in an image and produce a black and white mask from the face

  • Gradient creates a gradient from a series of colors. Linear and radial gradients are both options

  • Gaussian Blur adds a gaussian blur to an image with an adjustable blur radius.

  • Holistic Edges uses holistically nested edge detection (HED) to draw edges in an image with softer, less crisp outlines. This is particularly useful with the Stable Diffusion node

  • Image provides an empty image container. Drag an image file onto this node to fill it. Alternatively, use the node’s contextual menu (accessible via right or option click) to add a photo or sketch from your iPhone or iPad

  • Invert reverses the colors of an image

  • Mask gives you a free-hand brush or machine learning model to selectively mask out portions of an image

  • Opacity will change the opacity of an input image

  • Paint gives you a free-hand brush to paint over an input image

  • QR code generator generates a QR code from supplied text. Use the inspector to adjust the QR code’s size, color, and error-correction level

  • Remove background extract’s an image’s subject from its background. This node provides both the extracted image and a mask. Use an Invert on the mask and combine the original image with the inverted mask in a blend with mask node to create a transparent cutout in the shape of the image’s subject.

  • Resize changes the width and height of an image. By default, this node uses width and height values of 512 pixels.

  • Rotate rotates an image to a provided angle

  • Square aspect creates an image with a square aspect ratio by placing the supplied image on a transparent background with an equal width and height.

  • Stable Diffusion (API) generates an image by using Stability AI’s DreamBooth API. To use this node, you will need to connect your API key from Stability AI. Image generation will incur a cost but images may generate faster than running the model locally

  • Stable Diffusion generates an image by running Stable Diffusion on your Mac. Running locally will take longer but will not incur a cost for generating an image. This node also provides options for control the regions of an image into which Stable Diffusion is allowed to draw by leveraging ControlNet

  • Super resolution upscales the supplied image to a 2048 x 2048 resolution. General runs the image through ESRGAN, Fine Detail through Best Buddy GAN, Photo through 4x Ultrasharp, and Artwork through Remacri

  • Trace edges draws the edges found in an image but, unlike other edge-detection nodes, retains the image’s color. Combine this node with a desaturation node to create an image for the Stable Diffusion node’s MLSD input

  • Threshold produces a black-and-white image by applying a threshold value that ranges between 0 and 1 to each pixel of the supplied image. The red, green and blue channels of the thresholded image will be 1 (i.e. white) if a pixel’s value is greater than the threshold and 0 (i.e. black) if the pixel’s value is smaller than the threshold

  • Zoom Blur blurs an image using a zoom-blur kernel and adjustable power, detail, and focus-position values

9
0

Comments