| source | COMFY_MATCHTYPE_V3 | | Image to correct - its exposure is changed to match the reference. Echoed back in the same type (IMAGE/MASK/NPARRAY). Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. |
| reference | NPARRAY,IMAGE,MASK | | Image whose exposure/white balance is the target. Same size and channel count as the source; it is never modified. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. |
| model | COMBO | gain + bias | What to fit. 'gain + bias' handles an exposure change plus a black-level/flare shift (the usual case). 'gain only' is the pure exposure/ISO model. 'bias only' is an additive offset, e.g. stray light added to one shot. |
| scope | COMBO | per channel (also fixes white balance) | Per channel gives each of B, G, R its own gain and bias, which also corrects a white-balance drift. One shared fit is safer when the images have few unchanged pixels, because all channels then pool their evidence. |
| inlier_fraction | FLOAT | 0.500.05–1 | Fraction of pixels kept as inliers at each refit. Set it BELOW the fraction of the frame that is genuinely unchanged (0.5 tolerates a subject covering half the frame). 1.0 disables the trimming and gives a plain least squares. |
| iterations | INT | 31–20 | Refits after the initial difference-based inlier selection. 3 is enough for a photometric drift; more only matters when the first selection was poor. |
| maskopt | NPARRAY,MASK | | Optional region to fit ON (non-zero pixels), for when you already know where the unchanged background is. The trimming still runs inside it. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. |