Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -542,7 +542,7 @@ def update_resolution_dropdown(diffusion_enabled, current_resolution_str):
|
|
| 542 |
if (new_h, new_w) not in DEFAULT_DIFFUSION_RESOLUTIONS:
|
| 543 |
new_h, new_w = DEFAULT_DIFFUSION_RESOLUTIONS[0]
|
| 544 |
new_value_str = f"{new_h}x{new_w}"
|
| 545 |
-
return
|
| 546 |
value=new_value_str)
|
| 547 |
else:
|
| 548 |
new_h, new_w = int(current_h) // 2, int(current_w) // 2
|
|
@@ -551,7 +551,7 @@ def update_resolution_dropdown(diffusion_enabled, current_resolution_str):
|
|
| 551 |
new_h, new_w = DEFAULT_RESOLUTIONS[0]
|
| 552 |
new_value_str = f"{new_h}x{new_w}"
|
| 553 |
|
| 554 |
-
return
|
| 555 |
value=new_value_str)
|
| 556 |
|
| 557 |
|
|
|
|
| 542 |
if (new_h, new_w) not in DEFAULT_DIFFUSION_RESOLUTIONS:
|
| 543 |
new_h, new_w = DEFAULT_DIFFUSION_RESOLUTIONS[0]
|
| 544 |
new_value_str = f"{new_h}x{new_w}"
|
| 545 |
+
return dict(choices=[f'{h}x{w}' for h, w in DEFAULT_DIFFUSION_RESOLUTIONS],
|
| 546 |
value=new_value_str)
|
| 547 |
else:
|
| 548 |
new_h, new_w = int(current_h) // 2, int(current_w) // 2
|
|
|
|
| 551 |
new_h, new_w = DEFAULT_RESOLUTIONS[0]
|
| 552 |
new_value_str = f"{new_h}x{new_w}"
|
| 553 |
|
| 554 |
+
return dict(choices=[f'{h}x{w}' for h, w in DEFAULT_RESOLUTIONS],
|
| 555 |
value=new_value_str)
|
| 556 |
|
| 557 |
|