Extensions/ComfyUI-JH-PixelPro
ComfyUI Extension

ComfyUI-JH-PixelPro

GPU-powered pro-grade image suite cho retouch chân dung. v0.1.0 alpha: Frequency Separation (N-01) + Sub-Pixel Mask Refiner (N-02). Kornia core, tensor thuần không rời VRAM.

By jetthuangai·Created 7 months ago·Updated 11 days ago· 6
jetthuangai/ComfyUI-JH-PixelPro
Nodes64
On cloudLocal install
CategoryComfyUI-JH-PixelPro/mask, ComfyUI-JH-PixelPro/geometry
Stars6
Updated11 days ago

Nodes (64)

Mask: Alpha Matte

When a binary mask chops off the hair, this is the node you want

ComfyUI-JH-PixelPro/mask
Geometry: Auto Align

Line Two Photos Up Without Nudging Anything by Hand

ComfyUI-JH-PixelPro/geometry
Face: Auto Blemish

Spot Healing for Portraits That Keeps the Pores

ComfyUI-JH-PixelPro/face
Auto: Tone & White Balance

A Lightroom Auto Button That Leaves Your Sunset Alone

ComfyUI-JH-PixelPro/color
Auto: Upright

Make the Building Stand Up Straight — or Leave the Photo Alone

ComfyUI-JH-PixelPro/geometry
Color: CLAHE Local Contrast

Local Contrast That Doesn't Turn Skin Orange

ComfyUI-JH-PixelPro/color
Color: ColorLab (ACR)

An entire Adobe Camera Raw panel stack in one (very tall) node

ComfyUI-JH-PixelPro/color
Color: Apply ColorLab Preset

Grade One Frame, Apply It to Four Hundred Photos

ComfyUI-JH-PixelPro/color
Color Matcher (LAB)

When your AI pass changes the skin tone, this snaps it back

ComfyUI-JH-PixelPro/color
Color Matcher Region (LAB)

Match the skin tone without touching the background

ComfyUI-JH-PixelPro/color
QA: Cull Score

Let the Node Throw Out the Blurry Ones First

ComfyUI-JH-PixelPro/qa
Mask: Decontaminate Colors

Kill the Green Fringe on Hair Before You Composite

ComfyUI-JH-PixelPro/mask
Color: Defringe

Purple Halos on Backlit Branches? Start Here

ComfyUI-JH-PixelPro/color
Depth: Depth Anything V2

A Depth Map From One Photo, No Stereo Pair Required

ComfyUI-JH-PixelPro/depth
Depth: Lens Blur

Fake f/1.4 in Post, With Bokeh Balls Instead of Smudge

ComfyUI-JH-PixelPro/depth
Filters: Dust & Spot Removal

Sensor Dust, Gone, Without Eating the Eyelashes

ComfyUI-JH-PixelPro/filters
Mask: Edge-Aware Refiner

Stop hand-fixing chipped SAM masks — let the image steer the edge

ComfyUI-JH-PixelPro/mask
Edge-Aware Skin Smoother

A skin smoother that won't turn eyes into smudges

ComfyUI-JH-PixelPro/filters
Face Beauty Blend

Blend your retouched plate back without a seam

ComfyUI-JH-PixelPro/face
Face Detect (MediaPipe)

Five landmarks, zero hand-pasting — feed your aligner automatically

ComfyUI-JH-PixelPro/face
Face: Detect Lite (YuNet GPU)

Find the Face in 31 ms, With No MediaPipe Installed

ComfyUI-JH-PixelPro/face
Face Landmarks (MediaPipe 468)

468 points on a face, and an overlay so you can see it work

ComfyUI-JH-PixelPro/face
Face Warp (Delaunay per-triangle)

Move a face's geometry with 468-point precision, triangle by triangle

ComfyUI-JH-PixelPro/face
Face Warp (TPS smooth)

Reshape a Face Without Triangle Seams

ComfyUI-JH-PixelPro/face
Landmark Facial Aligner

Put every face in the same canonical frame before you run ControlNet

ComfyUI-JH-PixelPro/geometry
Frequency Recombine (low + high)

The Add Node ComfyUI Never Had

ComfyUI-JH-PixelPro/filters
GPU Frequency Separation

The Photoshop retoucher's trick, running on your GPU

ComfyUI-JH-PixelPro/filters
HALD Identity

Bake your ComfyUI color grade into a LUT the whole industry can read

ComfyUI-JH-PixelPro/color
Color: HDR Merge (bracket)

Squeeze the Window and the Room Into One Frame

