Wavelet Composition
The rebuild half of the frequency-split trick
- residual
- scale_1
- scale_2
- scale_3
- scale_4
- scale_5
- composed_image
WaveletCompose is the second half of the frequency-separation pair in DJZ-Nodes, and it's useless without its partner. WaveletDecompose splits an image into a residual base layer plus five detail scales; this node takes those six layers back in and reassembles the original image. Think of it as the "commit" button after you've edited individual frequency bands - you do your retouching on the detail layers, then Compose rebuilds the final picture from the pieces.
Six required inputs, matching Decompose's outputs one-for-one: residual, then scale_1 through scale_5. Feed in what Decompose gave you and you get back composed_image - an IMAGE that, with unedited layers, is a round-trip back to your source. The trick is that the round-trip isn't a trivial passthrough: detail layers are stored in display space ([0,1]), so Compose first denormalizes them back into difference space (where detail values can be negative - that's what a "detail band" is, the amount the image deviates from the blurred base), then progressively adds each scale onto the residual and clamps to valid range. It's exactly the same dance as Photoshop's frequency separation rebuild, just explicit in node form.
So what do you actually do with it? The standard workflow: Decompose → modify scales → Compose. Boost scale_4/scale_5 (fine detail) for sharpening, blur scale_1/scale_2 (coarse detail) for a texture-smoothing skin pass, or mix scales from two different images to transplant texture from one subject onto another's structure. The name "wavelet" overstates the math a bit - it's a Gaussian pyramid, not a true DWT - but for editing purposes that's a feature, because each band is real, editable image data instead of opaque coefficients.
The gotcha that will bite you at least once: this node expects exactly the five-scale layout. WaveletDecompose lets you dial scales from 1 to 10, and it pads unused detail outputs with zero tensors - but Compose's five scale inputs are fixed. If you decompose at scales = 3 and wire it straight into Compose, you're passing zero tensors into scale_4 and scale_5, which quietly degrades the rebuild rather than erroring. Set scales = 5 at build time and don't change it mid-workflow.
Other notes: output is clamped to [0,1], so if your edited layers push values out of range you'll get clipping rather than blown channels - dial edited bands back toward neutral rather than fighting it. And since both nodes are torch-only with no model files, the whole split-edit-rebuild chain is cheap to run and adds no VRAM pressure beyond what you already have. Install: ComfyUI Manager → "DJZ-Nodes", or cd ComfyUI/custom_nodes && git clone https://github.com/MushroomFleet/DJZ-Nodes && pip install -r requirements.txt. Like the rest of the pack, you get 75+ nodes whether you asked for them or not.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| residual | IMAGE | — | |
| scale_1 | IMAGE | — | |
| scale_2 | IMAGE | — | |
| scale_3 | IMAGE | — | |
| scale_4 | IMAGE | — | |
| scale_5 | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| composed_image | IMAGE | — |