mayafree commited on
Commit
d9e4b3d
·
verified ·
1 Parent(s): beada36

UI copy to English

Browse files
Files changed (1) hide show
  1. app.py +42 -39
app.py CHANGED
@@ -682,41 +682,44 @@ HERO = """
682
  <div class="hero">
683
  <h1>MiniMax-H3 <span style="opacity:.85">Ultra&nbsp;Fast</span></h1>
684
  <div class="sub">
685
- 프롬프트 줄로 <b>영상과 그에 맞는 소리를 동시에</b> 만듭니다.
686
- 33.1B BF16 트랜스포머를 <b>20.1B NVFP4</b> 가지치기해 96&nbsp;GB Blackwell 한 장에 통째로 올렸고,
687
- 조건 인코더·VAE까지 같은 GPU에 상주시켜 계층별 전송과 원격 인코딩 왕복을 없앴습니다.
 
688
  </div>
689
  <div class="chips">
690
  <span><b>20.1B</b> NVFP4 &nbsp;·&nbsp; 12.5&nbsp;GB</span>
691
- <span>영상 + <b>동기 오디오</b> 동시 생성</span>
692
  <span class="hot">Balanced <b>1.52×</b> &nbsp;35s → 23s</span>
693
- <span>최대 <b>14초</b> · 1536×672까지</span>
694
  <span>ZeroGPU <b>xlarge</b> 96GB</span>
695
  </div>
696
  <div class="links">
697
- <a href="https://huggingface.co/MiniMaxAI/MiniMax-H3" target="_blank" rel="noopener">원본 모델</a>
698
- <a href="https://huggingface.co/lilcheaty/MiniMax-H3-NVFP4" target="_blank" rel="noopener">NVFP4 체크포인트</a>
699
  <a href="https://github.com/NVlabs/Sana/tree/sol-engine/models/minimax_h3" target="_blank" rel="noopener">NVIDIA Sol-Engine</a>
700
- <a href="https://www.minimax.io/blog/minimax-h3" target="_blank" rel="noopener">MiniMax 블로그</a>
701
- <a href="https://huggingface.co/spaces/multimodalart/minimax-h3" target="_blank" rel="noopener">원본 Space</a>
702
  </div>
703
  </div>
704
  """
705
 
706
  FOOT = """
707
  <div class="foot">
708
- <b>가속 모드</b> — <b>Balanced</b> 28 스케줄러 스텝을 유지한 FirstBlockCache(임계 0.08)로 블록 2–50의
709
- 중복 평가만 건너뜁니다. <b>Ultra Fast</b> 궤적을 유지하면서 앵커 사이 잔차를 예측하되 연속 3스텝을 넘기지 않습니다.
710
- <b>Exact</b>는 재사용과 희소 어텐션을 끄고 무손실 커널·레이아웃 최적화만 남깁니다.
711
- 프롬프트→영상 결과를 캐시하지는 않습니다. 요청이 잠재변수에서 시작합니다.<br>
712
- <b>품질 주의</b> 4비트 가중치는 빠른 움직임·눈·손가락·형태 유지에서 아티팩트가 있습니다.
713
- 어려운 장면은 Balanced, 평가가 중요하면 Exact를 쓰십시오.<br>
714
- 구조는 ComfyUI <code>comfy/ldm/minimax/model.py</code>(Apache-2.0), FirstBlockCache·Sol-Attn은
715
- NVIDIA Sol-Engine(Apache-2.0)에서 가져왔습니다. 양자화 체크포인트는
716
- <a href="https://huggingface.co/lilcheaty/MiniMax-H3-NVFP4" target="_blank" rel="noopener">lilcheaty/MiniMax-H3-NVFP4</a>,
717
- MiniMax-H3 가중치는 MiniMax-H3 Community License를 따릅니다.
718
- <a href="https://huggingface.co/spaces/multimodalart/minimax-h3" target="_blank" rel="noopener">multimodalart/minimax-h3</a>의
719
- 파생본이며 원작자는 <a href="https://x.com/realmrfakename" target="_blank" rel="noopener">@realmrfakename</a>입니다.
 
 
720
  </div>
721
  """
722
 
@@ -725,44 +728,44 @@ with gr.Blocks(title="MiniMax-H3 Ultra Fast", theme=gr.themes.Citrus(), css=CSS)
725
 
726
  with gr.Row(equal_height=False):
727
  with gr.Column(scale=5, elem_id="pane_in"):
728
- gr.HTML('<div class="ptitle">◈ 무엇을 만들까요</div>')
729
  prompt = gr.Textbox(
730
- label="프롬프트",
731
  lines=4,
732
- placeholder="장면·움직임·소리를 함께 묘사할수록 좋습니다",
733
  value="A red fox trotting through a snowy pine forest at dawn, snow crunching underfoot",
734
  )