ComfyUI-JH-PixelPro/color
Filters: Heal / Content-Aware Fill

Content-Aware Fill, Inside ComfyUI, Same Result Every Time

ComfyUI-JH-PixelPro/filters
High-Frequency Detail Masker

Keep the pores and eyebrows when the model repaints the face

ComfyUI-JH-PixelPro/mask
Hue/Saturation per Range

Push one color family without wrecking the rest of the shot

ComfyUI-JH-PixelPro/color
Compositing: Layer Add

Add a layer with a blend mode and opacity, the way you'd expect

ComfyUI-JH-PixelPro/compositing
Compositing: Layer Flatten

The node that turns your layer stack back into a picture

ComfyUI-JH-PixelPro/compositing
Compositing: Layer Group (nest)

Fold a whole layer stack into one parent layer

ComfyUI-JH-PixelPro/compositing
Compositing: Layer Stack Start

Photoshop-style layers in ComfyUI start here

ComfyUI-JH-PixelPro/compositing
Lens Distortion Corrector

Fix the barrel distortion before you even think about face detection

ComfyUI-JH-PixelPro/geometry
Color: Lightroom Preset (XMP)

Your Lightroom Presets, Read by ComfyUI (Approximately)

ComfyUI-JH-PixelPro/color
Color: Lightroom Preset Contact Sheet

Twenty Presets, One Photo, One Grid — Pick With Your Eyes

ComfyUI-JH-PixelPro/color
Look: Select Preset

Six Grading Looks in One Dropdown (No LUT Files Required)

ComfyUI-JH-PixelPro/looks
Luminosity Masking

Select by Brightness, Not by Shape

ComfyUI-JH-PixelPro/color
LUT Export (.cube)

Bake Any ComfyUI Grade Into a .cube File

ComfyUI-JH-PixelPro/color
LUT Import (.cube)

Apply Any .cube LUT — DaVinci Exports Included

ComfyUI-JH-PixelPro/color
Color: LUT Preset

Bundled LUT Presets, No Files to Manage

ComfyUI-JH-PixelPro/color
Mask: Cleanup

Fix the Mask by Pixel Count, Not by Brush Radius

ComfyUI-JH-PixelPro/mask
Mask: Combine

Union, Subtract, Intersect — Mask Math in One Node

ComfyUI-JH-PixelPro/mask
Mask: Edge Smoother

Smooth Mask Edges Without Melting the Shape

ComfyUI-JH-PixelPro/mask
Mask: Morphology

Mask Surgery 101

ComfyUI-JH-PixelPro/mask
Mask: Preview Overlay

You Can't Debug a Mask You Can't See

ComfyUI-JH-PixelPro/mask
Filters: Motion / Zoom Blur

Faking a Panning Shot Inside ComfyUI

ComfyUI-JH-PixelPro/filters
Color: Palette Extract

What Colours Is This Image Actually Made Of?

ComfyUI-JH-PixelPro/color
Compositing: Pyramid Blend

Compositing a Face Back In Without the Rectangle Showing

ComfyUI-JH-PixelPro/compositing
QA: Image Diff (SSIM/PSNR)

Prove Your Retouch Only Touched What You Meant It To

ComfyUI-JH-PixelPro/qa
Mask: SAM One-Click

SAM Without the Node Zoo

ComfyUI-JH-PixelPro/mask
Saturation Mask Builder

Select Vivid Colors Without Tuning a Segmenter

ComfyUI-JH-PixelPro/color
Color: Shadows/Highlights Pro

Camera Raw's Two Best Sliders, Without Opening Lightroom

ComfyUI-JH-PixelPro/color
Face: Skin Tone Tri-Region

Skin-Only Shadows, Midtones, and Highlights

ComfyUI-JH-PixelPro/face
Mask: Sky

Select the Sky Without a Segmenter, a Download or a Prompt

ComfyUI-JH-PixelPro/mask
Filters: Smart Sharpen

Sharpen the Detail, Leave the Noise Alone

ComfyUI-JH-PixelPro/filters
Sub-Pixel Mask Refiner

Turn Jagged SAM Masks Into Clean Alphas

ComfyUI-JH-PixelPro/mask
Tone Curve (RGB)

Tone Curves for ComfyUI, Photoshop-Style

ComfyUI-JH-PixelPro/color
Tone Match LUT (auto-gen .cube)

Steal a Hero Frame's Look as an Auto-Generated LUT

ComfyUI-JH-PixelPro/color
Mask: Trimap Builder

Build a Trimap for Real Alpha Matting

ComfyUI-JH-PixelPro/mask
Unwrap Face (paste back)

Put Your Edited Face Back on the Canvas

ComfyUI-JH-PixelPro/face
Readme
<div align="center">

PixelPro for ComfyUI

Pro-grade retouch, colour and mask tools for ComfyUI — 64 GPU nodes built on PyTorch + Kornia.

CI Docs Release Python License

English · Tiếng Việt · Documentation

One portrait through eight PixelPro nodes

</div>

What it is

PixelPro brings the techniques of a professional retouching desk into ComfyUI as plain nodes: frequency separation, luminosity masks, LAB colour matching, LUTs, a Photoshop-style layer stack, hair-accurate alpha mattes, face alignment and paste-back, plus QA metrics to check your result.

  • Real retouch techniques, not renamed filters: every node does what a retoucher expects from its name.
  • GPU first, CPU safe. Heavy filters run on CUDA with bounded memory, and everything also runs on CPU.
  • Built for AI pipelines. Align a face, run inpaint or ControlNet, paste it back seamlessly. Masks work with any segmenter.
  • Tested and documented. 800+ automated tests, sample workflows, and a bilingual guide for every node.
<table> <tr> <td><img src="docs/assets/nodes/frequency-separation.jpg" alt="Frequency Separation"></td> <td><img src="docs/assets/nodes/alpha-matte.jpg" alt="Alpha Matte"></td> </tr> <tr> <td align="center"><b>Frequency Separation</b> — colour and detail on separate layers</td> <td align="center"><b>Alpha Matte</b> — trimap to a hair-accurate alpha</td> </tr> <tr> <td><img src="docs/assets/nodes/color-matcher-region.jpg" alt="Color Matcher Region"></td> <td><img src="docs/assets/nodes/pyramid-blend.jpg" alt="Pyramid Blend"></td> </tr> <tr> <td align="center"><b>Color Matcher Region</b> — match skin to skin, sky to sky</td> <td align="center"><b>Pyramid Blend</b> — composites without a visible seam</td> </tr> </table>

Install

ComfyUI Manager: search for ComfyUI-JH-PixelPro, install, restart ComfyUI.

Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/jetthuangai/ComfyUI-JH-PixelPro.git
cd ComfyUI-JH-PixelPro
pip install -r requirements.txt   # use the Python that runs ComfyUI

Restart ComfyUI. The nodes appear under Add Node → ComfyUI-JH-PixelPro.

Requirements: Python 3.10+, PyTorch (from ComfyUI), Kornia ≥ 0.7, MediaPipe ≥ 0.10, OpenCV ≥ 4.8, SciPy ≥ 1.10. Optional: onnxruntime-gpu (or onnxruntime) for Depth Anything and Depth Lens Blur. An NVIDIA GPU with 8 GB+ VRAM is recommended; CPU works too.

Quick start

  1. Copy workflows/sample_portrait.jpg (and sample_binary_mask.png) into ComfyUI/input/.
  2. Drag any workflow from workflows/ onto the canvas, for example the CLAHE, Face Detect Lite or Mask Cleanup examples.
  3. Queue the prompt and change one setting at a time.

Full walk-through: Quickstart.

The 64 nodes

Each name links to its guide (settings, tips, before/after image).

Color & Tone · 21

| Node | What it does | |---|---| | ColorLab | Camera Raw style panel in tabs: exposure, contrast, highlights/shadows, texture, clarity, dehaze, white balance, HSL, colour-grading wheels, B&W mix; edge-aware local engine; outputs its settings as a preset. | | Shadows/Highlights Pro | Lift shadows and recover highlights without halos, Camera Raw or Photoshop style. | | HDR Merge (bracket) | Fuse bracketed exposures into one image with detail in shadows and sky (aligned, deghosted). | | Defringe | Remove purple/green fringes along high-contrast edges and lateral chromatic aberration. | | Auto: Tone & White Balance | One-click exposure, Whites/Blacks, Highlights/Shadows and colour cast; outputs the settings for ColorLab. | | Apply ColorLab Preset | Put a ColorLab look on any photo or batch, with strength and mask. | | Lightroom Preset (XMP) | Use Lightroom / Camera Raw presets (.xmp, .lrtemplate) with a thumbnail browser, favourites and a report. | | Lightroom Preset Contact Sheet | Compare a whole preset collection on one photo. | | Tone Curve | Smooth master or per-channel RGB curves with presets. | | Color Matcher | Transfer the colour of a reference photo in LAB. | | Color Matcher Region | Match colour between two masked regions, any image sizes. | | CLAHE Local Contrast | Adaptive local contrast on lightness only; colours stay put. | | Hue/Saturation per Range | Shift hue or saturation of one colour band. | | Luminosity Masking | Shadow, midtone and highlight masks. | | Saturation Mask | Select by colour strength. | | LUT Preset | Bundled .cube looks from a dropdown. | | LUT Import | Apply any .cube LUT, with mask and strength. | | LUT Export | Bake a graded HALD into a .cube file. | | HALD Identity | Neutral HALD image to grade into a LUT. | | Tone Match LUT | Generate a .cube from one graded reference frame. | | Palette Extract | Dominant colours as swatches + HEX, and a flat-colour version. |

Masks · 13

| Node | What it does | |---|---| | Sub-Pixel Mask Refiner | Turn a hard mask into a soft alpha edge, protecting the inside and outside. | | Edge-Aware Mask Refiner | Snap a mask edge to the real edges of the photo (guided filter, brightness or colour edges). | | Trimap Builder | Foreground / unknown / background map for matting. | | Alpha Matte | Closed-form matting: hair-accurate alpha from a trimap. | | Sky Mask | Soft mask of the sky without an AI model, edges refined on the photo. | | Decontaminate Colors | Remove green-screen or sky fringes from a cut-out's soft edges. | | Mask Morphology | Grow, shrink, open, close and other shape operations on a mask. | | Mask Combine | Add, subtract, intersect, union or multiply two masks. | | Mask Edge Smoother | Bilateral cleanup of jagged mask edges (CPU or GPU). | | Mask Cleanup | Remove specks, fill holes, distance feather. | | SAM One-Click Mask | Segment Anything from one point, a face box or a rough mask. | | Mask Preview | See any mask as overlay, heatmap or cutout. | | Detail Mask | Mask of fine detail (hair, eyes, texture) to protect or sharpen. |

Face · 9

| Node | What it does | |---|---| | Face Detect | MediaPipe face boxes and 5-point landmarks. | | Face Detect Lite | Fast YuNet detector on the GPU, with a face mask and real confidence. | | Face Landmarks | 468-point face mesh for reshaping. | | Face Warp | Reshape by moving landmarks (per-triangle). | | Face Warp TPS | Same idea with one smooth thin-plate-spline field, no seams. | | Unwrap Face | Paste an edited aligned face back onto the original. | | Face Beauty Blend | Blend a retouched face plate in with mask and strength. | | Auto Blemish | Find faces and heal pimples and small marks on the skin, keeping pores. | | Skin Tone Tri-Region | Shadow / midtone / highlight masks of the skin. |

Compositing · 5

| Node | What it does | |---|---| | Layer Stack Start | Start a layer stack from a background. | | Layer Add | Add a layer with blend mode, opacity, fill, mask and clipping. | | Layer Group | Nest a sub-stack as one grouped layer. | | Layer Flatten | Render the stack to an image. | | Pyramid Blend | Multi-band blending for seamless composites. |

Filters · 7 · Depth · 2 · Geometry · 4 · Looks · 1 · QA · 2

| Node | What it does | |---|---| | Frequency Separation | Split colour/tone (low) from texture (high). | | Frequency Recombine | Rebuild the image from low + high, with a texture amount. | | Skin Smoother | Edge-preserving skin smoothing with mask and strength. | | Smart Sharpen | Unsharp mask on luminance, with threshold and mask. | | Dust & Spot Removal | Heal small specks and dust, leave larger details alone; smooth or texture-keeping fill. | | Heal / Content-Aware Fill | Paint what should go; it is rebuilt from the rest of the photo. | | Motion / Zoom Blur | Directional motion blur or zoom burst, with a mask. | | Depth Anything V2 | Depth map from a single photo (Small model: Apache-2.0). | | Depth Lens Blur | Bokeh from depth, focus picked by a face or subject mask. | | Facial Aligner | Align a face to a standard square crop; outputs the matrix Unwrap Face needs to paste it back. | | Lens Distortion | Correct or add barrel/pincushion distortion. | | Auto Align | Align a second shot to a reference (SIFT or LoFTR). | | Auto: Upright | Level horizons and make converging verticals parallel, from the photo's lines. | | Look Select | Finished colour looks with intensity. | | Cull Score | Rank a batch by sharpness, exposure, closed eyes and duplicates; keep the best. | | QA Image Diff | SSIM, PSNR and a diff heatmap between two images. |

Documentation

License

Apache-2.0. See LICENSE. Sample portrait by cottonbro studio on Pexels (Pexels License).

Maintained by JH (@jetthuangai).