InstantSwap: Fast Customized Concept Swapping across Sharp Shape Differences

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhu, Chenyang, Li, Kai, Ma, Yue, Tang, Longxiang, Fang, Chengyu, Chen, Chubin, Chen, Qifeng, Li, Xiu
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917854138335232
author Zhu, Chenyang
Li, Kai
Ma, Yue
Tang, Longxiang
Fang, Chengyu
Chen, Chubin
Chen, Qifeng
Li, Xiu
author_facet Zhu, Chenyang
Li, Kai
Ma, Yue
Tang, Longxiang
Fang, Chengyu
Chen, Chubin
Chen, Qifeng
Li, Xiu
contents Recent advances in Customized Concept Swapping (CCS) enable a text-to-image model to swap a concept in the source image with a customized target concept. However, the existing methods still face the challenges of inconsistency and inefficiency. They struggle to maintain consistency in both the foreground and background during concept swapping, especially when the shape difference is large between objects. Additionally, they either require time-consuming training processes or involve redundant calculations during inference. To tackle these issues, we introduce InstantSwap, a new CCS method that aims to handle sharp shape disparity at speed. Specifically, we first extract the bbox of the object in the source image automatically based on attention map analysis and leverage the bbox to achieve both foreground and background consistency. For background consistency, we remove the gradient outside the bbox during the swapping process so that the background is free from being modified. For foreground consistency, we employ a cross-attention mechanism to inject semantic information into both source and target concepts inside the box. This helps learn semantic-enhanced representations that encourage the swapping process to focus on the foreground objects. To improve swapping speed, we avoid computing gradients at each timestep but instead calculate them periodically to reduce the number of forward passes, which improves efficiency a lot with a little sacrifice on performance. Finally, we establish a benchmark dataset to facilitate comprehensive evaluation. Extensive evaluations demonstrate the superiority and versatility of InstantSwap. Project Page: https://instantswap.github.io/
format Preprint
id arxiv_https___arxiv_org_abs_2412_01197
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle InstantSwap: Fast Customized Concept Swapping across Sharp Shape Differences
Zhu, Chenyang
Li, Kai
Ma, Yue
Tang, Longxiang
Fang, Chengyu
Chen, Chubin
Chen, Qifeng
Li, Xiu
Computer Vision and Pattern Recognition
Artificial Intelligence
Recent advances in Customized Concept Swapping (CCS) enable a text-to-image model to swap a concept in the source image with a customized target concept. However, the existing methods still face the challenges of inconsistency and inefficiency. They struggle to maintain consistency in both the foreground and background during concept swapping, especially when the shape difference is large between objects. Additionally, they either require time-consuming training processes or involve redundant calculations during inference. To tackle these issues, we introduce InstantSwap, a new CCS method that aims to handle sharp shape disparity at speed. Specifically, we first extract the bbox of the object in the source image automatically based on attention map analysis and leverage the bbox to achieve both foreground and background consistency. For background consistency, we remove the gradient outside the bbox during the swapping process so that the background is free from being modified. For foreground consistency, we employ a cross-attention mechanism to inject semantic information into both source and target concepts inside the box. This helps learn semantic-enhanced representations that encourage the swapping process to focus on the foreground objects. To improve swapping speed, we avoid computing gradients at each timestep but instead calculate them periodically to reduce the number of forward passes, which improves efficiency a lot with a little sacrifice on performance. Finally, we establish a benchmark dataset to facilitate comprehensive evaluation. Extensive evaluations demonstrate the superiority and versatility of InstantSwap. Project Page: https://instantswap.github.io/
title InstantSwap: Fast Customized Concept Swapping across Sharp Shape Differences
topic Computer Vision and Pattern Recognition
Artificial Intelligence
url https://arxiv.org/abs/2412.01197