PhysRemover: A Unified Framework for Physically Realistic Object Removal

Dongxu Yue, Weixuan Jin, Yuhang Yu, Bo Li, Qi Wen, Xinrui Chen, Jinwei Chen, Tianyi Zheng, Hao Zhang, Zhihai He, Chun YuanNeurIPS 2026

TL;DR

When you digitally erase a glowing lantern or a pair of glasses from a photo, standard AI tools leave behind ghostly light on the floor or accidentally hallucinate a brand-new face where the lenses used to be. PhysRemover solves this by treating object removal not as simple "hole-filling," but as counterfactual physics: reconstructing the scene as if the object had never existed. By feeding a diffusion model both the masked and unmasked images side-by-side, it cleanly wipes away complex side effects (like steam, reflections, and emitted light) while preserving the true background behind transparent objects.

What Problem Does This Paper Address?

Objects in the physical world don’t keep to themselves—they cast shadows, bounce light onto walls, send steam into the air, and refract whatever sits behind them. Yet, traditional AI object removal follows a "mask-and-inpaint" paradigm: you draw a mask over an unwanted object, blindfold the model to everything inside that mask, and ask it to guess what belongs in the hole.

This creates two major headaches:

  1. Lingering footprints: Even recent side-effect-aware models usually only look for basic cast shadows and mirror reflections. They miss richer physics like caustics, volumetric steam from a hot mug, or the warm glow of a lamp on pavement.
  2. The transparency trap: If you mask a magnifying glass over a page of text—or eyeglasses on a dog—the mask completely hides the background details visible through the glass. Blinded to what was actually there, standard models destroy the underlying reality and hallucinate something fake.
Figure 1: Physically Realistic Object Removal. The proposed PhysRemover addresses a challenging dual objective: seamlessly eliminating objects and their associated physical side effects, as well as intricate transparent materials, while faithfully preserving the underlying background semantics.

Methods

Built on a Diffusion Transformer (FLUX.1-dev) trained with Conditional Flow Matching and lightweight LoRA adapters, PhysRemover abandons the "blindfold" approach. Instead of just feeding the model a masked image, the authors introduce In-Context Contrastive Guidance (ICCG) and a Learnable Removal Trigger (LRT):

Figure 2: The overview of PhysRemover pipeline. Left: The proposed architecture and the Learnable Removal Trigger. Right: Details of the proposed In-Context Contrastive Guidance.
  • In-Context Contrastive Pairs (New): The model receives both the masked image (showing where the target is) and the original unmasked image (showing what the object is—e.g., transparent glass or a light source—and what lies behind it) encoded into a unified token sequence.
  • Spatially-Aligned RoPE (New): To help the model compare the masked and unmasked inputs pixel-by-pixel without accidentally copying the unwanted object into the final output, both streams are assigned identical 2D spatial coordinates, though their rotary positional encodings (RoPE) are computed separately before attention.
  • Counterfactual Timestep Scheduling (New): Standard Diffusion Transformers apply the current noise timestep $t$ across streams. Because the reference images aren't noisy, PhysRemover pins the conditioning stream's timestep to $t=0$ (completely clean) while denoising the target at $t$. This temporal separation is crucial for peeling away transparent objects while keeping the background intact.
  • Learnable Removal Trigger (New): Text prompts like "remove the object" are surprisingly vague to a neural network. The authors replace text prompts with optimizable task tokens, initializing the visual-semantic branch (CLIP) using the average visual embedding of target objects across the training set.

Training happens in two stages: first learning general structure completion on random masks, then shifting to counterfactual background estimation.

Datasets

Existing datasets rely on naive copy-pasting or small-scale camera captures limited to simple shadows. To fix this, the authors built and used:

  • LAION: Used in Stage 1 training with random masks to teach basic inpainting.
  • PhyTrace (New): A public, 1-megapixel dataset of 10,000 image pairs featuring diverse physical interactions (light emission, steam, reflections, transparency). Raw images are filtered for aesthetics, analyzed by Gemini-3-pro to plan physically rich edits, edited via generative expert models (Nano-Banana), segmented with Grounded-SAM, and verified by both VLMs and humans.
  • PhyTrace-Test & PhyTrace-TP (New Benchmarks): A 500-image test split for general physical removal, plus a 150-image subset (PhyTrace-TP) specifically targeting transparent and semi-transparent objects.

Key Insights and Ideas

  • To erase an object properly, the model has to see it: Masking out an object before feeding it to the network throws away the exact clues needed to undo its presence. Letting the model see that an object is a steaming cup or a clear lens lets it deduce what else in the room needs to change—or stay the same.
  • Telling clean references apart from noisy targets unlocks transparency: In ablation studies, removing the $t=0$ counterfactual timestep caused the sharpest drop in transparent removal quality. Explicitly signaling which tokens represent the "clean reality" prevents the model from lazily retaining the transparent glass structure.
  • Better physics needs a better ruler: Standard pixel metrics miss physical logic, so the authors introduced PhysRM, a VLM-based metric (powered by Gemini-3-Flash) scoring 1–5 on Physical Effects Removal, Completion & Blending, and Object Removal Success.

Key Results

PhysRemover outperforms 13 general inpainting and specialized object-removal baselines across every metric:

  • General & Side-Effect Removal (PhyTrace-Test): Achieves a best-in-class FID of 17.402 (vs. 20.317 for ObjectClear and 22.001 for OmniPaint) and CMMD of 0.106. On PhysRM's 5-point scale, it jumps to 4.528 for Physical Effects Removal, compared to 3.492 for the strongest baseline (GeoRemover).
  • Transparent Object Removal (PhyTrace-TP): Computed strictly inside the masked region to test true background recovery, PhysRemover hits 20.882 dB PSNR and 0.134 DINO similarity distance (improving over ObjectClear’s 19.551 dB and OmniPaint’s 0.184 DINO score). Qualitatively, it cleanly erases magnifying glasses over dense text and eyeglasses over eyes without smudging underlying details.

Limitations and Future Work

Not discussed in the paper. (In the provided main text, the authors do not explicitly detail failure modes or limitations, noting primarily as future/broader potential that PhysRemover naturally extends to artistic styles and unconstrained in-the-wild scenarios, and that PhyTrace will be publicly released to spur further community research.)

Summary updated

Abstract

While diffusion models have revolutionized image generation and editing, achieving physically realistic object removal remains a challenge. Physically realistic object removal posits that if an object ceases to exist, all its directly associated transient physical effects must also vanish. However, existing methods either confine the removal strictly to the masked region or limit "side effects" to simple shadows and reflections, ignoring complex interactions like caustics, emitted light, and volumetric media. Furthermore, they struggle with transparent objects, destroying the underlying background semantics. To bridge these gaps, we formalize the task of physically realistic object removal and propose PhysRemover, a unified framework addressing both the elimination of objects with their physical effects and the handling of transparent materials. Specifically, we incorporate an In-Context Contrastive Guidance mechanism guided by both masked and unmasked image, coupled with a Learnable Removal Trigger. This design effectively resolves the conflict between erasing the object and its physical side effects, and preserving the underlying background. Furthermore, we introduce PhyTrace, a large-scale image dataset capturing diverse physical effects, along with two benchmarks tailored for the proposed task of physically realistic object removal. Additionally, we develop a novel metric, PhysRM, for evaluating object removal quality, establishing a new standard for physically realistic image editing. Extensive experiments demonstrate that PhysRemover effectively eliminates objects and their physical side effects while faithfully preserving the background when removing transparent objects, outperforming existing methods in these challenging settings.
BibTeX
@inproceedings{yue2026physremover,
  author = {Dongxu Yue and Weixuan Jin and Yuhang Yu and Bo Li and Qi Wen and Xinrui Chen and Jinwei Chen and Tianyi Zheng and Hao Zhang and Zhihai He and Chun Yuan},
  title = {{PhysRemover: A Unified Framework for Physically Realistic Object Removal}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=JWm5dYMjFu},
}

Loading related content...

Figure