Swap the Right Identity: Spatio-Temporal Preference Optimization for Identity Swapping
Abstract
Character swapping aims to faithfully transfer a target iden-tity while preserving the source scene layout and pose, yielding visuallyseamless composites. However, existing general image editing methodsoften struggle to simultaneously achieve identity consistency, backgroundpreservation, and pose or structural stability. This challenge is further ex-acerbated by the lack of high-quality character swapping datasets. To ad-dress these challenges, we propose Spatio-Temporal Identity PreferenceAlignment (SIPA) framework, that systematizes diffusion-based pref-erence optimization from both spatial and temporal perspectives. Spa-tially, we introduce Region-Weighted Preference (RWP), which increasesthe weighting of critical regions (e.g., the face or body) during DPOtraining, focusing preference signals on the desired local differences andthereby substantially reducing data dependence while improving train-ing stability. Temporally, we propose Time-Injected Identity Preference(TIP): during low-noise steps, we explicitly inject face-difference cues intothe DPO preference term to further enhance facial identity consistency.In addition, we build and plan to release a two-stage dataset tailoredfor character swapping. Extensive quantitative and qualitative exper-iments demonstrate that SIPA consistently outperforms prior methodsacross identity fidelity, structure preservation, and visual quality, achiev-ing state-of-the-art performance.