Nodes/ComfyUI-OCIO/OCIO Clip Repair
ComfyUI Node

OCIO Clip Repair

Fix blown highlights with an HDR pass — without wrecking the 90% that was fine

By SlavaSexton·Created 2 months ago·Updated 3 days ago· 99
OCIO Clip Repair
  • plate
  • reconstruction
  • image
  • repair mask
  • report
repair_highlightstrue
highlight_level0.970
repair_shadowsfalse
shadow_level0.010
grow6
feather24
match_levelstrue
plate_spacedisplay codes

OCIO Clip Repair is the odd one out in this pack: it's not a color node, it's a compositing utility, and it solves a very specific 2026 problem. You've got an SDR plate with blown highlights. You run an SDR-to-HDR reconstruction over it (LumiPic, LTX's HDR IC-LoRA, that class of model) and the pass genuinely brings the highlights back - a clipped sun gets a falloff. But it also rewrites everything. Tone shifts, texture changes, colors drift in the 90%+ of the frame that was never damaged. This node takes the plate and the reconstruction and composites the reconstruction in only where the plate is clipped, leaving the rest exactly as it was.

That's the whole argument, and the defaults encode it. The plate and reconstruction inputs are both IMAGE batches of the same frames. Everything outside the mask comes from the plate unchanged, which is what preserves tone, texture and frame-to-frame stability; the reconstruction is used only inside the mask.

The inputs that matter

  • highlight_level (default 0.97) - repair above this code value. The node's own tooltip makes the point: detail usually dies before 1.0, so values in the 0.90–0.99 band are normal. Lower catches more but starts overwriting pixels that were fine.
  • repair_shadows (default off) - this default exists because someone measured it. On real material the reconstruction returned smooth shadows, replacing the plate's genuine (if noisy) grain with nothing. Turn it on only if your pass demonstrably does better in the blacks.
  • grow (6) and feather (24) - grow expands the mask outward so the repair starts slightly before the damage; feather softens the edge so the composite doesn't read as a seam. If you see a ring around repaired highlights, feather is your lever.
  • match_levels (default on) - scales the reconstruction to the plate's mid-tones before compositing, so the patch sits at the plate's exposure instead of its own.
  • plate_space - display codes or scene linear. The node genuinely can't auto-detect this: a scene-linear plate made from an 8-bit source peaks at exactly 1.0, same as a display one. You say which. The levels are always quoted in display codes, because that's where clipping happens.

Outputs are the repaired image, a repair mask (MASK - worth eyeballing once to see exactly what you're touching), and a report (STRING) describing what the node did.

Why the defaults are worth trusting

The pack's author measured this on a real shot rather than trusting the concept. Applied full-frame, the reconstruction moved channel balance across the 97% of the frame that never clipped, and made per-frame highlights flicker at 22.7% against the source's 2.1%. That's why "composite only the clipped ends" isn't a stylistic choice. This node is niche - you only need it if you're actually running SDR-to-HDR reconstruction passes on real clips - but if you are, it's the difference between a plate that survives comp and one that visibly shimmers.

Install via ComfyUI Manager (Nightly, not the flagged numbered versions) or the manual clone from https://github.com/SlavaSexton/ComfyUI-OCIO, then pip install -r requirements.txt. It's a plain IMAGE-in/IMAGE-out node - no VIDEO sockets, no OCIO dependency beyond the pack's install, no model files.

CategoryOCIO

Inputs (10)

NameTypeDefaultDescription
plateIMAGEThe original frames. Everything outside the mask comes from here unchanged, which is what preserves tone, texture and frame-to-frame stability.
reconstructionIMAGEOutput of an SDR-to-HDR pass over the same frames (LumiPic, LTX HDR IC-LoRA, ...). Used only inside the mask.
repair_highlightsBOOLEANtrueRebuild blown highlights. This is the end that reconstructs well: a clipped sun comes back with a falloff.
highlight_levelFLOAT0.9700.5–1Repair above this code value. Detail usually dies before 1.0, so values in the 0.90-0.99 band are normal. Lower catches more, at the cost of overwriting pixels that were fine.
repair_shadowsBOOLEANfalseOFF by default on purpose. Measured on real material the reconstruction returned SMOOTH shadows, replacing the plate's real (if noisy) texture. Turn on only if your pass demonstrably does better in the blacks.
shadow_levelFLOAT0.0100–0.2Repair below this code value. A plate typically loses most shadow structure by about 0.04.
growINT60–64Expand the mask outward, so the repair starts slightly before the damage does.
featherINT240–256Soften the mask edge. This is what stops the composite reading as a seam.
match_levelsBOOLEANtrueScale the reconstruction to the plate on mid-tones before compositing, so the patch sits at the plate's exposure instead of its own.
plate_spaceCOMBOdisplay codesWhat the plate is in, which the node cannot reliably detect: a scene-linear plate made from an 8-bit source peaks at exactly 1.0, same as a display one. Say it here. The two levels are ALWAYS quoted in display codes, because that is where clipping happens; on a linear plate the node encodes internally for the mask only and still composites in linear.

Outputs (3)

NameTypeDescription
imageIMAGE
repair maskMASK
reportSTRING