FreeQR: Free Lunch for Aesthetic QR Code Emerges from the Latent Space in Diffusion Models

Yiwei Yang, Jun Jia, Zheyuan Liu, Zhongpai Gao, Yunhao Li, Wei Sun, Guangtao Zhai

Abstract

In the modern digital age, Quick Response (QR) codes serve as a critical interface for bridging the physical and virtual worlds, widely utilized in multimedia applications. However, traditional binary QR codes often lack the visual appeal desired in contexts. Aesthetic QR codes address this limitation by enabling the customization of QR code patterns to enhance visual attractiveness while retaining compatibility with standard QR decoders. Previous works have explored the use of diffusion models for generating such codes but often require extensive training of ControlNets and face challenges in maintaining scannability. To address these issues, we present FreeQR, a streamlined and effective approach that enables the stable generation of QR code images with diffusion models. Our methodology involves the strategic fusion between the specific channel in the latent space of the denoising process with the noised latent representations of the QR blueprint image at corresponding timesteps. This ensures that the generated images adhere to the brightness distribution required for effective scanning while achieving a balance between aesthetics and functionality. Additionally, we introduce gradient guidance based on scanning errors directly in the latent space, enabling the generation of scannable QR codes in seconds without additional model parameters. Experimental results demonstrate that FreeQR significantly enhances the aesthetics and scannability of QR codes compared to existing methods, making it a lightweight and efficient solution for multimedia applications.
BibTeX
@article{yang2026freeqr,
  author = {Yiwei Yang and Jun Jia and Zheyuan Liu and Zhongpai Gao and Yunhao Li and Wei Sun and Guangtao Zhai},
  title = {{FreeQR: Free Lunch for Aesthetic QR Code Emerges from the Latent Space in Diffusion Models}},
  journal = {IEEE Transactions on Multimedia},
  year = {2026},
  doi = {10.1109/tmm.2026.3668595},
}

Loading related content...

Figure