TaliDror commited on
Commit ·
38761d7
1
Parent(s): 533e7ef
improved UI
Browse files
app.py
CHANGED
|
@@ -389,6 +389,7 @@ DEFAULT_SELECTION_METHOD = SELECTION_METHODS[0]
|
|
| 389 |
#107, 119
|
| 390 |
GENERATION_SEEDS = [42, 48, 56, 63, 74, 84, 86, 107, 119, 124, 125, 127, 128, 129]
|
| 391 |
INTERNAL_SAMPLES = len(GENERATION_SEEDS)
|
|
|
|
| 392 |
|
| 393 |
@spaces.GPU(duration=120)
|
| 394 |
def generate(audio_path, num_display, guidance_scale, num_inference_steps, base_seed, selection_method=DEFAULT_SELECTION_METHOD):
|
|
@@ -444,7 +445,7 @@ def generate(audio_path, num_display, guidance_scale, num_inference_steps, base_
|
|
| 444 |
else:
|
| 445 |
best = select_best_images(pairs, int(num_display))
|
| 446 |
|
| 447 |
-
return [(img, f"Seed: {seed}") for img, seed in best], ""
|
| 448 |
|
| 449 |
# ---------------------------------------------------------------------------
|
| 450 |
# Model loading
|
|
@@ -530,7 +531,7 @@ def build_demo():
|
|
| 530 |
"4. After a few seconds, the generated images will be displayed on the right."
|
| 531 |
)
|
| 532 |
|
| 533 |
-
DEFAULT_NUM_DISPLAY =
|
| 534 |
DEFAULT_GUIDANCE_SCALE = 2.2
|
| 535 |
DEFAULT_NUM_STEPS = 25
|
| 536 |
DEFAULT_BASE_SEED = 42
|
|
|
|
| 389 |
#107, 119
|
| 390 |
GENERATION_SEEDS = [42, 48, 56, 63, 74, 84, 86, 107, 119, 124, 125, 127, 128, 129]
|
| 391 |
INTERNAL_SAMPLES = len(GENERATION_SEEDS)
|
| 392 |
+
SHOW_SEED_CAPTIONS = False
|
| 393 |
|
| 394 |
@spaces.GPU(duration=120)
|
| 395 |
def generate(audio_path, num_display, guidance_scale, num_inference_steps, base_seed, selection_method=DEFAULT_SELECTION_METHOD):
|
|
|
|
| 445 |
else:
|
| 446 |
best = select_best_images(pairs, int(num_display))
|
| 447 |
|
| 448 |
+
return [(img, f"Seed: {seed}") if SHOW_SEED_CAPTIONS else img for img, seed in best], ""
|
| 449 |
|
| 450 |
# ---------------------------------------------------------------------------
|
| 451 |
# Model loading
|
|
|
|
| 531 |
"4. After a few seconds, the generated images will be displayed on the right."
|
| 532 |
)
|
| 533 |
|
| 534 |
+
DEFAULT_NUM_DISPLAY = 3
|
| 535 |
DEFAULT_GUIDANCE_SCALE = 2.2
|
| 536 |
DEFAULT_NUM_STEPS = 25
|
| 537 |
DEFAULT_BASE_SEED = 42
|