🎨 KV-Edit: Training-Free Image Editing for Precise Background Preservation

Official 🤗 Gradio demo for KV-Edit: Training-Free Image Editing for Precise Background Preservation.

💫💫 Here is editing steps: (We highly recommend you run our code locally!😘 Only one inversion before multiple editing, very productive!)
1️⃣ Upload your image that needs to be edited (The resolution will be scaled to less than 1360*768)
2️⃣ Fill in your source prompt and use the brush tool to cover the area you want to edit (❗️required).
3️⃣ Fill in your target prompt, then adjust the hyperparameters.
4️⃣ Click the "Edit" button to generate your edited image!

🔔🔔 [Important] Less skip steps, "re_init" and "attn_mask" will enhance the editing performance, making the results more aligned with your text but may lead to discontinuous images.
If you fail because of these three, we recommend trying to increase "attn_scale" to increase attention between mask and background.

1 50
Upload an image
or
select the draw tool to start
0 30
1 10
0 5

If our work is helpful, please help to ⭐ the Github Repo. Thanks!