Spaces:
Paused
Paused
P01yH3dr0n
commited on
Commit
•
cbde269
1
Parent(s):
9f89f77
fix update_btn
Browse files
app.py
CHANGED
@@ -175,7 +175,7 @@ def rename_save_img(path, payload, save):
|
|
175 |
def update_btn_cost(w, h, s, sm, dyn, i2i_img, i2i_str, inp_img, selection):
|
176 |
if selection == 'i2i' and i2i_img is not None:
|
177 |
cost = calculate_cost(w, h, s, False, False, i2i_str)
|
178 |
-
elif selection == 'inp' and inp_img
|
179 |
cost = calculate_cost(w, h, s, False, False)
|
180 |
else:
|
181 |
cost = calculate_cost(w, h, s, sm, dyn)
|
|
|
175 |
def update_btn_cost(w, h, s, sm, dyn, i2i_img, i2i_str, inp_img, selection):
|
176 |
if selection == 'i2i' and i2i_img is not None:
|
177 |
cost = calculate_cost(w, h, s, False, False, i2i_str)
|
178 |
+
elif selection == 'inp' and inp_img['background'].getextrema()[3][1] > 0:
|
179 |
cost = calculate_cost(w, h, s, False, False)
|
180 |
else:
|
181 |
cost = calculate_cost(w, h, s, sm, dyn)
|