π§ Image Contrast Adaptive Sharpening
Image Contrast Adaptive Sharpening β crisp detail without the crunchy halos
- image
- IMAGE
Sharpening is easy to overdo - crank a normal sharpen and you get ugly white halos around every edge and crunchy over-emphasized texture. Contrast Adaptive Sharpening (CAS) is the smarter version. It's the same algorithm AMD ships in FidelityFX for games, designed to add crispness where an image is soft while not piling more contrast onto edges that are already sharp. The result is detail that looks recovered rather than filtered. This node drops that straight onto an IMAGE.
What it does
Refreshingly simple for how good it is. One meaningful input:
- amount - how much sharpening to apply, 0 to 1, default 0.8. That's it. 0 is no effect, 1 is maximum. The "contrast adaptive" part means even at higher amounts it behaves better than a plain unsharp mask, because it varies the strength based on local contrast instead of hammering everything equally.
Output is the sharpened IMAGE.
The reason there's only one knob is that CAS does the clever part internally - it looks at each pixel's neighborhood and decides how much sharpening that area can take before it'd start haloing. You just tell it the overall intensity.
Where it fits in a workflow
Two prime spots. After an upscale: AI upscalers, and especially latent-space hires passes, often come back slightly soft. A pass of CAS at 0.5β0.8 puts the bite back without introducing the artifacts a naive sharpen would. As a final finishing step: right before you save, a gentle CAS can make a good render read as crisp on screen.
It plays well with the rest of a post chain - do your color match, your composite, then sharpen last, so you're sharpening the final pixels rather than sharpening something you're about to blur or recolor.
Installing it
Part of ComfyUI Essentials by cubiq - Matteo Spinelli, the developer behind the community-standard ComfyUI_IPAdapter_plus:
- ComfyUI Manager: search "ComfyUI Essentials" β Install β restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/cubiq/ComfyUI_essentials, installrequirements.txt, restart.
Look for the π§ wrench and the + (ImageCASharpening+).
Gotchas
Even a good algorithm can be pushed too far. At amount near 1 on an image that's already sharp, you'll start to see the classic over-sharpened look - texture that's too busy, edges that shimmer. CAS resists this better than a normal sharpen, but it doesn't make it impossible. Default 0.8 is a strong starting point; if the result looks harsh, drop toward 0.5.
Sharpening is a finishing move - do it last. Sharpen, then upscale, and you amplify the sharpening artifacts; sharpen, then blur/composite, and you've wasted the pass. Put CAS at the end of the chain.
And don't expect it to create detail that isn't there. CAS emphasizes existing edges; it can't invent texture in a genuinely soft or low-res image. For that you want an actual upscaler first, then CAS to finish.
Pack note: cubiq set Essentials to maintenance-only in April 2025. It still works fine, but if it breaks after a major ComfyUI update, roll ComfyUI back or patch the file - no upstream fixes. A red "missing node" box means the pack failed to load; check the startup log and reinstall via Manager.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| amount | FLOAT | 0.800β1 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |