Wavelet Decomposition
Photoshop's frequency-split, in a node
- image
- residual
- scale_1
- scale_2
- scale_3
- scale_4
- original
- scale_5
If you've ever wanted to separate an image into its coarse structure and its detail layers so you can edit them independently - sharpen only the fine detail, or replace one frequency band with another image's - this is the node. It's the ComfyUI version of the Photoshop frequency-separation trick that retouchers have used for twenty years, and it does it in one pass.
A quick honesty note on the name: this is "wavelet decomposition" in the Photoshop sense, meaning a Gaussian pyramid - blur the image repeatedly, subtract each blur level from the previous one, and each subtraction is a "detail scale." It is not the DWT (discrete wavelet transform) you'd get from PyWavelets. Same spirit, different math. That matters because the layers here are made of real image data, not transform coefficients, which actually makes them friendlier to manipulate and recombine in a graph.
Here's what you get out. Feed it one image and a scales count (1–10, default 5), and it returns seven sockets: residual (the most blurred base - your lowest-frequency structure), scale_1 through scale_5 (progressively finer detail bands, where scale_1 is the coarsest detail and scale_5 the finest), and original (the untouched input, handy for comparison or recombining). The README itself flags a ⚠️ that color output "is currently being fixed," which is the author's own warning - check your outputs against the source image and don't be surprised if a band looks off. That caveat is why you should test on a still frame before committing a whole batch to it.
The workflow this enables is genuinely useful: run Decompose → boost or blur individual scale_* layers (this is where your editing happens - sharpen by amplifying the fine scales, smooth skin by damping them) → feed all of it into the pack's matching WaveletCompose node → get back the rebuilt image. Because each scale is real image content, you can also do the classic mix: take scale_1 from image A and the finer scales from image B, compose, and get "structure from A, texture from B."
Mechanically it's torch-only: a 2D Gaussian kernel with reflection padding to kill edge artifacts, blur-and-subtract per scale, device-aware so it grabs CUDA when available. No model files, no downloads. That makes it cheap to run - a decomposition chain adds nothing to VRAM pressure that you wouldn't already have from the video gen itself.
The trap: the node returns exactly seven outputs and the pack's Compose node expects exactly those seven inputs. If you change scales, Decompose pads unused detail sockets with zero tensors and Compose has its own fixed five scale inputs - so changing the scale count mid-graph can leave you with mismatched detail layers. Pick your scales at workflow build time and don't fiddle with it. And if your edited scales end up brighter or dimmer than the originals, remember Compose re-normalizes detail from display range back into difference space before recombining - that's a feature, not a bug. Install: ComfyUI Manager → "DJZ-Nodes", or clone + pip install -r requirements.txt (whole-pack install, heavy requirements).
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| scales | INT | 51–10 | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| residual | IMAGE | — |
| scale_1 | IMAGE | — |
| scale_2 | IMAGE | — |
| scale_3 | IMAGE | — |
| scale_4 | IMAGE | — |
| original | IMAGE | — |
| scale_5 | IMAGE | — |