Spaces:
Runtime error
Runtime error
fix bug
Browse files- app.py +1 -1
- models/kv_edit.py +1 -1
app.py
CHANGED
|
@@ -217,7 +217,7 @@ def create_demo(model_name: str):
|
|
| 217 |
3️⃣ Fill in your target prompt, then adjust the hyperparameters. <br>
|
| 218 |
4️⃣ Click the "Edit" button to generate your edited image! <br>
|
| 219 |
|
| 220 |
-
🔔🔔 [<b>Important</b>] Less skip steps, "re_init" and "attn_mask" will enhance the editing performance, making the results aligned with your text but may lead to discontinuous images. <br>
|
| 221 |
If you fail because of these three, we recommend trying to increase "attn_scale" to increase attention between mask and background.<br>
|
| 222 |
"""
|
| 223 |
article = r"""
|
|
|
|
| 217 |
3️⃣ Fill in your target prompt, then adjust the hyperparameters. <br>
|
| 218 |
4️⃣ Click the "Edit" button to generate your edited image! <br>
|
| 219 |
|
| 220 |
+
🔔🔔 [<b>Important</b>] 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. <br>
|
| 221 |
If you fail because of these three, we recommend trying to increase "attn_scale" to increase attention between mask and background.<br>
|
| 222 |
"""
|
| 223 |
article = r"""
|
models/kv_edit.py
CHANGED
|
@@ -209,7 +209,7 @@ class Flux_kv_edit(only_Flux):
|
|
| 209 |
|
| 210 |
h = opts.height // 8
|
| 211 |
w = opts.width // 8
|
| 212 |
-
|
| 213 |
mask = F.interpolate(mask, size=(h,w), mode='bilinear', align_corners=False)
|
| 214 |
mask[mask > 0] = 1
|
| 215 |
|
|
|
|
| 209 |
|
| 210 |
h = opts.height // 8
|
| 211 |
w = opts.width // 8
|
| 212 |
+
L = h * w // 4
|
| 213 |
mask = F.interpolate(mask, size=(h,w), mode='bilinear', align_corners=False)
|
| 214 |
mask[mask > 0] = 1
|
| 215 |
|