🏞 S42 CutFlow Background Plate
Generate a clean background plate when you don't have one (or pull it from the footage)
- source_video
- source_image
- background
- info
Every compositing job needs a plate - the clean background your subject gets placed in front of - and the AI-video version of that is the LTX 2.3 workflow where you regenerate a background while keeping a subject. Sometimes you have real footage to derive a plate from. Often you don't. S42CF Background Plate covers both cases in one node, sitting in the pack's LTX Bridge section.
It has five modes, and they split cleanly:
solid_color(default) - a flat fill ofcolor1_hex. The "give me something to put a subject on" fallback.gradient_h/gradient_v- a two-color gradient (color1_hex→color2_hex) in either direction. Gradient plates look far less "generated" than flat fills, which is why they're the smarter default for most LTX regeneration work - the model has a little tonal variation to work with.from_video_median- the clever one. Feed it asource_video(optional IMAGE input) and it computes the per-pixel temporal median across all frames. Anything that moved in the footage (a person, a car) gets median'd away, leaving a surprisingly clean, empty background. It's the poor man's background inpainting, and for footage with a static camera it works shockingly well.from_image- take a suppliedsource_image, scale it to the canvas. For when you have a single clean background photo you want as the plate.
Common canvas controls: width/height (defaults 768×512, which is the LTX-2-era working resolution - match your empty latent), frames (generate more than one frame so the plate can match your video length for compositing), and the two hex color fields. Outputs are background (IMAGE) and info.
Where it slots into the LTX workflow: after S42CF Subject Isolate has separated subject from background, this generates (or derives) the clean plate, Guide Frame Prep extracts guide frames from it, LTX regenerates a new background, and the subject is composited back on top. It's also the fallback for segmented generation (S42CF VideoSegmentPrep) when some segments have no usable source footage - generate a plate, keep the pipeline unblocked.
The honest read: for a "generate colors" node this is nothing special - any color fill node does that. The value is in from_video_median, which is a legitimately handy trick for static-camera footage, and in having the plate generation wired into the same category as the rest of the LTX bridge so you don't need a separate tool. If your camera moves, the median gets smeary and you should just use a gradient plate instead.
Installing it
S42-CutFlow install: ComfyUI Manager → search "S42 CutFlow" → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/GeekyGhost/S42-CutFlow.git
pip install -r S42-CutFlow/requirements.txt
One-line requirements (opencv-python-headless); the median is torch/numpy. Look for "[S42 CutFlow] Loaded ..." on restart.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | solid_color | 'solid_color' = flat color fill. 'gradient_h' = horizontal gradient. 'gradient_v' = vertical gradient. 'from_video_median' = compute median background from video. 'from_image' = use a provided image, scaled to canvas. |
| width | INT | 76864–4096 | Background width. |
| height | INT | 51264–4096 | Background height. |
| frames | INT | 11–9999 | Number of frames to generate. Match your video length for compositing. |
| color1_hex | STRING | #1a1a2e | Primary color (hex). Used for solid and gradient start. |
| color2_hex | STRING | #16213e | Secondary color (hex). Used for gradient end. |
| source_videoopt | IMAGE | Source video for 'from_video_median' mode. Computes temporal median per-pixel. | |
| source_imageopt | IMAGE | Source image for 'from_image' mode. First frame used, scaled to canvas. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| background | IMAGE | — |
| info | STRING | — |