Extensions/comfyui-wavelet-2d
ComfyUI Extension

comfyui-wavelet-2d

2D Discrete Wavelet Transform (DWT) nodes for ComfyUI.

By NobutakaKuroki·Created 14 days ago·Updated 5 days ago· 1
NobutakaKuroki/comfyui-wavelet-2d
Nodes4
On cloudLocal install
CategoryKULab/Wavelet
Stars1
Updated5 days ago
Readme

ComfyUI-Wavelet-2D

2D Discrete Wavelet Transform (DWT) nodes for ComfyUI.

Overview

This package provides 2D wavelet decomposition, reconstruction, subband visualization, and subband-mixing nodes for ComfyUI, along with educational sample workflows.


Features

  • 2D DWT / IDWT (haar, db4, sym4, bior4.4)
  • LL / LH / HL / HH subband decomposition
  • Classic textbook 2x2 subband layout, usable recursively for multi-level wavelet pyramids
  • 4-band graphic equalizer for mixing subbands
  • Symmetric boundary handling
  • Operates on the SIGNED_IMAGE convention, so subband coefficients keep their sign and out-of-range values intact instead of being clipped

Included Nodes

Transform

  • Wavelet Decompose (DWT)
  • Wavelet Reconstruct (IDWT)

Visualization

  • Wavelet Layout (2x2)

Mixing

  • Wavelet Graphic EQ (4-band)

Sample Workflows

Sample input images are included in the examples folder. Copy them to your ComfyUI input folder.

Lesson 1. DWT → IDWT

Workflow1


Lesson 2. Wavelet Pyramid

Workflow2


Lesson 3. Wavelet Reconstruct

Workflow3


Lesson 4. Wavelet Band-pass

Workflow4


Lesson 5. Wavelet Packet

Workflow5


Lesson 6. DWT vs VAE

Workflow6


Companion Packages

All sample workflows above use To Signed Image / Preview Signed Image, which live in comfyui-signed-image - install it alongside this package to run any of them.

Lesson 6 (DWT vs VAE) additionally uses Latent Ch to Batch from comfyui-latent-viewer.


Installation

Clone this repository into your ComfyUI custom_nodes folder.

ComfyUI/
└── custom_nodes/
    └── comfyui-wavelet-2d/

Then install the Python dependencies:

pip install -r requirements.txt

Restart ComfyUI after installation.


SIGNED_IMAGE Data Type

These nodes operate on a lightweight custom data type:

IMAGE
   ↓
SIGNED_IMAGE
   ↓ Wavelet Decompose / Wavelet Layout / Wavelet Graphic EQ / Wavelet Reconstruct
SIGNED_IMAGE
   ↓
IMAGE

Unlike IMAGE (range 0.0 ... 1.0), SIGNED_IMAGE is zero-centered (nominally -1.0 ... +1.0) and is not clamped during intermediate processing, so wavelet coefficients keep their sign and magnitude intact instead of being clipped for display.


License

See the repository license file for details.