ShadowR Shadow Remover
Erase cast shadows that inpainting mangles
- model
- image
- image
Every photographer knows the pain: a great shot of a textured wall, a product, or a document scan, ruined by one hard cast shadow that flattens the detail under it. You could inpaint it, but masking shadows is fiddly and the regenerated patch never quite matches the surface texture around it. That's the hole this node fills. ShadowR Shadow Remover runs a dedicated shadow-removal network over the whole image and hands you back a version with the shadow gone and the underlying surface preserved - no mask, no prompt, no dice roll.
It's a ComfyUI wrapper around the Shadow_R project, shipped by Easymode-ai as part of the ComfyUI-ShadowR pack (two nodes total - this one plus a model loader). There's no API call and no key; it's a pure local torch model, which is exactly what you want for batch-de-shadowing a folder of photos.
How it works
The model is two networks chained together. First a ConvNeXt-based "fusion" network does the heavy lifting - it takes the RGB image and produces the de-shadowed version. Then a Restormer (a transformer restoration model) runs a refinement pass over that result, blended in at a small weight so it cleans up without re-inventing detail. You don't tune any of that; it's baked in.
What you do control is the chunking, which is the pack's main selling point over running the raw repo. The node slices your image into overlapping tiles, runs each through the model, then stitches them back with linear blending across the overlaps. That's what the changelog means by "chunking to speed things up significantly" - and as a side effect it keeps big images from blowing up VRAM, since it clears GPU cache after every tile.
The inputs that matter
Only four inputs, and two of them you'll likely never touch:
- model - the
SHADOWRMODELoutput from the pack's ShadowR Model Loader node. Feed it there first. - image - your shadowed photo, straight from Load Image.
- chunk_size (default 512) - tile size in pixels. Bigger tiles give the network more context per pass but cost more VRAM and run slower. 512 is a fine starting point.
- overlap (default 64) - how much neighboring tiles bleed into each other to hide seams. If you ever see faint tile boundaries in the output, bump this up.
The single output is image, a regular IMAGE tensor - wire it straight into Save Image, or into a preview node if you want to eyeball the before/after. It's not an output node, so it won't auto-preview on its own.
Installing it
Easiest path: ComfyUI Manager → search "ComfyUI-ShadowR" → install, then restart. Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Easymode-ai/ComfyUI-ShadowR
Then two manual steps the README is upfront about. First, the weights are not in the repo - download them from the Google Drive link and drop them into ComfyUI/models/shadow_r. The loader actually wants two .pth files in that folder (one for the removal net, one for the Restormer enhancement net), so if the loader's dropdowns come up empty, that's why. Second, install the dependencies:
python_embeded\python.exe -m pip install -r requirements.txt
On a non-portable install, swap python_embeded\python.exe for your ComfyUI venv's python. The list is heavier than most node packs - timm, kornia, einops, pytorch_lightning, opencv-python, scikit-image - so expect a few minutes of install time and a restart afterward.
Where people get burned
Skip the requirements install and ComfyUI will fail at startup with a missing timm or kornia import. Skip the weights and the loader silently has nothing to offer. And set expectations: this model was trained to kill cast shadows - the hard-edged ones thrown across a surface - not soft ambient shadow or shadow that's baked into the subject's texture. Hard shadows on fairly uniform backgrounds, it's excellent. Anything subtler, and you're back to the mask-and-inpaint grind.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | SHADOWRMODEL | — | |
| image | IMAGE | — | |
| chunk_size | INT | 5120–4096 | — |
| overlap | INT | 640–1024 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |