xilluill commited on
Commit
9e58ce5
·
1 Parent(s): 4934d7e

update prompt

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -150,7 +150,7 @@ def edit(brush_canvas,
150
  exif_data[ExifTags.Base.Make] = "Black Forest Labs"
151
  exif_data[ExifTags.Base.Model] = name
152
 
153
- exif_data[ExifTags.Base.ImageDescription] = source_prompt
154
  img.save(fn, exif=exif_data, quality=95, subsampling=0)
155
  masked_image.save(fn.replace(".jpg", "_mask.png"), format='PNG')
156
  t1 = time.perf_counter()
@@ -173,7 +173,7 @@ def create_demo(model_name: str):
173
  <b>Official 🤗 Gradio demo</b> for <a href='https://github.com/Xilluill/KV-Edit' target='_blank'><b>KV-Edit: Training-Free Image Editing for Precise Background Preservation</b></a>.<br>
174
 
175
  💫💫 <b>Here is editing steps:</b> (We highly recommend you run our code locally!😘 Only one inversion before multiple editing, very productive!) <br>
176
- 1️⃣ Upload your image that needs to be edited (The resolution is expected be less than 1360*768.) <br>
177
  2️⃣ Fill in your source prompt and use the brush tool to draw your mask area. <br>
178
  3️⃣ Fill in your target prompt, then adjust the hyperparameters. <br>
179
  4️⃣ Click the "Edit" button to generate your edited image! <br>
 
150
  exif_data[ExifTags.Base.Make] = "Black Forest Labs"
151
  exif_data[ExifTags.Base.Model] = name
152
 
153
+ exif_data[ExifTags.Base.ImageDescription] = target_prompt
154
  img.save(fn, exif=exif_data, quality=95, subsampling=0)
155
  masked_image.save(fn.replace(".jpg", "_mask.png"), format='PNG')
156
  t1 = time.perf_counter()
 
173
  <b>Official 🤗 Gradio demo</b> for <a href='https://github.com/Xilluill/KV-Edit' target='_blank'><b>KV-Edit: Training-Free Image Editing for Precise Background Preservation</b></a>.<br>
174
 
175
  💫💫 <b>Here is editing steps:</b> (We highly recommend you run our code locally!😘 Only one inversion before multiple editing, very productive!) <br>
176
+ 1️⃣ Upload your image that needs to be edited (The resolution must be less than 1360*768 because of memory.🙂) <br>
177
  2️⃣ Fill in your source prompt and use the brush tool to draw your mask area. <br>
178
  3️⃣ Fill in your target prompt, then adjust the hyperparameters. <br>
179
  4️⃣ Click the "Edit" button to generate your edited image! <br>