Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
NotificationsYou must be signed in to change notification settings

sail-sg/Meta-Unlearning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This repository is the official implementation for the paper:Meta-Unlearning on Diffusion Models:Preventing Relearning Unlearned Concepts

Installation

We follow theDiffuser to install the required dependencies, please run the following commands:

conda create -n meta python=3.10conda activate metapip install --upgrade diffusers[torch]

All experiments are conducted on NVIDIA A100 GPUs with 80GB of memory.

Generate images datasets

First you can use the shell scripts to generatehrm dataset,irt dataset andtarget dataset. In our code, thehrm dataset contains the unlearned concept, while both theirt andtarget dataset contain retain concepts.irt dataset means the concept unrelated to unlearned concept, and thetarget dataset means the concept related to unlearned concept.

Here is the exmaple generate scipt, you can change the text prompt according to your goal.

bash scripts/gen_image.sh

Baseline: unlearning

bash scripts/esd_baseline.shbash scripts/sdd_baseline.sh

UCE andRECE can be trained by the original code in their paper.

Our paradigm: meta-unlearning

For ESD and SDD based meta-unlearning:

bash scripts/esd_meta.shbash scripts/sdd_meta.sh

Note that we only give the example hyperparameter in code and you should change the hyperparameter refer to our paper (We usefix_timesteps = False in our paper, and thefixed_timesteps = True is just used for accelerating training) .

For UCE and RECE based meta-unlearning:

bash scripts/meta.sh

Note that you should change the model path to your unlearned model.

Acknowledgments

This repository is based on the codebase of theSDD. Thanks for their impressive works!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp