ComfyUI-off-suite Introduction
ComfyUI-off-suite is a collection of ComfyUI nodes for preparing images, working with masks and detected regions, assembling image grids, and supporting inpainting workflows. Most of its nodes appear in the OFF category. The number-formatting node appears in GW.
You can use these nodes to handle practical steps around an artwork workflow: fit an image to a target size, crop around a detected face, turn a mask into a visible image, place images in a comparison grid, or prepare an image and mask for inpainting. The suite also includes a URL image loader and small utilities for seeds and filenames.
The supplied source defines nodes, not a complete workflow. Some nodes need inputs produced elsewhere in ComfyUI, such as detected segments (SEGS), a VAE, or an InsightFace model.
How ComfyUI-off-suite Works
Think of a ComfyUI workflow as a chain of editing stations. Each node receives something, performs one task, and passes its result to the next node. An image contains the visible pixels; a mask marks an area for a later step; and SEGS contains information about detected regions, including where a region lies in the image.
For example, a face workflow might supply detected face segments to Crop Center with SEGS to make a square crop around a face. Another workflow might pass an image, mask, and VAE to VAE Encode For Inpaint V2 to prepare an inpainting latent. These nodes do not detect faces or generate artwork on their own: they work with the inputs you connect to them.
Several nodes provide a fallback when an expected image or segment is missing. Others require a valid input and may stop with an error. The notes below distinguish those behaviors so you can choose suitable nodes for your workflow.
ComfyUI-off-suite Features
Loading and preparing images
- Cached Image Load From URL reads one image address per line. It accepts HTTP or HTTPS addresses, image data URLs, local
file://paths, and ComfyUI/view?paths. It provides images, masks, ahas_imagetrue/false output, and temporary previews. For HTTP images, it keeps a local cache and checks for updates when the server supplies an ETag. Set keep_alpha_channel to retain transparency in the image output; otherwise, transparent images are converted to RGB. Use output_mode: list for images of different sizes. Batch mode requires all loaded images to have the same width and height. An empty input returns a small placeholder image andhas_image: false. - Image Resize Fit resizes an image while keeping its proportions. Its size setting, defaulting to
512, sets the shorter side to approximately that many pixels; the longer side grows in proportion. For example, a wide image remains wide rather than being squeezed into a square. - Image Crop Fit Node takes a centered square from an image and resizes the result so each dimension is a multiple of eight. It has no adjustable crop-position setting, so check the result when your subject is near an edge.
- Apply CLAHE adjusts local contrast, which can help reveal detail in unevenly lit areas. clip_limit controls the contrast adjustment, while grid_size sets the size of the local processing grid. Compare the output with your original image, especially where a stronger adjustment might make texture or noise more noticeable.
- Watermarking scales a watermark to about 15% of the source image’s width and places it near the top-left corner, at
(10, 10)pixels. The node does not expose placement or size controls.
Working with segments and masks
- OFF SEGS to Image returns the cropped image from the first segment. If that segment has no stored crop, it can crop the corresponding area from an optional fallback image. If neither is available, or there are no segments, it returns a small black image.
- Crop Center with SEGS makes a square crop centered on the first segment’s region, shifting the crop to stay within the image when necessary. It returns a small black image if there is no usable segment. An older node key, Crop Center wigh SEGS, is also present in the source but is displayed as DONT USE THIS; choose Crop Center with SEGS instead.
- Safe Mask to Image turns a mask into a three-channel image so you can pass it to an image input or inspect it visually. If its mask input is absent, it produces a black image shaped like the supplied image.
- Dilate Mask for Each Face processes masks alongside corresponding face segments. Its dilation_factor affects how strongly each mask is processed, with the amount also calculated from the segment’s size. Despite the node’s name, the supplied code uses an erosion operation internally, so do not assume a higher value will expand the visible mask. Preview the result before using it for a final edit. If the number of masks and segments differs, the node returns the original mask unchanged.
- SEGS to Face Crop Data selects a segment using face_index, starting at
0, and outputs its stored cropped image and crop coordinates. Use it when you need to work with a particular detected face. The selected index must exist, and the segment must contain a usable crop for an image-dependent next step. - Paste Face Segment to Image places a processed crop into the original image using supplied crop coordinates. Connect it after editing a compatible face crop; the crop’s dimensions and coordinates determine where its pixels are placed.
- Calculate mask bound finds a bounding rectangle around the nonzero area of the first mask. padding expands the initial area, and ratio adjusts the intended width relative to its height. Its six numeric outputs describe the rectangle’s position and size. It requires a mask with at least one nonzero pixel; an entirely empty mask has no bounds to calculate.
Inpainting, grids, and workflow utilities
- VAE Encode For Inpaint V2 prepares an image and mask for an inpainting workflow. It accepts pixels, a VAE, a mask, and mask_blur. The default blur is
6; setting it to0skips the blur step. It returns an encoded latent with a noise mask, an image, and a processed mask. The node can trim image dimensions to multiples of eight before encoding, so check alignment if precise edges matter. - Grid Image from batch (OFF) arranges a batch of images into one grid. Set the number_of_columns, max_cell_size, border width and color, corner radius, and target_size to suit a contact sheet or comparison image. The node preserves each image’s proportions within its cell and shuffles image positions when creating the grid, so repeated runs may show a different order. The target size can add an outer border when the grid is narrower than the target; it does not force every grid to that exact width.
- Random Seed from List chooses one integer from a comma-separated seed_string, such as
12,34,56. It is marked to change between executions, making it useful when you want variety from a defined set of seeds. Enter integers only, separated by commas. - GW Number Formatting Node converts a nonnegative integer to text, adding leading zeroes up to the chosen width. For example, the number
7at width3becomes007. This can help make numbered labels consistent. - Query Gender and Age passes the first image to a connected
INSIGHTFACEmodel and returns the first detected face’s reported sex and age. It does not provide the model or handle a no-face result in the supplied code. Treat these outputs as model estimates, not facts about a person.
Troubleshooting ComfyUI-off-suite
“To output as batch, images must have the same size.”
- Open Cached Image Load From URL.
- Switch output_mode to list when loading images with different dimensions.
- Alternatively, make the source images the same size before combining them as a batch.
A segment node returns a small black image.
- Check that the upstream
SEGSinput contains a detected region. - For OFF SEGS to Image, connect fallback_image_opt if your segments do not contain stored cropped images.
- For Crop Center with SEGS, confirm that the segment has a usable crop.
A face index causes an error.
- Check how many segments the upstream node produced.
- Set face_index to an existing position, remembering that the first face is
0. - Confirm that the chosen segment contains a cropped image before sending it to another image node.
The mask result looks smaller than expected.
Preview Dilate Mask for Each Face at different dilation_factor values. Its implementation uses erosion, despite the word “Dilate” in its name. Also check that your mask count matches the number of segments; when they differ, the original mask is returned.
Calculate mask bound fails on an empty mask.
Connect a mask containing at least one nonzero pixel. The node finds its rectangle from marked pixels and cannot calculate one when none are present.
Query Gender and Age fails or produces no useful result.
Confirm that an INSIGHTFACE model is connected and that the image contains a face the model detects. The node reads only the first detected face and has no no-face fallback in the supplied code.
The URL loader cannot open an image.
Check that each line contains a supported address, that a file:// path points to an existing file, or that the HTTP address is reachable. The loader makes a network request for HTTP images and uses a 20-second request timeout.
Frequently asked questions
Does this suite include an image-generation model?
No model files or generation models are defined in the supplied source. Nodes such as VAE Encode For Inpaint V2 and Query Gender and Age require models supplied through other ComfyUI nodes.
Can I load several images at once?
Yes. Put one address on each line in Cached Image Load From URL. Choose list output if their dimensions differ.
Does the grid keep my images in their original order?
No. Grid Image from batch (OFF) shuffles their positions while building the grid.
Can I move the watermark to another corner using node settings?
No. The supplied Watermarking node has a fixed top-left placement and no position control.
Are gender and age outputs reliable descriptions of a person?
They are estimates returned by the connected face-analysis model. Do not treat them as verified personal information.
