Nodes/Region Edit Toolkit/图像分区 · 皮肤微纹理合成
ComfyUI Node

图像分区 · 皮肤微纹理合成

Put the skin grain back after a face edit, without ever copying the source face's pixels

By Liu-Bot24·Created 2 months ago·Updated about a month ago· 1
图像分区 · 皮肤微纹理合成
  • generated_image
  • source_skin_patch
  • mask
  • detail_restored_image
  • synthesized_texture_preview
  • source_band_preview
  • effective_detail_mask
  • report_json
source_iod1
target_iod1
detail_strength0.75
quantile_blend0.65
seed20260725
synthesis_moderadial_random_phase_v1
dog_sigma_small0.65
dog_sigma_large2.20

The surest sign an AI face has been edited is the skin. Generators make skin too smooth - the pore and grain texture that real camera captures have, the fine high-frequency noise that makes skin read as skin - and once you've regenerated a face, that texture is gone. RegionEditSkinMicrotextureSynthesis puts a source-like skin microtexture back into the edited region. And it does it with a genuinely interesting constraint: it synthesizes the texture in the style of the source skin without ever copying the source's actual pixel coordinates.

The mechanism is what makes this node worth reading about. The source (the author's own docstring) is explicit: it retains only the source skin's radial spectral statistics and uses fresh target-space phase. In plain terms, it measures what frequencies and orientations the source skin texture contains - how big the grain is, how it's distributed - and regenerates that statistical character with random phase, so no source feature (a freckle, a mole, an eye) can be transplanted. Neither of the two modes copies source coordinates, low-frequency color, or lighting. This is a deliberate privacy/authenticity design: you can't use this node to smuggle the source face's details into the edited face, and that's the point.

Inputs: generated_image (the edited face), source_skin_patch (a clean sample of source skin), mask (where to apply), then the tuning. source_iod and target_iod (both default 1) are the scale controls - iod is inter-orbital distance, the pack's chosen measure of face scale, and you set them so the source grain size maps onto the target's scale correctly (a 2x bigger face needs its grain proportionally scaled). detail_strength (0.75) is how strongly the synthesized texture is applied; quantile_blend (0.65) blends the synthesized band back; seed (a fixed default, set it to match your generation seed for reproducibility). The optional synthesis_mode picks between radial_random_phase_v1 (the spectral-statistics route) and jwola_microtexture_v1 (a JW-OLA route that samples source residual patches and rebuilds them with jittered Hann overlap-add - higher fidelity, costlier). Two dog_sigma_* values tune the bandpass filter that isolates "skin grain" frequencies.

Outputs: detail_restored_image (the result), plus three diagnostic views - synthesized_texture_preview, source_band_preview, and effective_detail_mask (which pixels actually got texture) - and report_json. The preview outputs make this node unusually easy to tune: look at the band preview to confirm you've isolated grain and not facial features.

Where it fits: this is a restore-after-edit node, the color-and-detail sibling of RegionEditProtectedDetailHarmonizer - that node reconciles the outside, this one restores the inside. Both run after generation and before final composite.

Install: ComfyUI Manager → Region Edit Toolkit (native-region-tile-planner-merge), or git clone https://github.com/Liu-Bot24/ComfyUI-Region-Edit-Toolkit.git into custom_nodes, pip-install requirements.txt into ComfyUI's real Python, restart. Pure numpy/scipy - no models.

The practical trap: a bad source_skin_patch (one that includes an eyebrow or a lip) will have its frequencies baked into the synthesis and you'll get weird repeating structure instead of grain. Keep the sample small and clean. The pack is too new for community tuning threads, but the preview outputs give you the feedback loop to dial this in yourself.

CategoryRegion Edit Toolkit/Color & Detail

Inputs (11)

NameTypeDefaultDescription
generated_imageIMAGE
source_skin_patchIMAGE
maskMASK
source_iodFLOAT11–4096
target_iodFLOAT11–4096
detail_strengthFLOAT0.750–1.5
quantile_blendFLOAT0.650–0.8
seedINT202607250–9223372036854776000
synthesis_modeoptCOMBOradial_random_phase_v12 options: radial_random_phase_v1, jwola_microtexture_v1
dog_sigma_smalloptFLOAT0.650.25–8
dog_sigma_largeoptFLOAT2.200.5–32

Outputs (5)

NameTypeDescription
detail_restored_imageIMAGE
synthesized_texture_previewIMAGE
source_band_previewIMAGE
effective_detail_maskMASK
report_jsonSTRING