Papers › Improving Text-guided Object Inpainting with Semantic Pre-inpainting

Improving Text-guided Object Inpainting with Semantic Pre-inpainting

12 Sep 2024arXiv:2409.08260archive 2025-07-28

Yifu Chen, Jingwen Chen, Yingwei Pan, Yehao Li, Ting Yao, Zhineng Chen, Tao Mei

Recent years have witnessed the success of large text-to-image diffusion models and their remarkable potential to generate high-quality images. The further pursuit of enhancing the editability of images has sparked significant interest in the downstream task of inpainting a novel object described by a text prompt within a designated region in the image. Nevertheless, the problem is not trivial from two aspects: 1) Solely relying on one single U-Net to align text prompt and visual object across all the denoising timesteps is insufficient to generate desired objects; 2) The controllability of object generation is not guaranteed in the intricate sampling space of diffusion model. In this paper, we propose to decompose the typical single-stage object inpainting into two cascaded processes: 1) semantic pre-inpainting that infers the semantic features of desired objects in a multi-modal feature space; 2) high-fieldity object generation in diffusion latent space that pivots on such inpainted semantic features. To achieve this, we cascade a Transformer-based semantic inpainter and an object inpainting diffusion model, leading to a novel CAscaded Transformer-Diffusion (CAT-Diffusion) framework for text-guided object inpainting. Technically, the semantic inpainter is trained to predict the semantic features of the target object conditioning on unmasked context and text prompt. The outputs of the semantic inpainter then act as the informative visual prompts to guide high-fieldity object generation through a reference adapter layer, leading to controllable object inpainting. Extensive evaluations on OpenImages-V6 and MSCOCO validate the superiority of CAT-Diffusion against the state-of-the-art methods. Code is available at \url{https://github.com/Nnn-s/CATdiffusion}.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2409.08260")

Code

Syntology Ran 6 of 9 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 2 ran · violated contract; 2 ran · our draft was wrong; 2 ran with no contract checked.

By repository: official repository: 9 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

nnn-s/catdiffusion officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 6 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · violated contract
2ran · our draft was wrong
2ran
3unverified

Licence: 0 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from nnn-s/catdiffusion. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

always nnn-s/catdiffusion/ldm/modules/x_transformer.py official repository ran · our draft was wrong MIT (permissive) · fe5dd5258046898c · report
default nnn-s/catdiffusion/ldm/modules/attention.py official repository ran · violated contract MIT (permissive) · 424012cb37b31172 · report
exists nnn-s/catdiffusion/ldm/modules/attention.py official repository ran · violated contract MIT (permissive) · aa5486a3650902d8 · report
isimage nnn-s/catdiffusion/ldm/util.py official repository ran MIT (permissive) · b1368330cf0f5642 · report
ismap nnn-s/catdiffusion/ldm/util.py official repository ran MIT (permissive) · d72762b700feee6f · report
uniq nnn-s/catdiffusion/ldm/modules/attention.py official repository ran · our draft was wrong MIT (permissive) · 9a299fe5ae09e407 · report
get_state_dict nnn-s/catdiffusion/mldm/model.py official repository unverified MIT (permissive) · cfc17707f35e7ec4 · report
load_state_dict nnn-s/catdiffusion/mldm/model.py official repository unverified MIT (permissive) · df733a879693145d · report
log_txt_as_img nnn-s/catdiffusion/ldm/util.py official repository unverified MIT (permissive) · f9bd2e83191afad1 · report

Tasks

DenoisingObject

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

ALIGNAdapterConcatenated Skip ConnectionConvolutionDiffusionInpaintingMax PoolingReLUU-Net

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections