paper-with-me

홈 › Papers

Towards SFW sampling for diffusion models via external conditioning

2025-05-12 · Camilo Carvajal Reyes, Joaquín Fontbona, Felipe Tobar

Score-based generative models (SBM), also known as diffusion models, are the de facto state of the art for image synthesis. Despite their unparalleled performance, SBMs have recently been in the spotlight for being tricked into creating not-safe-for-work (NSFW) content, such as violent images and non-consensual nudity. Current approaches that prevent unsafe generation are based on the models' own knowledge, and the majority of them require fine-tuning. This article explores the use of external sources for ensuring safe outputs in SBMs. Our safe-for-work (SFW) sampler implements a Conditional Trajectory Correction step that guides the samples away from undesired regions in the ambient space using multimodal models as the source of conditioning. Furthermore, using Contrastive Language Image Pre-training (CLIP), our method admits user-defined NSFW classes, which can vary in different settings. Our experiments on the text-to-image SBM Stable Diffusion validate that the proposed SFW sampler effectively reduces the generation of explicit content while being competitive with other fine-tuning-based approaches, as assessed via independent NSFW detectors. Moreover, we evaluate the impact of the SFW sampler on image quality and show that the proposed correction scheme comes at a minor cost with negligible effect on samples not needing correction. Our study confirms the suitability of the SFW sampler towards aligned SBM models and the potential of using model-agnostic conditioning for the prevention of unwanted images.

📄 PDF Abstract BibTeX arXiv:2505.08817

Code (1)

camilocarvajalreyes/sfws-stable-diffusion 공식 구현 pytorch

Tasks

Image Generation

Methods 이 논문이 사용한 방법론

Diffusion Diffusion models generate samples by gradually removing noise from a signal, and their training objective can be expressed as a reweighted variational lower-bound…

Similar Papers 제목 키워드 기반

CADS: Unleashing the Diversity of Diffusion Models through Condition-Annealed Sampling

2023-10-26 · Seyedmorteza Sadat, Jakob Buhmann, Derek Bradley, Otmar Hilliges 외

While conditional diffusion models are known to have good coverage of the data distribution, they still face limitations in output diversity, particularly when sampled with a high classifier-free guidance scale for optim…

AttributeDiversityImage Generation

An Empirical Study of Sampling Hyperparameters in Diffusion-Based Super-Resolution

2025-12-19 · Yudhistira Arief Wibowo arxiv

Diffusion models have shown strong potential for solving inverse problems such as single-image super-resolution, where a high-resolution image is recovered from a low-resolution observation using a pretrained uncondition…

Image Super-Resolution

Diffusion Posterior Sampling for Super-Resolution under Gaussian Measurement Noise

2025-12-25 · Abu Hanif Muhammad Syarubany arxiv

This report studies diffusion posterior sampling (DPS) for single-image super-resolution (SISR) under a known degradation model. We implement a likelihood-guided sampling procedure that combines an unconditional diffusio…

Image Super-Resolution

A Plug-in Interpretation of Conditioning in Score-Based Diffusion Models

2026-08-19 · Libo Chen, Souvik Ghosh, Teo Deveney, Chris Budd 외 arxiv

We propose a conditioning mechanism for diffusion models based on multi-speed joint diffusion of the target and the condition. The mechanism learns an unconditional joint score network and enforces conditioning at infere…

Conditional Image Generation

Prototype-Guided Diffusion: Visual Conditioning without External Memory

2025-08-13 · Bilal Faye, Hanane Azzag, Mustapha Lebbah arxiv

Diffusion models achieve state-of-the-art image generation but remain computationally costly due to iterative denoising. Latent-space models like Stable Diffusion reduce overhead yet lose fine detail, while retrieval-aug…

Contrastive LearningImage Generation