Spaces:
Sleeping
A newer version of the Gradio SDK is available:
5.35.0
title: Click2mask
license: other
license_name: MIT License with Commons Clause Restriction
emoji: 🔵
colorFrom: indigo
colorTo: yellow
sdk: gradio
sdk_version: 5.27.1
app_file: app.py
pinned: false
short_description: Official Demo for Click2Mask (AAAI 2025)
[AAAI 2025] Click2Mask: Local Editing with Dynamic Mask Generation
Official Hugging Face demo for "Click2Mask: Local Editing with Dynamic Mask Generation" (AAAI 2025)
Paper by: Omer Regev, Omri Avrahami, Dani Lischinski

Given an image, a Click, and a prompt for an added object, a Mask is generated dynamically, simultaneously with the object generation throughout the diffusion process.
Current methods rely on existing objects/segments, or user effort (masks/detailed text), to localize object additions. Our approach enables free-form editing, where the manipulated area is not well-defined, using just a Click for localization.
How to Use This Demo
- Upload an image or load example with the button below
- Click on the image where you want to add an object
- Enter a text prompt describing what you want to add
- Click Generate to see your edited image with the dynamically generated mask
Note: This Space provides a simplified demo interface. For full functionality including batch processing and CLI tools (plus this Gradio interface), use the Colab notebook or GitHub.
Examples

Comparison with SOTA Methods

Citation
@misc{regev2024click2masklocaleditingdynamic,
title={Click2Mask: Local Editing with Dynamic Mask Generation},
author={Omer Regev and Omri Avrahami and Dani Lischinski},
year={2024},
eprint={2409.08272},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2409.08272},
}
Acknowledgements
This code is based on Blended Latent Diffusion and Stable Diffusion.