735
- upsample = gr.Checkbox(label="프롬프트 자동 보강 (원격 리라이터 사용)", value=False)
736
  with gr.Row():
737
- image = gr.Image(label=" 프레임 (선택)", type="filepath")
738
- last_image = gr.Image(label="마지막 프레임 (선택)", type="filepath")
739
- run = gr.Button("⚡ 생성", variant="primary", elem_id="run_btn")
740
 
741
- gr.HTML('<div class="ptitle" style="margin-top:18px">◈ 가속 모드</div>')
742
  acceleration = gr.Radio(
743
  show_label=False,
744
  choices=["Ultra Fast", "Balanced", "Exact"],
745
  value="Balanced",
746
  elem_id="accel",
747
- info="Ultra Fast: 앵커 사이 잔차 예측 · Balanced: FirstBlockCache + 시퀀스 Sol-Attn · Exact: 재사용·희소 어텐션 없음",
748
  )
749
 
750
- with gr.Accordion("세부 설정", open=False):
751
- canvas = gr.Dropdown(label="화면 비율 · 해상도", choices=list(CANVASES), value=DEFAULT_CANVAS)
752
- duration = gr.Slider(label="길이 ()", minimum=MIN_UI_DURATION, maximum=MAX_UI_DURATION, step=1, value=5)
753
- steps = gr.Slider(label="스케줄러 스텝", minimum=8, maximum=40, step=1, value=28)
754
- seed = gr.Number(label="시드", value=42, precision=0)
755
 
756
  with gr.Column(scale=7, elem_id="pane_out"):
757
- gr.HTML('<div class="ptitle">◈ 결과영상 + 사운드트랙</div>')
758
  video = gr.Video(show_label=False, elem_id="out_video")
759
  report = gr.Markdown(visible=False, elem_id="report")
760
- with gr.Accordion("보강된 프롬프트", open=False, visible=False) as upsampled_panel:
761
  upsampled = gr.Textbox(show_label=False, lines=8, interactive=False)
762
 
763
  image.upload(_fit_keyframe, [image, canvas], [image, canvas])
764
 
