Nodes/ComfyUI Layer Style/LayerUtility: H/L Frequency Detail Restore
ComfyUI Node Runs on cloud

LayerUtility: H/L Frequency Detail Restore

H/L Frequency Detail Restore

By chflame163·Created 3 years ago·Updated 5 days ago· 3,113
LayerUtility: H/L Frequency Detail Restore
  • image
  • detail_image
  • mask
  • image
â—„keep_high_freq64â–º
â—„erase_low_freq32â–º
â—„mask_blur16â–º

This is the node that puts the skin pores back. A lot of the operations we run smooth an image out as a side effect - relighting with IC-Light, heavy denoise, some upscalers, face-swaps - and you're left with something that's correctly lit or correctly composited but looks plasticky, like the texture got sanded off. H/L Frequency Detail Restore borrows the retoucher's frequency-separation trick to fix exactly that: it takes the fine detail from one image and grafts it onto another.

Frequency separation splits an image into two layers: low frequency (the broad tones, color, and lighting - the soft stuff) and high frequency (the fine texture - pores, hair, fabric weave, grain). The insight is that these can be edited independently. This node uses that to combine two inputs: it keeps the low frequency (the good lighting/color/composite) of your main image, and borrows the high frequency (the texture) from a detail_image. So you relight a portrait with IC-Light, notice the skin went smooth, and pipe the original photo in as detail_image - out comes the relit version with the real skin texture restored. Same move works after any smoothing step: the processed result is image, the original detailed source is detail_image.

The three controls, and what they do. keep_high_freq (0–1023, default 64) is how much high-frequency detail to pull from the detail_image - higher means more texture transplanted. erase_low_freq (default 32) suppresses low-frequency information from the detail source so you're grafting texture, not re-introducing its lighting; this keeps the donor image's tones from bleeding in. mask_blur (default 16) softens the blend so the restored detail doesn't have a hard boundary. The optional mask input restricts the whole thing to a region - restore texture only on the face, say, and leave the rest untouched.

One output: image, the tone/lighting of your main input wearing the texture of the detail input.

Install is the pack standard: search "ComfyUI Layer Style" in ComfyUI Manager, or cd ComfyUI/custom_nodes && git clone https://github.com/chflame163/ComfyUI_LayerStyle, then pip install -r requirements.txt and restart. No models to download.

The one thing that makes or breaks this node: the two images have to be aligned. Frequency separation grafts texture pixel-for-pixel, so if the subject moved, scaled, or the composition shifted between image and detail_image, the borrowed detail lands in the wrong place and you get ghosting. It works best when both are the same shot at the same framing - the before and after of a relight, not two different photos. Start with the default keep_high_freq, and if the result looks over-textured or picks up noise, bring it down; if it's still too smooth, push it up. This is the standard finisher after relighting (it's a known fix for the skin-tone/texture loss IC-Light introduces), and once you have it in your kit you'll reach for it after every smoothing step. Usual LayerStyle caveat applies: if the node won't load, the pack hit an import error on a dependency conflict - console, "Try Fix," reinstall requirements.

Category😺dzNodes/LayerUtility

Inputs (6)

NameTypeDefaultDescription
imageIMAGE—
detail_imageIMAGE—
keep_high_freqINT640–1023—
erase_low_freqINT320–1023—
mask_blurINT160–1023—
maskoptMASK—

Outputs (1)

NameTypeDescription
imageIMAGE—