BRANDON HUBBARD // ENGINEERING PORTAL
NETFLIX & INSAIT VOID ARCHITECTURE • COUNTERFACTUAL VIDEO INPAINTING

Physics-Aware Video Object & Interaction Deletion in Pure Rust.

Deleting an actor from video requires more than pixel erasure. void-model-rs combines 4-state QuadMask truth-table synthesis, multimodal VLM physical dependency graphs, subpixel optical-flow-warped latent diffusion noise ([16×60×90]), and counterfactual gravity & harmonic rebound dynamics in a zero-Python native Rust engine.

Host Pipeline Speedup
44.6x
1.53 ms vs 68.24 ms (Python)
QuadMask Composition
66.9x
0.29 ms / 49-Frame Clip
Pass 2 Latent Warping
0.91 ms
[16×60×90] Bilinear + λ=0.30
Peak Memory Footprint
11.2 MB
132x Lower RSS than PyTorch

01 // Interactive Counterfactual Video Object & Interaction Deletion Studio

FRAME 00 / 48 (30 FPS)
0: PRIMARY OBJECT
42,810 px
63: OVERLAP ZONE
6,420 px
127: AFFECTED / SHADOW
28,190 px
255: BACKGROUND
268,180 px
03 // Empirical Performance Benchmarks (49 Frames @ 720×480) 44.6x FASTER
VOID Pipeline Stage Python Reference Rust void-model-rs Speedup
Stage 1: QuadMask Truth-Table Combine 19.40 ms 0.29 ms 66.9x
Stage 2: Chebyshev Mask Dilation (r=2) 8.75 ms 0.18 ms 48.6x
Stage 3: VLM Contact Graph Resolution 2.14 ms 0.04 ms 53.5x
Stage 4: Flow Downsampling (720×480→90×60) 4.60 ms 0.09 ms 51.1x
Stage 5: Pass 2 Subpixel Latent Noise Warp 31.80 ms 0.91 ms 34.9x
Stage 6: Counterfactual Physics Solver 1.55 ms 0.02 ms 77.5x
Total Host Pipeline Latency 68.24 ms 1.53 ms 44.6x
04 // WGPU Pass 2 Latent Noise Advection Shader (WGSL) src/flow/warped_noise.rs
@compute @workgroup_size(8, 8, 1)
fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
    let x = gid.x; let y = gid.y;
    if (x >= params.width || y >= params.height) { return; }
    let uv = flow_uv[y * params.width + x];
    let sx = clamp(f32(x) - uv.x, 0.0, f32(params.width - 1u));
    let sy = clamp(f32(y) - uv.y, 0.0, f32(params.height - 1u));
    let x0 = u32(floor(sx)); let y0 = u32(floor(sy));
    let x1 = min(x0 + 1u, params.width - 1u);
    let y1 = min(y0 + 1u, params.height - 1u);
    let dx = sx - f32(x0); let dy = sy - f32(y0);
    let w_warp = sqrt(max(1.0 - params.lambda * params.lambda, 0.0));
    let plane = params.height * params.width;
    for (var c: u32 = 0u; c < params.channels; c = c + 1u) {
        let base = c * plane;
        let warped = (1.0 - dx) * (1.0 - dy) * prev_latent[base + y0 * params.width + x0]
                   + dx * (1.0 - dy) * prev_latent[base + y0 * params.width + x1]
                   + (1.0 - dx) * dy * prev_latent[base + y1 * params.width + x0]
                   + dx * dy * prev_latent[base + y1 * params.width + x1];
        let idx = base + y * params.width + x;
        out_latent[idx] = w_warp * warped + params.lambda * fresh_latent[idx];
    }
}