Spaces:
Running on Zero
Running on Zero
UI copy to English
Browse files
app.py
CHANGED
|
@@ -682,41 +682,44 @@ HERO = """
|
|
| 682 |
<div class="hero">
|
| 683 |
<h1>MiniMax-H3 <span style="opacity:.85">Ultra Fast</span></h1>
|
| 684 |
<div class="sub">
|
| 685 |
-
|
| 686 |
-
33.1B BF16
|
| 687 |
-
|
|
|
|
| 688 |
</div>
|
| 689 |
<div class="chips">
|
| 690 |
<span><b>20.1B</b> NVFP4 · 12.5 GB</span>
|
| 691 |
-
<span>
|
| 692 |
<span class="hot">Balanced <b>1.52×</b> 35s → 23s</span>
|
| 693 |
-
<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">
|
| 698 |
-
<a href="https://huggingface.co/lilcheaty/MiniMax-H3-NVFP4" target="_blank" rel="noopener">NVFP4
|
| 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
|
| 701 |
-
<a href="https://huggingface.co/spaces/multimodalart/minimax-h3" target="_blank" rel="noopener">
|
| 702 |
</div>
|
| 703 |
</div>
|
| 704 |
"""
|
| 705 |
|
| 706 |
FOOT = """
|
| 707 |
<div class="foot">
|
| 708 |
-
<b>
|
| 709 |
-
|
| 710 |
-
|
| 711 |
-
|
| 712 |
-
|
| 713 |
-
|
| 714 |
-
|
| 715 |
-
|
| 716 |
-
|
| 717 |
-
MiniMax-H3
|
| 718 |
-
|
| 719 |
-
|
|
|
|
|
|
|
| 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">◈
|
| 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="
|
| 736 |
with gr.Row():
|
| 737 |
-
image = gr.Image(label="
|
| 738 |
-
last_image = gr.Image(label="
|
| 739 |
-
run = gr.Button("⚡
|
| 740 |
|
| 741 |
-
gr.HTML('<div class="ptitle" style="margin-top:18px">◈
|
| 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:
|
| 748 |
)
|
| 749 |
|
| 750 |
-
with gr.Accordion("
|
| 751 |
-
canvas = gr.Dropdown(label="
|
| 752 |
-
duration = gr.Slider(label="
|
| 753 |
-
steps = gr.Slider(label="
|
| 754 |
-
seed = gr.Number(label="
|
| 755 |
|
| 756 |
with gr.Column(scale=7, elem_id="pane_out"):
|
| 757 |
-
gr.HTML('<div class="ptitle">◈
|
| 758 |
video = gr.Video(show_label=False, elem_id="out_video")
|
| 759 |
report = gr.Markdown(visible=False, elem_id="report")
|
| 760 |
-
with gr.Accordion("
|
| 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">◈
|
| 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("
|
| 789 |
gr.Markdown(OPTIMIZATIONS)
|
| 790 |
gr.Markdown(TECHNICAL_NOTES)
|
| 791 |
|
|
|
|
| 682 |
<div class="hero">
|
| 683 |
<h1>MiniMax-H3 <span style="opacity:.85">Ultra 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 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 · 12.5 GB</span>
|
| 692 |
+
<span>Video + <b>synchronized audio</b></span>
|
| 693 |
<span class="hot">Balanced <b>1.52×</b> 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">◈ Result — video + 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 compose — optimization stack", open=False):
|
| 792 |
gr.Markdown(OPTIMIZATIONS)
|
| 793 |
gr.Markdown(TECHNICAL_NOTES)
|
| 794 |
|