Nodes/comfy_Pond_Nodes/🐳局部像素化
ComfyUI Node

🐳局部像素化

Pixelate the face, not the background

By Pondowner857·Created about a year ago·Updated 21 days ago· 45
🐳局部像素化
  • 图像
  • 遮罩
  • 图像
像素大小8
混合强度1.00
羽化半径0
混合模式
反转遮罩false
保持颜色false

The whole point of "partial" pixelization is that you don't pixelate everything. You've got a region you want to hide or stylize - a face to blur out for privacy, a license plate, a background you want turned to chunky pixels while the subject stays sharp - and a mask that says where. PartialPixelize, from 🐳 Pond Nodes (comfy_Pond_Nodes), is the node that respects that mask. It's the refined version of the pack's plain pixelation tool, and it does what a Photoshop mosaic does: target one area, leave the rest alone.

How it works

It takes your image and your mask, pixelates the entire image the usual way - downscale with nearest-neighbor sampling, then upscale back so each pixel becomes a chunky block - and then composites the pixelated version back over the original, using the mask to decide which pixels survive. The extra controls exist to make that composite edge not look like a hard sticker was slapped on.

The inputs that matter

  • 图像 (image) and 遮罩 (mask) - the source and the region. If your mask is smaller than the image it gets resized to match.
  • 像素大小 (pixel size, 1–64) - how big the blocks get. 8 is a good starting point; higher = chunkier.
  • 混合强度 (blend strength, 0–1) - how much of the pixelated result actually shows. At 0 it's just the original image; at 1 it's full blocks. Dial it down for a softer effect.
  • 羽化半径 (feather radius, 0–100) - blurs the mask edge before compositing. This is the "don't look like a sticker" control. Zero is a hard cut; anything from 5 up softens the transition.
  • 混合模式 (blend mode) - normal, overlay, soft light, or hard light. The last three tint the pixelated region through a blend formula rather than replacing it outright.
  • 反转遮罩 (invert mask) - pixelate everything except the masked region. One click flips the whole effect.
  • 保持颜色 (keep color) - preserve the original color when blending.

One output: 图像. Straight back into your graph, batch-safe (it processes each frame).

Installing it

Standard pack install - Manager search comfy_Pond_Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Pondowner857/comfy_Pond_Nodes
cd comfy_Pond_Nodes
pip install -r requirements.txt

It lives under 🐳Pond/图像. Needs Pillow and numpy, which ComfyUI already has - skip the heavy deps if this is all you want from the pack. (And remember the pack's standing warning: comfyui_HiDream-Sampler can cause console spam if installed alongside.)

The gotcha

Feather is everything, and it's the easiest thing to skip. A pixelation with a hard mask edge reads instantly as "edited," which defeats privacy pixelation - the whole region is obviously a blur. Set 羽化半径 to at least a few pixels, and if you're pixelating a face, size your mask generously beyond the features; pixelation draws attention to whatever it covers, so an undersized mask just highlights the nose. And on the other end: 保持颜色 with 混合强度 below 1 is the "I want it pixelated but not destroyed" setting - start there if full blocks feel like too much.

Category🐳Pond/图像

Inputs (8)

NameTypeDefaultDescription
图像IMAGE
遮罩MASK
像素大小INT81–64
混合强度FLOAT1.000–1
羽化半径INT00–100
混合模式COMBO4 options: 正常, 叠加, 柔光, 强光
反转遮罩BOOLEANfalse
保持颜色BOOLEANfalse

Outputs (1)

NameTypeDescription
图像IMAGE