ComfyUI_LC_MaskMaker_nodes Introduction
ComfyUI_LC_MaskMaker_nodes is a collection of mask-making, subject-selection, inpainting, outpainting, detail-repair, upscaling, and image-adjustment nodes for ComfyUI. The author designed it to help you make targeted changes to an image: select the area you want to change, guide a model toward the result, and keep the rest of the picture as consistent as possible.
A mask tells a workflow where to work. You might draw over a jacket to change its color, select a person to remove the background, or mark the empty space around a photo so a model can extend the scene. The extension offers both hands-on tools, such as drawing a mask directly on a node, and assisted tools that find subjects from words or clicks.
The pack is a companion to ComfyUI_LC123_nodes. Some example workflows use nodes from both packs. The repository describes version 0.29.16 and 30 Python nodes; release history is recorded in the repository’s git tags.
How ComfyUI_LC_MaskMaker_nodes Works
Think of a mask as a stencil laid over your image. In the outpainting tools, white in the control mask marks new space that needs painting. Other nodes use masks to identify a subject, protect an area from further changes, or limit an adjustment to one part of the image.
A typical workflow has three parts:
- Choose an area. Draw a mask, click an object, describe it with words, or drag a frame beyond the image.
- Process that area. Refine the selection, remove its background, redraw it with an AnyPaint or detailer node, or adjust its appearance.
- Review the result. Several nodes show a preview directly on the node. Where available, click to inspect an edge at 100%, use the mouse wheel to zoom, and double-click to return to the fitted view.
For example, to extend a portrait into a wider composition, use LC Outpaint to add canvas space and create its mask, then send the image and mask to an AnyPaint node suited to your image model. To repair hands, use LC Smart Detailer to find and redraw them, followed by LC VOSR2 Upscale if you need a larger image.
Some interactive nodes have a block setting. This pauses downstream work until you have made a selection on the image shown in the node. It is useful when an upstream image changes: you can inspect the new picture before allowing the rest of the workflow to run.
ComfyUI_LC_MaskMaker_nodes Features
Make and refine selections
- LC Create Mask: Draw directly on the node with points or a freehand pencil. Move points by dragging, remove one with Shift-click, and use Undo or Clear as needed. Smoothing softens an uneven outline; feathering makes its edge gradual; invert swaps selected and unselected areas. Set block to
if_empty_maskwhen the workflow should wait for you to draw something. Run once to display the preview. - LC Touch Mask (BETA): Draw around an object and SAM 3 snaps the selection toward its edges. Tapping can expand a selection, such as from a face to the head or person; double-tapping steps back. You can cut areas out with Ctrl-draw or Shift-tap. person_parts adds person-part steps using the Segformer model. Grow and feather adjust the final selection.
- LC Segment Anything: Type what you want to select, such as
hair, eyes, and combine the matches into a mask. Choose GroundingDINO + SAM, which finds candidate areas and then outlines them, or SAM 3, which handles both tasks. A lower sam3_threshold may find more matches but can also produce false ones; the author suggests starting at 0.5. - LC Person Mask: Select combinations of face, hair, body, clothes, accessories, and background. The segformer engine offers higher-resolution selections; mediapipe includes torso and neck skin in its body selection. For skin-only work, the author suggests Mediapipe with face and body enabled and remove_features on, so eyes, brows, lips, and teeth are excluded.
- LC Face Crop: Reframe an image around detected faces for a chosen aspect ratio. widest retains more of the picture, while upper body, head & shoulders, and face make progressively tighter crops. Select all faces for a group or largest for a main subject. You can provide a mask instead when the subject is something other than a face.
- LC Mask Refine: Improve an existing mask’s edge. It separates definite foreground from an uncertain band around the outline, then works on that band. Choose vitmatte for fine details such as hair, guided_filter for speed, or none to skip that refinement. edge_erode and edge_dilate set the band’s inner and outer reach; grow, feather, and the black and white points offer further control. An optional detail_region gives a difficult area, such as hair, its own wider band. Outputs include a transparent cutout, a mask, and a trimap showing the edge-decision area. The author suggests starting at 10 / 10 for edge erosion and dilation, then reducing both toward 3 for a tighter edge. These values are image pixels, not percentages.
- LC Remove Background: Use a BiRefNet model to separate a subject from its background. It produces a transparent cutout, a mask, and a version placed on a solid color. Optional guided-filter or VITMatte refinement can improve edges. Raise black_point to remove faint background haze; consider vitmatte for hair.
Extend, rotate, and inspect images
- LC Outpaint: Drag the canvas edges outward to make room for new content, or drag inside the image to reposition it. Choose a free or preset aspect ratio. The node outputs the padded image, its control mask, and dimensions for the next node. hold_mask keeps a frame you want to reuse; snap_to_image returns to the incoming image after a completed run. max_megapixels limits how far you can drag, while snap_to rounds the finished dimensions to a chosen multiple. A value of 1 turns that rounding off.
- LC Outpaint, Rotate, & Pad: Rotate with the round handle, drag square handles outward to pad or inward to crop, and drag inside the frame to reposition the picture. Hold Shift while rotating for 15° steps. fit can begin with the entire rotated image or a crop without empty corners. fill offers gray, stretched edge pixels, white, or black. Its control mask includes padding and any empty corners created by rotation. keep_frame determines whether the arrangement stays for another run or resets afterward.
- LC 360 View: Turn a 2:1 equirectangular panorama into ordinary camera views. Drag to look around, scroll to zoom, or enter yaw (left/right direction), pitch (up/down direction), and fov (field of view). A narrower field of view gives a closer view; a wider one shows more of the room. Add named views one per line to produce a batch of matching shots. close_seam can soften a mismatch where the panorama’s ends meet.
Edit selected areas
The AnyPaint nodes take an image and a selected area, then use a compatible image model to paint that area. Use the version that matches your model:
- LC Krea2 AnyPaint: Inpaint or outpaint with Krea 2 and the AnyPaint LoRA. Describe the whole finished image in the prompt. Turn crop_to_mask on to work closely on an existing area, or off when extending the canvas. keep original composites only the painted area back into the source; raw returns the full redraw. The author’s suggested starting settings are Krea 2 Turbo, 8 steps, Euler/simple, and CFG 1.
- LC Z-Image AnyPaint: Offers the same crop and compositing approach for Z-Image Turbo or Base using the Z-Image Fun ControlNet Union 2.1. Its control_strength sets how strongly the control guides the edit. Describe the whole intended picture.
- LC SDXL AnyPaint: Works with SDXL-family checkpoints using ControlNet Union SDXL ProMax. For inpainting, give a short description of what should appear inside the mask; for outpainting, describe the scene. The author suggests roughly 0.2 control_strength for outpainting to avoid turning the old image boundary into a visible line, while 1 remains suitable for inpainting. Optional Fooocus inpaint can help blend some fills and outpaints, but it may reconstruct existing content more heavily.
- LC Flux 3 Klein AnyPaint: Uses Flux 3 Klein Distilled with AusBoss’s Outpaint LoRA. It fills the selected space with gray for the model to replace. The LoRA helps keep the existing picture in place. Describe the finished image; the author suggests LoRA strength 1.5, 16 steps, Euler/simple, and CFG 1. For a very large extension, extend the image in stages.
- LC MOSS AnyPaint: Uses MOSS Image Base or SFT with the MOSS AnyPaint LoRA and, for Base, an 8-step DMD2 LoRA. Describe the finished picture. The author recommends leaving boundary_px at 32 for outpainting to help conceal the join.
- LC MOSS Box Edit (BETA): Draw and describe edit boxes with LC Bounding Boxes, write a description of the final picture in LC MOSS Layout Prompt, and pass both to Box Edit. Areas outside the boxes stay unchanged. keep at 0 allows a stronger replacement; approximately 0.3–0.5 retains more of the original shape. Avoid covering a face you intend to preserve.
LC MOSS Control serves a different purpose: it guides a new MOSS Image render using a depth map, a flat-color region map, or both. A depth map communicates what is nearer or farther away; a color region map assigns broad shapes to objects. depth_end and color_end control how long each guide influences the generation. The author suggests stronger guidance for maps derived from photos and gentler guidance for painted maps or 3D mannequins.
Repair details and enlarge images
- LC Smart Detailer: Describe the features to repair, such as
hands, face. SAM 3 finds matches; the node redraws each in its own crop and blends the result back. inpaint_resolution affects how much working detail each crop receives, padding includes surrounding context, grow and feather shape the edited area, and blend controls how much of the redraw remains. tone_match helps a repaired area retain the source image’s brightness and color; turn it off when a color change is intentional. For faces, the author suggests trying denoise 0.3 and blend 0.8. If your main prompt describes an entire scene, connect a short, feature-specific inpaint_positive prompt so the scene is not recreated inside each crop. - LC Smart Detailer (pipe): Takes its image and generation settings from an LC pipe, while allowing individual inputs to override them. It returns the edited image to the pipe and carries forward information about repaired and detected areas.
- LC Character Detailer (BETA) and LC Character Detailer (pipe) (BETA): Apply the detailer to one chosen character when several people are present. Choose a match by position, size, or a supplied bounding box. Numbered previews help you identify the right person.
- LC Detail Finder (BETA) → LC Detail Sorter (BETA) → LC Detailer For Each (BETA): A three-step option for giving different characters their own edits. Finder detects matches; Sorter orders and numbers up to eight outputs; For Each redraws a selected result with its own model branch, prompt, and seed. Connect Finder directly to For Each when you want to process every match together.
- LC VOSR2 Upscale and LC VOSR2 Upscale (pipe): Enlarge an image with VOSR 2.0 after detail repair. Available scales include 1.25×, 1.5×, 1.75×, 2×, 3×, 4×, 6×, and 8×; the two largest use two passes to avoid patchy skin. 2× is the author’s suggested starting point. Keep tile_size at its trained value of 512 unless you have a reason to change it; lowering vae_tile_size uses less GPU memory but can take longer. The protected output carries repaired areas at the new size so later skin-processing nodes can avoid adding detail over them again.
Render, detail repair, and LC VOSR2 Upscale pipeline
Plain enlargement compared with LC VOSR2 Upscale
Protected mask and its effect on later skin processing
For a 1064 × 1352 image, the author reports these warm-run results on an RTX 5090. They illustrate the trade-off between size, time, and GPU memory; your times and memory use may differ.
| Scale | Output size | Time | GPU memory |
|---|---|---|---|
| 1.5× | 1596 × 2028 | 2.8 s | 4.7 GB |
| 2× | 2128 × 2704 | 4.4 s | 4.8 GB |
| 3× | 3192 × 4056 | 8.6 s | 5.1 GB |
| 4× | 4256 × 5408 | 16 s | 5.7 GB |
| 6× | 6384 × 8112 | 46 s | 8.4 GB |
| 8× | 8512 × 10816 | 75 s | 12.0 GB |
- LC Relay VSR Upscale: Enlarges pictures or video with RelayVSR. Choose image to process each picture independently or video to keep consecutive frames steadier. Use 2× for video or 4× for pictures as starting choices. Lowering detail moves the result closer to a plain enlargement. An optional protect_mask reduces added detail in important areas; without a supplied mask, detect_faces can find faces to protect automatically. The relay output is intended for LC Save Video in LC AV, which saves a clip in smaller groups of frames. According to the original documentation, this node requires a ComfyUI nightly build dated November 5, 2026, or a subsequent stable release that includes the necessary support.
Adjust and guide images
- LC Image Blend Advance: Position, scale, rotate, mirror, and blend a layer over a background. Adjust x_percent and y_percent for placement, choose among 29 blend modes, and use opacity for strength. A layer_mask further limits the visible area. Without a background input, the result is placed on a transparent canvas.
- LC Auto Adjust: Automatically adjust levels, then fine-tune color balance, brightness, contrast, saturation, and overall strength. RGB adjusts color channels separately and can reduce a color cast; luminance changes brightness without choosing separate color-channel adjustments. An optional mask confines both the measurement and the result to a selected region.
- LC Depth Anything V2: Estimate depth from a single image. The output is brighter for nearer areas unless invert is enabled. Use its depth image as a guide for controls such as LC MOSS Control or LC Lighting Control in LC123.
- LC Normal Map (BAE): Estimate which direction image surfaces face, producing a normal map useful for lighting control. flip_y changes between common normal-map conventions; optional blur smooths the map. It can feed LC Lighting Control in LC123 alongside a depth map.
For clips supplied as a batch, the original documentation says LC VOSR2 Upscale aims to keep fine grain consistent between frames. It also says LC Auto Adjust, LC Depth Anything V2, and LC Person Mask account for adjacent frames while leaving separate images and hard cuts alone.
ComfyUI_LC_MaskMaker_nodes Models
Nodes are not the same as models. A node is a step in your ComfyUI workflow; a model supplies learned image-recognition, editing, or enlargement behavior to that step. This pack does not bundle model weights. Model-backed nodes can obtain supported weights from their original sources when first used or reuse compatible files you already have. Some options, noted below, require you to provide a model yourself.
| Model or model family | Used for | Practical choice or limitation |
|---|---|---|
| VITMatte Small / Base | Fine mask edges in LC Mask Refine and supported refinement options | Try it for hair or other delicate edges; guided filtering is the faster alternative. |
| BiRefNet general, matting, portrait, HR 2048 | LC Remove Background | Choose a variant suited to your subject and desired edge treatment. Older .pth files in a layout ComfyUI cannot load are not listed. |
| RMBG-2.0 | Background removal when you already have a compatible copy | It is not downloaded automatically and has a non-commercial license. |
| GroundingDINO Tiny / Base + SAM ViT Base / Large / Huge | Word-guided selection in LC Segment Anything | GroundingDINO locates likely objects; SAM outlines them. Original-format .pth files are not used for these Hugging Face-format options. |
| SAM 3 / SAM 3.1 | Prompt-based selection, touch selection, face finding, and detailer workflows | The original gated Meta SAM 3 is not downloaded automatically. A compatible model you provide can be reused; the dropdown also offers an ungated SAM 3.1 option from Comfy-Org. Check the applicable SAM license terms. |
| Segformer clothes / MediaPipe selfie multiclass | LC Person Mask | Segformer offers higher-resolution person-part selections; MediaPipe includes torso and neck skin in its body selection. Check model terms before commercial use, especially for Segformer. |
| Depth Anything V2 Small / Base / Large | LC Depth Anything V2 | Small is the default and is Apache-2.0. Base and Large are CC-BY-NC-4.0 and therefore non-commercial. |
| BAE normals | LC Normal Map (BAE) | Generates surface-direction maps. The source’s licensing information does not establish commercial clearance. |
| VOSR 2.0 | LC VOSR2 Upscale | Adds fine detail while enlarging an image. The first use downloads approximately 6.5 GB of weights from CSWRY/VOSR. |
| RelayVSR | LC Relay VSR Upscale | Upscales images or video. The default model files described by the author are approximately 5.2 GB each, plus a VAE; optional original bf16 variants are approximately 10 GB each. See the Comfy-Org model page. |
| Model-specific AnyPaint and MOSS controls | Krea 2, Z-Image, SDXL, Flux 3 Klein, and MOSS editing nodes | Match the editing node to its required image model and linked LoRA or control adapter in the Features section. They are not interchangeable. |
The MOSS color-depth control adapter is a separate community-made model. The author notes that its training depth maps came from Depth Anything V2 Large, which has a non-commercial license. Check the terms of every model and adapter you use before commercial work; the pack’s MIT code license does not replace third-party model licenses.
Troubleshooting ComfyUI_LC_MaskMaker_nodes
The workflow stops after an interactive node. What should I do?
- Check whether block is set to wait for a nonempty mask, a changed frame, or another interaction.
- Run once so the node displays its image, if it does not already.
- Draw the mask, select the object, turn the picture, or extend the frame as appropriate.
- Run again. If you want the untouched image to pass through, use that node’s non-blocking option where available.
A selection is missing, includes the wrong object, or has rough edges.
- Confirm that the requested object is visible in the input image. For word-based selection, try a simpler, specific term.
- For SAM 3, start with sam3_threshold 0.5; lowering it can increase false matches.
- For face crops with background people, choose largest instead of all.
- Send the mask through LC Mask Refine. Try a wider edge band for hair, then narrow it when too much background is included.
- If nothing is detected in LC Face Crop, the node falls back to a center crop and reports that in the console.
An outpaint has a visible border or paints a line along the old image edge.
- Check that the control mask marks the new canvas area and that your prompt describes what should appear there.
- For LC SDXL AnyPaint, try the author’s suggested control_strength around 0.2 for outpainting; a higher value can make the old image edge look like a real object.
- For LC MOSS AnyPaint, keep boundary_px at 32 as a starting point.
- For a very large Flux 3 Klein extension, make a smaller extension first, then extend the result again.
A detailer changes colors or draws the surrounding scene into a face or hand.
- Turn on tone_match when the repair should retain the original lighting and color.
- Provide a short inpaint_positive prompt describing only the feature being repaired.
- Reduce denoise or lower blend to retain more of the original. The author suggests starting face repairs around denoise 0.3 and blend 0.8.
An upscale uses too much GPU memory or takes longer than expected.
- Try a smaller upscale_by value, such as 1.5× or 2×.
- For LC VOSR2 Upscale, lower vae_tile_size to reduce GPU-memory demand, accepting a possible speed cost.
- Remember that 6× and 8× use two passes and produce much larger images. The published timing table is for an RTX 5090, not a guaranteed result on every card.
A model download fails or a model is not available.
- Check the node’s error message for the expected files and locations.
- For VOSR 2.0, the original source is CSWRY/VOSR; the documented destination is
models/vosr2/VOSR2. - Check whether your network blocks the model host or whether ComfyUI is running offline. The author notes that, where Hugging Face is blocked, setting
HF_ENDPOINT=https://hf-mirror.combefore starting ComfyUI may help. - For Meta’s original SAM 3 or RMBG-2.0, do not expect an automatic download: those options require a compatible model you already have. Check access requirements and license terms.
Frequently Asked Questions
Do I need LC123 for every node?
No. The packs are companions, and particular example workflows and pipe-based workflows use LC123. Check the requirements stated for the workflow you choose.
Can I preview every result on its node?
No. Several interactive and refinement nodes have built-in previews, but LC Remove Background and LC Person Mask do not. The author suggests placing LC Mask Refine afterward when you want its preview.
What is the difference between a mask and a transparent cutout?
A mask identifies an area. A cutout is the subject image with transparency outside the selected area. Nodes such as LC Mask Refine and LC Remove Background can output both.
Which AnyPaint node should I use?
Choose the node that matches your image model: Krea 2, Z-Image, SDXL, Flux 3 Klein, or MOSS Image. Each uses its own editing guidance, so changing image-model families also means changing the corresponding AnyPaint setup.
Will a protected mask stop later nodes from changing repaired faces or hands?
It tells compatible later nodes which areas to protect. For example, LC VOSR2 Upscale’s protected output can feed the protect_mask input of LC Skin Upscale or LC Skin Texture to avoid adding skin detail over an already repaired area.
Learn More about ComfyUI_LC_MaskMaker_nodes
The extension repository contains the source documentation and example workflows. A useful starting point is the all-nodes example, which places the pack’s nodes around one image so you can compare their results.
For a specific project, try one of these examples:
- Krea 2 AnyPaint workflow: Practice drawing an inpaint mask, extending a canvas, and rotating or padding an image.
- Krea 2 AnyPaint module: Explore a smaller editing setup with before-and-after comparison.
- Flux 3 Klein AnyPaint module and MOSS AnyPaint module: See the corresponding model-specific versions.
- MOSS box-edit module: Learn how boxes and a description of the finished image work together.
- Relay upscale workflow: Compare picture and video enlargement, including protected areas.
Some workflows require other packs or model-specific weights; their linked descriptions in the repository identify those requirements. For broader workflow basics, see ComfyUI. For third-party code credits, see THIRD_PARTY.md.
