Training-Free Constrained Generation With Stable Diffusion Models

S. Zampini, Jacob K. Christopher, Luca Oneto, D. Anguita, Ferdinando Fioretto
2/1/2025
23 citations
diffusion-flow

Official code: RAISELab-atUVA/Constrained-Stable-Diffusion (8 stars, Python, last commit 2025-12-01).

Abstract

Stable diffusion models represent the state-of-the-art in data synthesis across diverse domains and hold transformative potential for applications in science and engineering, e.g., by facilitating the discovery of novel solutions and simulating systems that are computationally intractable to model explicitly. While there is increasing effort to incorporate physics-based constraints into generative models, existing techniques are either limited in their applicability to latent diffusion frameworks or lack the capability to strictly enforce domain-specific constraints.

Show full abstract

To address this limitation this paper proposes a novel integration of stable diffusion models with constrained optimization frameworks, enabling the generation of outputs satisfying stringent physical and functional requirements. The effectiveness of this approach is demonstrated through material design experiments requiring adherence to precise morphometric properties, challenging inverse design tasks involving the generation of materials inducing specific stress-strain responses, and copyright-constrained content generation tasks. All code has been released at https://github.com/RAISELab-atUVA/Constrained-Stable-Diffusion.

View on arXivView PDF

Code Implementations(1)

Official implementation of Training-Free Constrained Generation With Stable Diffusion Models (NeurIPS 2025 Spotlight)

81Python, DockerfileOct 8, 20251 years ago

Similar Papers

Cite this paper

@article{zampini2025trainingfree,
  title  = {Training-Free Constrained Generation With Stable Diffusion Models},
  author = {S. Zampini and Jacob K. Christopher and Luca Oneto and D. Anguita and Ferdinando Fioretto},
  year   = {2025},
  eprint = {2502.05625},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2502.05625},
  url    = {https://doi.org/10.48550/arXiv.2502.05625},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.05625.svg)](https://codeofpaper.com/paper/2502.05625)

Discussion