Painterly Image Harmonization using Diffusion Model
Lingxiao Lu, Jiangtong Li, Junyan Cao, Li Niu, Liqing Zhang
Abstract
Painterly image harmonization aims to insert photographic objects into paintings and obtain artistically coherent composite images. Previous methods for this task mainly rely on inference optimization or generative adversarial network, but they are either very time-consuming or struggling at fine control of the foreground objects (e.g., texture and content details). To address these issues, we propose a novel Painterly Harmonization stable Diffusion model (PHDiffusion), which includes a lightweight adaptive encoder and a Dual Encoder Fusion (DEF) module. Specifically, the adaptive encoder and the DEF module first stylize foreground features within each encoder. Then, the stylized foreground features from both encoders are combined to guide the harmonization process. During training, besides the noise loss in diffusion model, we additionally employ content loss and two style losses, i.e., AdaIN style loss and contrastive style loss, aiming to balance the trade-off between style migration and content preservation. Compared with the state-of-the-art models from related fields, our PHDiffusion can stylize the foreground more sufficiently and simultaneously retain finer content. Our code and model are available at https://github.com/bcmi/PHDiffusion-Painterly-Image-Harmonization
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 293b0dbf-db99-4d7b-9592-822383ea099bCited by top-tier papers6
- TF-ICON: Diffusion-Based Training-Free Cross-Domain Image CompositionShilin Lu, Yanzhu Liu, Adams Wai-Kin KongICCV 2023 · 214 citations
- Does FLUX Already Know How to Perform Physically Plausible Image Composition?Shilin Lu, Zhuming Lian, Zihan Zhou, Shaocong Zhang et al.ICLR 2026 · 34 citations
- Relightful Harmonization: Lighting-Aware Portrait Background ReplacementMengwei Ren, Wei Xiong, Jae Shin Yoon, Zhixin Shu et al.CVPR 2024 · 17 citations
- Training-and-Prompt-Free General Painterly Harmonization via Zero-Shot Disentenglement on Style and Content ReferencesTeng-Fang Hsiao, Bo-Kai Ruan, Hong-Han ShuaiAAAI 2025 · 6 citations
- Generating Past and Future in Digital Painting ProcessesLvmin Zhang, Chuan Yan, Yuwei Guo, Jinbo Xing et al.SIGGRAPH 2025 · 1 citation
Builds on26
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
- Directly Denoising Diffusion ModelsDan Zhang, Jingjing Wang, Feng LuoICML 2024 · 11,724 citations
Related papers
- FreePIH: Training-Free Painterly Image Harmonization with Diffusion ModelRuibin Li, Jingcai Guo, Qihua Zhou, Song GuoACM MM 2024 · 2 citations
- Progressive Painterly Image Harmonization from Low-Level Styles to High-Level StylesLi Niu, Yan Hong, Junyan Cao, Liqing ZhangAAAI 2024 · 3 citations
- Painterly Image Harmonization in Dual DomainsJunyan Cao, Yan Hong, Li NiuAAAI 2023 · 27 citations
- Painterly Image Harmonization by Learning from Painterly ObjectsLi Niu, Junyan Cao, Yan Hong, Liqing ZhangAAAI 2024 · 2 citations
- Image Harmonization with TransformerZonghui Guo, Dongsheng Guo, Haiyong Zheng, Zhaorui Gu et al.ICCV 2021 · 95 citations
