WWL_StableDelight
Stripping specular reflections out of any photo
- image
- IMAGE
You know that photo you shot through a shop window, where half the product is buried under the street reflected in the glass? Or the product shot with an ugly highlight smeared across the metal? That's the job this node exists for. WWL_StableDelight is a one-trick pony that runs the StableDelight model from Stable-X - "Revealing Hidden Textures by Removing Specular Reflections" - and turns a photo into a reflection-free "delit" (diffuse) version of itself. No API, no key, nothing to prompt. You feed it an image, it hands back the same image with the specular component subtracted.
It won't be the star of your workflow. But when you need to rescue texture from under glare - product catalogs, museum-photo edits, cleaning up a scan taken through glass - it's the fastest single-node way to do it. The only alternative is hand-inpainting, and nobody wants that.
How it actually works
StableDelight sits in the same architecture family as Marigold - a diffusion image-to-image model, not an instruction editor. The pipeline (basically StableDiffusionControlNetPipeline in a Marigold-style wrapper) VAE-encodes your input image, feeds those latents through a ControlNet to condition the UNet on your photo's structure, runs a single UNet pass, and VAE-decodes the result back to a diffuse image.
The neat part: the latents start at zero, not random noise, and it's a single forward pass at timestep zero. That's why StableDelight got billed as "real-time reflection removal" when it shipped in September 2024, and it's why this is deterministic-feeling - no seed, no denoise slider. The model was distilled to strip the specular layer in one shot while preserving structure.
The inputs that actually matter
Four required inputs, and three of them have sensible defaults. The one you'll touch most:
- image - the photo with reflections. It's an IMAGE tensor, but heads up: if you feed a batch, the node only processes the first frame (
image[0]). Don't use this to batch-strip a folder in one go. - processing_resolution (default 2048, range 512–4096) - the working resolution for the diffusion pass, like Marigold's. 2048 is a good balance; drop to 1024 if you're on a small card, because this is a full SD1.5 UNet + ControlNet + VAE chewing on that canvas.
- controlnet_conditioning_scale (default 1.0, range 0–10) - how hard the model sticks to your input's structure. If the output drifts or warps away from the source, dial it down toward 0.5–0.8; if reflections survive, nudge it up.
- resample_method - how the image is resized to the processing resolution and back.
bilinearis the safe default;bicubicfor marginally sharper edges.
The output is a single IMAGE - the delit result, resized back to your original's dimensions, values in normal 0–1 tensor space. Wire it straight into Save Image or into any downstream node (it's a plain image, so upscaling, VAE, whatever - nothing special).
Installing it
The usual two ways:
# ComfyUI Manager: search "StableDelight"
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/wTechArtist/ComfyUI-StableDelight-weiweiliang
Restart ComfyUI. Then the thing you need to know: the model is not a ComfyUI model file - it downloads on first use. The first time you add the node to a canvas, it pulls Stable-X/yoso-delight-v0-4-base from HuggingFace into your HF cache - roughly 3.3GB of fp16 weights. It happens in the node's __init__, so adding the node alone can stall your queue for a while on a slow connection. One-time cost, and the model is Apache-2.0, so no license drama.
Where people get burned
The requirements.txt is the trap. It pins some seriously old versions - torch==2.0.1, torchvision==0.15.2, transformers==4.36.1, xformers==0.0.21, plus matplotlib, scipy, pytorch-lightning, einops - and ComfyUI Manager installs requirements files by default. That torch pin is a downgrade waiting to happen on any modern ComfyUI install, and the matplotlib/scipy/lightning pins are dead weight the node path never touches. If Manager's install seems to be reworking your Python environment, let it finish but then verify your torch version; many people prefer to skip the requirements entirely and rely on ComfyUI's bundled torch + diffusers, since the node's real needs (torch, diffusers, transformers, Pillow, xformers) are all things a stock ComfyUI already has.
Beyond that: give it a decent GPU. At 2048 resolution it wants 8–12GB VRAM, and the only "lite" setting is lowering processing_resolution. Don't expect miracles on reflections covering half the frame - it strips specular highlights, it doesn't teleport you around the glass.
The verdict
This is a scrappy, single-commit wrapper from an author who clearly built it for themselves (empty README, tiny placeholder examples, WWL handle in the class name). One node, one job. If that job is yours, it works - install it, set the resolution to fit your card, and enjoy glare-free product shots. If you don't shoot through glass, there's nothing here for you, and that's fine. It's a tool, not a lifestyle.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| processing_resolution | INT | 2048512–4096 | — |
| resample_method | COMBO | 5 options: bilinear, nearest, nearest-exact, bicubic, area | |
| controlnet_conditioning_scale | FLOAT | 1.00–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |