Nodes/AInVFX Paint a plate/Relight Transfer
ComfyUI Node

Relight Transfer

Moves the new light of a regenerated shot onto the plate. Light, shadows and reflections come from the regeneration; texture, grain, sharpness and highlights stay the plate's. Each input is linear light, or sRGB as 'plate_space' and 'shot_space' say.

By AInVFX·Created 26 days ago·Updated about 18 hours ago· 157
Relight Transfer
  • plate
  • source
  • relit
  • light
  • shade
  • image
◄radius1►
◄strength1.00►
◄aligntrue►
◄plate_spacelinear►
◄shot_spacelinear►
◄shade_density0.70►
CategoryAInVFX/Paint a plate

Inputs (11)

NameTypeDefaultDescription
plateIMAGEThe plate in linear light, any size.
sourceIMAGEThe plate as the model saw it, in linear light. The light is measured at this size: half the plate's size is plenty, light is smooth.
relitIMAGEThe regenerated shot, same size as 'source', in linear light.
radiusINT11–256The change of light is smoothed over this many pixels of 'source', its colour over four times as many; finer detail stays the plate's. 1 at half the plate's size lets the shot's light through almost pixel for pixel.
strengthFLOAT1.000–2—
alignBOOLEANtrueRealign 'relit' first, by one shift for the whole shot: the median of every frame's.
plate_spaceoptCOMBOlinearHow 'plate' and the result are encoded. sRGB is decoded to linear light here, frame by frame in parallel, and the result encoded back: far cheaper than core colour conversions at full size.
shot_spaceoptCOMBOlinearHow 'source' and 'relit' are encoded: sRGB, as the model saw and made them, is decoded here.
lightoptIMAGEA light edit's painted light, in display values on black. Where it is strong, the result keeps at least the plate with that light added, as the brush showed it.
shadeoptIMAGEA light edit's shade strokes, white where the shadow is full: the result is darkened there, in linear light, by 'shade_density'. Klein ignores a painted shadow.
shade_densityoptFLOAT0.700–1How much light the painted shade takes away where it is full.

Outputs (1)

NameTypeDescription
imageIMAGE—