765
- gr.HTML('<div class="ptitle" style="margin-top:22px">◈ 바로 해보기</div>')
766
  gr.Examples(
767
  examples=[
768
  ["A red fox trotting through a snowy pine forest at dawn, snow crunching underfoot", None, None, "1344x768 · 16:9 full"],
@@ -785,7 +788,7 @@ with gr.Blocks(title="MiniMax-H3 Ultra Fast", theme=gr.themes.Citrus(), css=CSS)
785
  api_name="generate",
786
  )
787
 
788
- with gr.Accordion("무엇을 어떻게 빠르게 했나최적화 스택", open=False):
789
  gr.Markdown(OPTIMIZATIONS)
790
  gr.Markdown(TECHNICAL_NOTES)
791
 
 
682
  <div class="hero">
683
  <h1>MiniMax-H3 <span style="opacity:.85">Ultra&nbsp;Fast</span></h1>
684
  <div class="sub">
685
+ One prompt, <b>video and its matching sound generated together</b>.
686
+ The 33.1B BF16 transformer is pruned to <b>20.1B NVFP4</b> so it fits whole on a single 96&nbsp;GB Blackwell
687
+ worker conditioner and both VAEs stay resident beside it, removing layerwise transfers and the remote
688
+ encode round trip.
689
  </div>
690
  <div class="chips">
691
  <span><b>20.1B</b> NVFP4 &nbsp;·&nbsp; 12.5&nbsp;GB</span>
692
+ <span>Video + <b>synchronized audio</b></span>
693
  <span class="hot">Balanced <b>1.52×</b> &nbsp;35s → 23s</span>
694
+ <span>Up to <b>14s</b> · 1536×672</span>
695
  <span>ZeroGPU <b>xlarge</b> 96GB</span>
696
  </div>
697
  <div class="links">
698
+ <a href="https://huggingface.co/MiniMaxAI/MiniMax-H3" target="_blank" rel="noopener">Model</a>
699
+ <a href="https://huggingface.co/lilcheaty/MiniMax-H3-NVFP4" target="_blank" rel="noopener">NVFP4 checkpoint</a>
700
  <a href="https://github.com/NVlabs/Sana/tree/sol-engine/models/minimax_h3" target="_blank" rel="noopener">NVIDIA Sol-Engine</a>
701
+ <a href="https://www.minimax.io/blog/minimax-h3" target="_blank" rel="noopener">MiniMax blog</a>
702
+ <a href="https://huggingface.co/spaces/multimodalart/minimax-h3" target="_blank" rel="noopener">Original Space</a>
703
  </div>
704
  </div>
705
  """
706
 
707
  FOOT = """
708
  <div class="foot">
709
+ <b>Acceleration modes</b> — <b>Balanced</b> keeps all 28 scheduler steps and uses FirstBlockCache (threshold 0.08)
710
+ to skip only redundant evaluations of blocks 2–50. <b>Ultra Fast</b> preserves the scheduler trajectory but
711
+ forecasts the joint residual between exact anchors, never more than three consecutive steps. <b>Exact</b> disables
712
+ block reuse and sparse attention while keeping the lossless kernel and layout optimizations.
713
+ No prompt-to-video result cache is used every request starts from fresh latents.<br>
714
+ <b>Quality note</b> — 4-bit weights can show more artifacts in fast motion, eyes, fingers and shape retention.
715
+ Use Balanced for difficult scenes, Exact when every requested evaluation matters.<br>
716
+ Model structure follows ComfyUI's <code>comfy/ldm/minimax/model.py</code> (Apache-2.0); FirstBlockCache and
717
+ Sol-Attn are adapted from NVIDIA Sol-Engine (Apache-2.0). Quantized checkpoint from
718
+ <a href="https://huggingface.co/lilcheaty/MiniMax-H3-NVFP4" target="_blank" rel="noopener">lilcheaty/MiniMax-H3-NVFP4</a>.
719
+ MiniMax-H3 weights remain governed by the MiniMax-H3 Community License Agreement.
720
+ An optimized derivative of
721
+ <a href="https://huggingface.co/spaces/multimodalart/minimax-h3" target="_blank" rel="noopener">multimodalart/minimax-h3</a>
722
+ by <a href="https://x.com/realmrfakename" target="_blank" rel="noopener">@realmrfakename</a>.
723
  </div>
724
  """
725
 
 
728
 
729
  with gr.Row(equal_height=False):
730
  with gr.Column(scale=5, elem_id="pane_in"):
731
+ gr.HTML('<div class="ptitle">◈ What to generate</div>')
732
  prompt = gr.Textbox(
733
+ label="Prompt",
734
  lines=4,
735
+ placeholder="Describe the scene, the motion and the sound together",
736
  value="A red fox trotting through a snowy pine forest at dawn, snow crunching underfoot",
737
  )
738
+ upsample = gr.Checkbox(label="Upsample prompt (remote rewriter)", value=False)
739
  with gr.Row():
740
+ image = gr.Image(label="First frame (optional)", type="filepath")
741
+ last_image = gr.Image(label="Last frame (optional)", type="filepath")
742
+ run = gr.Button("⚡ Generate", variant="primary", elem_id="run_btn")
743
 
744
+ gr.HTML('<div class="ptitle" style="margin-top:18px">◈ Acceleration</div>')
745
  acceleration = gr.Radio(
746
  show_label=False,
747
  choices=["Ultra Fast", "Balanced", "Exact"],
748
  value="Balanced",
749
  elem_id="accel",
750
+ info="Ultra Fast: bounded residual forecasting · Balanced: FirstBlockCache + long-sequence Sol-Attn · Exact: dense, no reuse",
751
  )
752
 
753
+ with gr.Accordion("Advanced options", open=False):
754
+ canvas = gr.Dropdown(label="Canvas", choices=list(CANVASES), value=DEFAULT_CANVAS)
755
+ duration = gr.Slider(label="Duration (s)", minimum=MIN_UI_DURATION, maximum=MAX_UI_DURATION, step=1, value=5)
756
+ steps = gr.Slider(label="Scheduler steps", minimum=8, maximum=40, step=1, value=28)
757
+ seed = gr.Number(label="Seed", value=42, precision=0)
758
 
759
  with gr.Column(scale=7, elem_id="pane_out"):
760
+ gr.HTML('<div class="ptitle">◈ Resultvideo + soundtrack</div>')
761
  video = gr.Video(show_label=False, elem_id="out_video")
762
  report = gr.Markdown(visible=False, elem_id="report")
763
+ with gr.Accordion("Upsampled prompt", open=False, visible=False) as upsampled_panel:
764
  upsampled = gr.Textbox(show_label=False, lines=8, interactive=False)
765
 
766
  image.upload(_fit_keyframe, [image, canvas], [image, canvas])
767
 
768
+ gr.HTML('<div class="ptitle" style="margin-top:22px">◈ Try one</div>')
769
  gr.Examples(
770
  examples=[
771
  ["A red fox trotting through a snowy pine forest at dawn, snow crunching underfoot", None, None, "1344x768 · 16:9 full"],
 
788
  api_name="generate",
789
  )
790
 
791
+ with gr.Accordion("How the speedups composeoptimization stack", open=False):
792
  gr.Markdown(OPTIMIZATIONS)
793
  gr.Markdown(TECHNICAL_NOTES)
794