Introduction

Ever wanted to recast a scene after it's already shot? Body Double is a new open-source pipeline from Luis Catacora (lucataco) that replaces the performer in a video with a brand-new character. The motion, the camera move, the rest of the shot and the original audio all stay exactly where they were.

It's lucataco's entry for ComfyUI's #OpenSourceHiggsfield challenge, and it went public on October 30. The big flex: it runs on stock ComfyUI core nodes only. No custom node packs, no partner nodes, no closed APIs. The repo code is Apache-2.0, and the announcement post has already passed 700 likes and 20k views.

How the recast works

Body Double chains a few open models into one resumable job:

  • Find and follow: SAM 3.1 detects the performer, tracks them in windows across the clip and re-identifies them if they leave and come back. A smoothed follow-cam crop keeps them centered
  • Cast the first frame: FLUX 3 Image Klein does a two-image edit, painting your cast character into the first frame of the crop. You get four options to pick from
  • Replace the motion: SCAIL-2 (built on Wan 2.1 14B with a DPO LoRA and the lightx2v speed-up, plus an optional relight LoRA) regenerates the performer in 81-frame segments with a 5-frame overlap, each with its own seed
  • Quality control: every segment is color matched and checked for seam problems and background drift. Bad segments are re-rolled automatically
  • Composite: the recast performer is pasted back into the untouched full-resolution plate, and the original audio is muxed back in

The repo also ships its graphs in both API and UI formats under workflows/, so you can open each stage in ComfyUI and poke at it.

The numbers

The demo is a 30-second take (720 frames), rendered at 1280×704 for the follow-cam and composited at 1920×1080, with 6 steps per segment:

  • DGX Spark: about 8 minutes per segment, roughly 100 minutes for the whole take
  • H100 PCIe: about 2.5 minutes per segment, roughly 48 minutes for the whole take
  • GPU memory: around 50 GB
  • Disk: around 42 GB of models
  • Assembly: runs on the CPU

Under the hood the Klein anchor edit uses int8 weights with a Qwen3-VL 4B text encoder, 1 MP reference latents and 16 euler steps.

Setup

You need uv, git, ffmpeg, and a Hugging Face token that has accepted the gated FLUX 3 Klein license. The comfy-kitchen kernels want a CUDA 13 build of PyTorch.

git clone https://github.com/lucataco/open-source-higgsfield.git
cd open-source-higgsfield
export HF_TOKEN=your_token_here
./setup.sh --accept-sam-license
./run.sh
./run.sh --check

Then start a job with your clip, a character image and a prompt:

.venv/bin/python -m bodydouble.runner myjob --size 1280x704 --src clip.mp4 --cast character.png --prompt "a silver-haired knight in polished armor"

Handy flags:

  • --pick chooses which of the four Klein anchors to use
  • --anchor and --anchor-prompt let you bring or steer your own first frame
  • --relight turns on the relight LoRA
  • --cast-edit tweaks the cast edit step
  • --take and --seed let you re-roll a run

Jobs are resumable, so a crash halfway through a long take doesn't cost you the finished segments.

Limits to know

  • One performer per run
  • Clips that mix close-ups and wide shots can trip it up
  • Upside-down hair (think handstands and flips) is a known weak spot
  • A faint halo can appear around the performer on bright, plain backgrounds

License check

The Body Double code is Apache-2.0, but each model keeps its own terms. SCAIL-2 is MIT, the lightx2v, umt5, CLIP and Wan VAE parts are Apache-2.0, SAM 3.1 uses Meta's SAM License, and FLUX 3 Klein uses the FLUX Kommunity License v1.0, which covers non-commercial use or revenue-capped commercial use. The author deliberately left MiniMax H3 out because its license excludes several territories, including the United States.

Conclusion

Higgsfield-style recasting has mostly lived behind paid apps. Body Double shows you can do it with open models and nothing but core ComfyUI nodes, as long as you have a big GPU and a little patience. It's one of the most ambitious #OpenSourceHiggsfield entries yet.

Want to dream up your cast character before you recast? Try this on Gen → https://artrealmai.com/gen?utm_source=magazine&utm_campaign=gen&utm_content=body-double-open-source-video-recast-comfyui-flux-3-klein

Original Source

Go recast something wonderful!

—Aurelia ♡