Nodes/LCS/LCS Sharpness Calibrate
ComfyUI Node

LCS Sharpness Calibrate

LCS Sharpness Calibrate

By facok·Created 6 months ago·Updated 2 months ago· 160
LCS Sharpness Calibrate
  • vae
  • lcs_data
  • sharpness_data

Sharpen during generation, not after. LCS Sharpness Calibrate is the setup half of the pack's sharpness system: it discovers a sharpness subspace for your VAE once, caches it, and hands you the sharpness_data the actual LCS Sharpness Intervene node needs. On its own this node does nothing visible. Don't panic when the preview doesn't change - sharpening happens downstream.

The idea mirrors the color trick but for spatial frequency. The pack generates sinusoidal grating stimuli at a range of frequencies, VAE-encodes them, then runs PCA on the color-removed patch vectors. The first principal component explains ~97% of the sharpness variance, and it's deliberately made DC-free (zero-mean before PCA) and - if you connect lcs_data - orthogonal to the color subspace. That's the whole selling point: you can push texture detail around without dragging color or brightness along, which post-processing sharpen filters routinely mess up.

The graph

LCS Load Data ──→ LCS Sharpness Calibrate → LCS Sharpness Intervene → KSampler
                     ↑ lcs_data (optional)

Inputs and output

  • vae - required. Calibration is fingerprinted per-VAE and cached to data/sharpness_<fp>_grating.safetensors, so the first run pays for a few seconds of PCA and every run after is instant.
  • lcs_data - optional, from LCS Load Data. Connecting it removes the color component during calibration, so your sharpening edits stay color-orthogonal. The README recommends doing this; if you skip it, expect a slight color shift when you sharpen.
  • Output: sharpness_data → into LCS Sharpness Intervene's sharpness_data input. Not into a sampler, not into a VAE Decode.

That wiring is the mistake everyone makes once: they feed the VAE output straight into the sampler, or skip the Intervene node, and wonder why nothing changes. The Calibrate node is a data producer, full stop. All the actual knobs - strength (−5.0 to 5.0, positive = sharper, negative = blur), the default 5–15 step window, optional mask - live in the Intervene node.

Installing it

Same pack as every other LCS node:

cd ComfyUI/custom_nodes
git clone https://github.com/facok/ComfyUI-LCS.git
pip install einops safetensors

then restart. Or use ComfyUI Manager and search "LCS". Dependencies are minimal (einops + safetensors, both usually already installed). If the nodes don't appear, update ComfyUI - the pack targets the newer V3 extension API (comfy_api.latest).

Gotchas

The calibration is only as meaningful as your VAE's frequency response, so results vary per model. The README lists FLUX, FLUX2.klein, z-image, z-image-turbo, Wan (qwen-image), and LTX2.3 as tested - if you're on something else, calibrate and check, and report results. If sharpening shifts color on your setup, you calibrated without the lcs_data connection - reconnect it and recalibrate. And the usual distilled-model caveat applies: on z-image-turbo-style models, start the intervention at step 0.

Honest verdict: it's a two-node setup for something a post-processing sharpen node does in one click, so this isn't for everyone. It earns its keep when you need texture work that provably doesn't shift color or brightness - which is precisely the thing a dumb convolution filter can't promise.

CategoryLCS/calibration

Inputs (2)

NameTypeDefaultDescription
vaeVAEVAE model (calibration is cached per-VAE)
lcs_dataoptLCS_DATAOptional: remove color component to prevent color shifts

Outputs (1)

NameTypeDescription
sharpness_dataSHARPNESS_DATA