Nodes/Refocus - Generative Refocusing/Depth Metric to Relative
ComfyUI Node

Depth Metric to Relative

Convert metric/raw depth to relative 0-1 range. Works with any depth source. Use gamma to adjust brightness bias.

By EricRollei·Created 7 months ago·Updated 3 months ago· 18
Depth Metric to Relative
  • depth
  • relative_depth
per_imagetrue
inverttrue
gamma1.00
CategoryRefocus/Depth

Inputs (4)

NameTypeDefaultDescription
depthIMAGE
per_imageoptBOOLEANtrueNormalize each image in batch independently
invertoptBOOLEANtrueInvert so near=bright, far=dark (standard for ControlNet)
gammaoptFLOAT1.000.01–10Gamma correction: >1 = brighter midtones, <1 = darker

Outputs (1)

NameTypeDescription
relative_depthIMAGE