Nodes/S42 CutFlow/🏞 S42 CutFlow Background Plate
ComfyUI Node

🏞 S42 CutFlow Background Plate

Generate a clean background plate when you don't have one (or pull it from the footage)

By GeekyGhost·Created 6 months ago·Updated 4 months ago· 3
🏞 S42 CutFlow Background Plate
  • source_video
  • source_image
  • background
  • info
modesolid_color
width768
height512
frames1
color1_hex#1a1a2e
color2_hex#16213e

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 of color1_hex. The "give me something to put a subject on" fallback.
  • gradient_h / gradient_v - a two-color gradient (color1_hexcolor2_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 a source_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 supplied source_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.

CategoryS42 CutFlow/LTX Bridge

Inputs (8)

NameTypeDefaultDescription
modeCOMBOsolid_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.
widthINT76864–4096Background width.
heightINT51264–4096Background height.
framesINT11–9999Number of frames to generate. Match your video length for compositing.
color1_hexSTRING#1a1a2ePrimary color (hex). Used for solid and gradient start.
color2_hexSTRING#16213eSecondary color (hex). Used for gradient end.
source_videooptIMAGESource video for 'from_video_median' mode. Computes temporal median per-pixel.
source_imageoptIMAGESource image for 'from_image' mode. First frame used, scaled to canvas.

Outputs (2)

NameTypeDescription
backgroundIMAGE
infoSTRING