TextureExchangeUnit: Precision Retexturing
- TextureExchangeUnit is a module that precisely transfers local textures from a reference while preserving the original geometry, pose, and motion in images or videos.
- It employs a dedicated Texture Remover, jigsaw permutation augmentation, and a conditional diffusion backbone to disentangle texture from structure.
- The architecture ensures high-fidelity retexturing by rigorously maintaining spatial-temporal consistency and reducing inference steps through DMD2 distillation.
The TextureExchangeUnit is a module designed to achieve precise and controllable transfer of local surface textures from a reference image to a target object in either images or videos while strictly preserving the geometric structure, pose, and motion of the source. Introduced as a core component of the Refaçade system (Huang et al., 4 Dec 2025), the TextureExchangeUnit addresses limitations of prior diffusion-based approaches by disentangling texture from structure through architectural decomposition and targeted data augmentation. It combines a dedicated Texture Remover network, a learned jigsaw-permutation augmentation, and a multi-conditional diffusion backbone to facilitate geometry-constrained retexturing at scale.
1. Formal Problem Statement and Conceptual Overview
The TextureExchangeUnit learns the mapping
where denotes the source image or video, is its foreground mask, and is the reference image providing the desired surface texture. The output retains the original geometry, pose, and motion from , but replaces its local texture with that of .
The architecture introduces two critical decompositions:
- A Texture Remover, producing a geometry-only (texture-free) latent from .
- A Jigsaw Permutation module, constructing a patched version of 0 in which global shape is disrupted, but local texture statistics are preserved.
Both outputs are processed by a conditional diffusion backbone, realized as a ControlNet/VACE-style U-Net, yielding 1 with transferred texture and preserved structure.
2. Component Architectures and Dataflow
2.1 Texture Remover
- Network: Video diffusion U-Net based on VACE, comprising 24 transformer blocks (hidden size 1536), with control blocks at layers 2.
- Inputs: VAE-encoded latents of 3 (post-background removal) and per-frame mask 4.
- Outputs: VAE-latents corresponding to a uniform gray (albedo-only) rendering, matching the original camera trajectory and object geometry.
- Training Data: For 72K textured meshes, paired videos with and without texture are rendered under identical conditions, yielding approximately 576K pairs.
- Training Methodology: The main network branch is frozen; only control blocks are updated to learn the mapping from appearance to geometry. Speedup at inference is achieved by DMD2 distillation, reducing sampling from 50 to 3 steps.
2.2 Jigsaw Permutation
- Procedure:
- From 5, extract 6 square patches (default: 7 of image side), excluding patches with 8 background.
- Randomly shuffle and optionally flip these patches.
- Tile patches into a novel canvas, preserving width but changing height.
- Output: 9, which contains only the local texture statistics from the reference.
2.3 Conditional Diffusion Backbone
- Control Branch: For each control block, concatenate latents of background video 0, texture-free video 1, mask 2, and jigsaw reference 3. Each passes through a condition layer, then channels are summed as additive bias per U-Net block.
- Main Branch: At denoising timestep 4, the latent 5 (for frame 0) is prepended with reference latent tokens. Control block hidden states are injected at each resolution.
- Outcome: Geometry and motion are enforced from 6 while local texture derives exclusively from 7.
3. Mathematical Foundations
3.1 Texture Removal via Flow-Matching
Let 8, 9. Sampling 0, 1, define 2, 3. The velocity network 4 is trained to minimize
5
with 6 the VAE-coded source and mask. After DMD2 distillation, the same objective holds with a 3-step sampler.
3.2 Jigsaw Data Augmentation
No loss is imposed on the Jigsaw module beyond standard diffusion training. The transformation 7 forces the network to ignore global reference structure. While a perceptual regularizer could be used,
8
(with 9 e.g. VGG/CLIP), this is not utilized in the implementation.
3.3 Diffusion Loss for Texture Exchange
Overall flow-matching is used for the primary objective: 0 where 1 comprises latents for 2, 3, 4, and 5.
4. Geometry and Motion Preservation
- The Texture Remover is explicitly trained on video pairs differing only in albedo, guaranteeing geometry, pose, and motion consistency between input and texture-free latents.
- In the diffusion backbone, guidance from the frozen 6 and 7 ensures that geometry and fine structural details are enforced in each step.
- Empirical assessment of spatio-temporal consistency employs EWarp (optical-flow-based warping error) without introducing any explicit motion losses into the training regime.
5. Controllability and Structure-Texture Disentanglement
- The Texture Remover eliminates all appearance features from 8, preventing leakage of source textures or colors.
- The Jigsaw module ensures that global spatial structure of the reference is destroyed, so only local appearance statistics influence the output object’s surface.
- The conditional architecture processes input structure and reference through independent condition layers, delaying any cross-modal fusion until late-stage attention mechanisms.
- Classifier-free guidance, enabled by randomly omitting conditioning with 9, permits tuning of the fidelity–flexibility trade-off at inference, modulating influence between strict texture application and environmental realism.
6. Training Protocols and Implementation Details
6.1 Texture Remover Training
Dataset: 576K paired textured/gray videos from 72K mesh identities, each rendered under eight camera/light/motion settings. The Remover is trained with AdamW (learning rate 0, batch size 32) for two epochs, typically totaling 38 hours on 32 NVIDIA A800 GPUs. DMD2 distillation further reduces the inference sampler to three steps (300 steps, 1 LR, batch 8).
6.2 Main Diffusion Model Training
- Stage 1 (Pretraining): 1.8M WebVid-10M videos + 0.9M synthetic SelfForcing videos + 0.8M SD3.5 images with masks; 96×A800 GPUs; global batch 96; 2 LR; 18K steps (~120 hours).
- Stage 2 (Finetuning): 180K Pexels videos; same learning parameters, 2.8K steps on 32 GPUs (~28 hours).
- All training utilizes mixed precision and gradient checkpointing.
6.3 Data Augmentation and Hyperparameters
- Random frame resizing/downsampling.
- Random dropout of conditioning (replace 3 with white, 4 with black) at 5.
- Default Jigsaw patch size: 10% of side; ablations for 5–20% show no major effect.
- Inference resolution: 6 for video (81 frames); arbitrary 7 for single images.
6.4 Best Practices (as recommended by Huang et al. (Huang et al., 4 Dec 2025))
- Train the Texture Remover on strictly aligned paired data.
- Apply aggressive jigsaw shuffling.
- Freeze the diffusion backbone except small control/extraction blocks.
- Use classifier-free guidance at inference to dial the texture-to-background fidelity balance.
- Distill the remover for efficient end-to-end training and inference.
- Evaluate with both per-frame metrics (MSE, PSNR, SSIM, LPIPS), temporal metrics (EWarp), and perceptual metrics (CLIPScore, DINOScore, DreamSim, LLM scoring).
7. Significance and Implementation Implications
The TextureExchangeUnit enables high-fidelity, controllable object retexturing for both images and videos while ensuring geometric and spatio-temporal structure remain unaltered. This is accomplished through architectural and training choices that rigorously disentangle appearance from structure at every stage. The method, as described and evaluated by Huang et al. (Huang et al., 4 Dec 2025), provides a framework for object retexturing tasks that outperforms previous diffusion-based methods in controllability, visual quality, and empirical consistency, without reliance on adversarial or explicit perceptual losses.