multimodalart HF Staff commited on
Commit
4bdd7d9
·
verified ·
1 Parent(s): 06e2317

torchaudio for off-rate reference soundtracks; title, fillable width, slot height

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -377,7 +377,13 @@ def generate(
377
  except gr.Error:
378
  raise
379
  except Exception as error:
380
- raise gr.Error(str(error).strip().splitlines()[-1] if str(error).strip() else repr(error)) from error
 
 
 
 
 
 
381
  condition_seconds = time.time() - conditioned
382
  height, width, num_frames = (int(metadata[key]) for key in ("height", "width", "num_frames"))
383
 
@@ -405,7 +411,7 @@ def generate(
405
 
406
  load_models()
407
 
408
- INTRO = """# MiniMax-H3
409
 
410
  <div align="center">
411
  <a href="https://huggingface.co/MiniMaxAI/MiniMax-H3"><strong>[ model ]</strong></a> &nbsp;
@@ -415,11 +421,11 @@ INTRO = """# MiniMax-H3
415
 
416
  **MiniMax-H3** is a 33B parameter state of the art video generation model that produces video and a
417
  fully synchronized soundtrack (ambience, foley, speech). Bring your own subject, voice or camera move as a
418
- reference — they are read **in tab order**, images then audio then video.
419
  """
420
 
421
  CSS = """
422
- #col-container { max-width: 1180px; margin: 0 auto; }
423
  .dark .gradio-container { color: var(--body-text-color); }
424
  """
425
 
@@ -445,6 +451,9 @@ with gr.Blocks(title="MiniMax-H3 Reference") as demo:
445
  label="Subject, style or scene",
446
  type="filepath",
447
  min_width=180,
 
 
 
448
  visible=index < OPEN_IMAGE_SLOTS,
449
  )
450
  for index in range(MAX_IMAGE_SLOTS)
 
377
  except gr.Error:
378
  raise
379
  except Exception as error:
380
+ # gradio only puts the exception *type* on the wire, so the useful half of a conditioner-side failure is in
381
+ # that Space's logs. Print what did come back here, name the Space, and say where the rest of it is.
382
+ traceback.print_exc()
383
+ raise gr.Error(
384
+ f"The conditioner ({CONDITIONER_SPACE}) failed with `{type(error).__name__}: {error}`. "
385
+ "Its logs carry the full traceback."
386
+ ) from error
387
  condition_seconds = time.time() - conditioned
388
  height, width, num_frames = (int(metadata[key]) for key in ("height", "width", "num_frames"))
389
 
 
411
 
412
  load_models()
413
 
414
+ INTRO = """# MiniMax-H3 Reference
415
 
416
  <div align="center">
417
  <a href="https://huggingface.co/MiniMaxAI/MiniMax-H3"><strong>[ model ]</strong></a> &nbsp;
 
421
 
422
  **MiniMax-H3** is a 33B parameter state of the art video generation model that produces video and a
423
  fully synchronized soundtrack (ambience, foley, speech). Bring your own subject, voice or camera move as a
424
+ reference.
425
  """
426
 
427
  CSS = """
428
+ .main.fillable { max-width: 1250px !important; }
429
  .dark .gradio-container { color: var(--body-text-color); }
430
  """
431
 
 
451
  label="Subject, style or scene",
452
  type="filepath",
453
  min_width=180,
454
+ # Fixed, so a row that wraps to a single slot stays the same size as a full one
455
+ # instead of stretching to the width of the column.
456
+ height=210,
457
  visible=index < OPEN_IMAGE_SLOTS,
458
  )
459
  for index in range(MAX_IMAGE_SLOTS)