CS Detail Recompose (dual-channel 4K)
This is the node that puts your 4K detail back
- hq_still
- lq_frames
- flow
- occlusion
- draft_4k
- occlusion_4k
If you've ever generated a 480P i2v clip and wished it looked like the 4K still you fed it, you've felt the exact problem CS Detail Recompose exists to solve. Your video model invented the motion at low res; this node re-injects the texture - the pores, fabric weave, grain - from your high-res source image, and it does it without re-running diffusion at 4K, which is the whole reason the pack exists.
It's the centerpiece of CS Hybrid 4K Image-to-Video (lvqunx/comfyui-cs-hybrid), a new pack whose bet is that you can get 4K video results on a fraction of the VRAM native 4K diffusion would need: run the model at 480P, then rebuild. Detail Recompose is the rebuild stage - "dual-channel" because it combines two independent sources of information.
How it works
Every output frame is a sum of two channels:
- Low frequencies - your low-res generated frame, upscaled to 4K with bicubic. This carries the motion and structure the video model actually produced.
- High frequencies - a Laplacian pyramid of the 4K still (the
levelsparameter controls how many detail bands), warped along the accumulated optical flow so the texture follows the motion instead of just sitting there.
The flow is accumulated Lagrangian-style: the node chains per-frame flow into a running displacement from the source still, then warps each pyramid band by a scaled version of that accumulated field. Per-pixel detail that starts at frame 0 ends up wherever the video moved it by frame 50.
The occlusion mask you fed in gets the same treatment - propagated to 4K and dilated a little - so downstream you know exactly where the flow was unreliable.
The inputs that matter
- hq_still - your 4K source image, the one you fed the i2v model.
- lq_frames - the low-res generated video batch.
- flow - forward flow from CS Flow Estimate (its
flow_fwdoutput). - occlusion - the matching occlusion MASK.
- levels - Laplacian pyramid depth, default 2 (1–4). More bands capture finer detail but cost more warping.
- detail_gain - how hard the high-frequency detail hits, default 1.0 (0–2). Crank it for texture-heavy shots, drop toward 0 if warped detail starts looking crunchy.
Two outputs: draft_4k (the rebuilt 4K frames) and occlusion_4k (the propagated mask), which feeds the CS Tile Scheduler so it can schedule full-res work on the occluded regions.
The honest catch
The code comment says it plainly: detail is advected from frame 0 across the entire clip, and on long clips that drift compounds into ghost outlines - texture dragged along the wrong path, smeared where flow was wrong. For short clips (a handful of seconds) it's great. For longer ones, use CS GOP Recompose, the sibling node that re-anchors on keyframes every N frames so errors never accumulate. Same pack, same idea, more robust - reach for it when your clip outgrows Detail Recompose.
Memory-wise it's friendly: frames are processed one at a time and finished frames go straight to CPU, so only the still, its pyramid, and the flow accumulator stay on the GPU - a few hundred MB, not a 4K video's worth.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/lvqunx/comfyui-cs-hybrid
# restart ComfyUI
Or ComfyUI Manager → search CS Hybrid 4K Image-to-Video. No extra pip packages; the pack uses only torch/torchvision from ComfyUI. First run of the flow node downloads RAFT weights automatically.
Common issues
The classic beginner move is feeding this node a flow that doesn't match the frames - same count, same order - which produces scrambled or smeared output with no error. Keep the batch ordering identical between your still, frames, and flow. If you see ghosting, first try detail_gain down; if it persists, that's drift, and it's a sign to move to GOP Recompose rather than a settings problem you've caused.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| hq_still | IMAGE | — | |
| lq_frames | IMAGE | — | |
| flow | CS_FLOW | — | |
| occlusion | MASK | — | |
| levels | INT | 21–4 | — |
| detail_gain | FLOAT | 1.000–2 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| draft_4k | IMAGE | — |
| occlusion_4k | MASK | — |