Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Erasing Concepts from Diffusion Models
| Date | Stars |
|---|---|
| 2026-07-31 | 665 |
| 2026-08-06 | 665 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Erasing Concepts from Diffusion Models ### [Project Website](https://erasing.baulab.info) | [Arxiv Preprint](https://arxiv.org/pdf/2303.07345.pdf) | [Fine-tuned Weights](https://erasing.baulab.info/weights/esd_models/) | [Demo](https://huggingface.co/spaces/baulab/Erasing-Concepts-In-Diffusion) <br> ### Updated code 🚀 - Shared diffusers training core <div align='center'> <img src = 'images/applications.png'> </div> ## Code Update 🚀 We are releasing a cleaner code for ESD with diffusers support. Compared to our old-code this version uses almost half the GPU memory and is 5-8 times faster. The training entrypoints for SD, SDXL, and FLUX now share the same core logic, save metadata-aware checkpoints, and can target any compatible base model in the corresponding diffusers family via `--basemodel_id`. <br> To use the older version please visit our [older commit](https://github.com/rohitgandikota/erasing/tree/a2189e9ae677aca22a00c361bde25d3d320d8a61) ## Installation Guide We recently updated our codebase to be much more cleaner and faster. The setup is also simple ```bash git clone https://github.com/rohitgandikota/erasing.git cd erasing conda create --name erasing python=3.14 conda activate erasing pip install -r requirements.txt ``` for FLUX training: ```bash pip install --upgrade diffusers transformers torch ``` ## Training Guide ### SDv1.4 After installation, follow these instructions to train a custom ESD model for Stable Diffusion V1.x. Canonical train methods are `'esd-x'`, `'esd-u'`, `'selfattn'`, `'esd-all'`, and `'esd-x-strict'`. Legacy aliases such as `'xattn'`, `'noxattn'`, and `'full'` still work. ```python python esd_sd.py --erase_concept 'Van Gogh' --train_method 'esd-x' ``` 💡 New application: You can now erase an attribute from a concept!! Instead of erasing a whole concept you can just precisely remove some of its attributes. For example, you can erase hats from cowboys but keep the rest intact! ```python python esd_sd.py --erase_concept 'cowboy hat' --erase_from 'cowboy' --train_method 'esd-x' ``` ### SDXL After installation, follow these instructions to train a custom ESD model for SDXL. Pick from following `'esd-x'`, `'esd-x-strict'`, `'esd-u'`, `'esd-all'` (NOTE: `'esd-u'` and `'esd-all'` are still experimental and might produce unexpected artifacts): ```python python esd_sdxl.py --erase_concept 'Van Gogh' --train_method 'esd-x-strict' ``` ### FLUX After installation (make sure: diffusers and transformers are up-to-date), follow these instructions to train a custom ESD model for FLUX.1-dev. Pick from following `'esd-x'`, `'esd-x-strict'`: ```python python esd_flux.py --erase_concept 'monster' --train_method 'esd-x' --negative_guidance 2 ``` ### FLUX.2 Klein FLUX.2 Klein uses the newer `Flux2KleinPipeline` backbone, so make sure your `diffusers` and `transformers` installs are recent enough for FLUX.2 support. The default base model is `black-forest-labs/FLUX.2-klein-base-4B`, and the new entrypoint keeps the same ESD loss while following the Klein tokenizer / transformer / scheduler flow: ```python python esd_flux2_klein.py --erase_concept 'monster' --train_method 'esd-x' --negative_guidance 2 ``` All four training scripts also accept `--basemodel_id` so you can point them at any compatible diffusers model in that family. The optimization process for erasing undesired visual concepts from pre-trained diffusion model weights involves using a short text description of the concept as guidance. The ESD model is fine-tuned with the conditioned and unconditioned scores obtained from frozen SD model to guide the output away from the concept being erased. The model learns from it's own knowledge to steer the diffusion process away from the undesired concept. <div align='center'> <img src = 'images/ESD.png'> </div> ## Generating Images Generating images from a custom ESD model is super easy. Please follow the notebooks in `notebooks/`. For an automated script to generate a ton of images for your e
Excerpt of 5,804 characters
Read on GitHub65
David Bau · Northeastern University · United States
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:aa9cdc29e07213ee, llm:Repository title and description: 'Erasing Concepts from Diffusion Models' — indicates methods to remove concepts from diffusion generative models (likely model editing/privacy/interpretability). No topics provided.
matched fp:aa9cdc29e07213ee, llm:Repository title and description: 'Erasing Concepts from Diffusion Models' — indicates methods to remove concepts from diffusion generative models (likely model editing/privacy/interpretability). No topics provided.
matched fp:aa9cdc29e07213ee, llm:Repository title and description: 'Erasing Concepts from Diffusion Models' — indicates methods to remove concepts from diffusion generative models (likely model editing/privacy/interpretability). No topics provided.