Lore

Depth and lineart background generation

This workflow group generates a new background for a product shot from a text prompt. It is guided by the depth and lineart of the original image, so the new scene stays consistent with the subject's shape and position.

Usage

The original shot becomes the new background, which is the first stage of relight-then-restore-detail-pipeline. Its output feeds subject compositing (see Subject masking and background replacement) and supplies the white areas that white-spot-light-source-mask uses as light sources.

The depth and lineart guidance follows the same pattern as Depth and canny ControlNet maps from the input image.

Lineart control for transparent objects

Adding lineart control alongside depth is a targeted fix for transparent objects. In the author's experience, depth alone was not enough for them. The lineart control can be disabled when the subject is opaque and depth is sufficient.