Spaces:
Running on Zero
Running on Zero
Load weights from MiniMaxAI/MiniMax-Music3
#1
by multimodalart HF Staff - opened
README.md
CHANGED
|
@@ -4,9 +4,9 @@ emoji: 🎵
|
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
-
pinned:
|
| 10 |
suggested_hardware: zero-a10g
|
| 11 |
---
|
| 12 |
|
|
@@ -17,8 +17,8 @@ The input surface is a single Suno-inspired custom `gr.HTML` composer (Simple
|
|
| 17 |
chips, structured-caption fields per the official prompting guide) that drives Gradio events via
|
| 18 |
`trigger()`/`props.value`; styling uses only theme CSS vars so it follows the Citrus theme natively.
|
| 19 |
|
| 20 |
-
- Weights: `
|
| 21 |
- AoTI kernels: `diffusers-internal-dev/MiniMax-Music3-aoti` (compiled on RTX Pro 6000, matching ZeroGPU hardware)
|
| 22 |
- Generation streams chunk by chunk with a configurable playback headroom. The 8B language-model stage runs eager
|
| 23 |
on ZeroGPU (its JIT StaticCache ladder needs a persistent process); AoTI-exporting the LM decode step per cache
|
| 24 |
-
bucket is the follow-up that brings the extra ~1.9x.
|
|
|
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 6.24.0
|
| 8 |
app_file: app.py
|
| 9 |
+
pinned: true
|
| 10 |
suggested_hardware: zero-a10g
|
| 11 |
---
|
| 12 |
|
|
|
|
| 17 |
chips, structured-caption fields per the official prompting guide) that drives Gradio events via
|
| 18 |
`trigger()`/`props.value`; styling uses only theme CSS vars so it follows the Citrus theme natively.
|
| 19 |
|
| 20 |
+
- Weights: `MiniMaxAI/MiniMax-Music3`
|
| 21 |
- AoTI kernels: `diffusers-internal-dev/MiniMax-Music3-aoti` (compiled on RTX Pro 6000, matching ZeroGPU hardware)
|
| 22 |
- Generation streams chunk by chunk with a configurable playback headroom. The 8B language-model stage runs eager
|
| 23 |
on ZeroGPU (its JIT StaticCache ladder needs a persistent process); AoTI-exporting the LM decode step per cache
|
| 24 |
+
bucket is the follow-up that brings the extra ~1.9x.
|
app.py
CHANGED
|
@@ -14,7 +14,7 @@ from huggingface_hub import snapshot_download
|
|
| 14 |
from diffusers import ModularPipeline
|
| 15 |
from diffusers.models.modeling_outputs import Transformer2DModelOutput
|
| 16 |
|
| 17 |
-
PIPE = ModularPipeline.from_pretrained("
|
| 18 |
PIPE.load_components(dtype=torch.bfloat16)
|
| 19 |
PIPE.to("cuda")
|
| 20 |
|
|
@@ -1550,16 +1550,31 @@ CSS = """
|
|
| 1550 |
#col-container { max-width: 1300px; margin: 0 auto; }
|
| 1551 |
.dark .gradio-container { color: var(--body-text-color); }
|
| 1552 |
.html-container{padding: 0}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1553 |
"""
|
| 1554 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1555 |
with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
| 1556 |
with gr.Column(elem_id="col-container"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1557 |
gr.Markdown(
|
| 1558 |
-
"
|
| 1559 |
-
"
|
| 1560 |
-
"[[model]](https://huggingface.co/MiniMaxAI/MiniMax-Music3) "
|
| 1561 |
-
"[[project]](https://minimax-ai.github.io/music3-demo/) "
|
| 1562 |
-
"[[
|
| 1563 |
)
|
| 1564 |
with gr.Row():
|
| 1565 |
with gr.Column():
|
|
|
|
| 14 |
from diffusers import ModularPipeline
|
| 15 |
from diffusers.models.modeling_outputs import Transformer2DModelOutput
|
| 16 |
|
| 17 |
+
PIPE = ModularPipeline.from_pretrained("MiniMaxAI/MiniMax-Music3")
|
| 18 |
PIPE.load_components(dtype=torch.bfloat16)
|
| 19 |
PIPE.to("cuda")
|
| 20 |
|
|
|
|
| 1550 |
#col-container { max-width: 1300px; margin: 0 auto; }
|
| 1551 |
.dark .gradio-container { color: var(--body-text-color); }
|
| 1552 |
.html-container{padding: 0}
|
| 1553 |
+
.mm3-logo { display: block; margin: 8px auto 0; width: 500px; max-width: 100%; }
|
| 1554 |
+
.mm3-logo-dark { display: none; }
|
| 1555 |
+
.dark .mm3-logo-light { display: none; }
|
| 1556 |
+
.dark .mm3-logo-dark { display: block; }
|
| 1557 |
"""
|
| 1558 |
|
| 1559 |
+
import base64
|
| 1560 |
+
|
| 1561 |
+
_LOGO_LIGHT_B64 = base64.b64encode(open("logo_light.png", "rb").read()).decode()
|
| 1562 |
+
_LOGO_DARK_B64 = base64.b64encode(open("logo_dark.png", "rb").read()).decode()
|
| 1563 |
+
|
| 1564 |
with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
| 1565 |
with gr.Column(elem_id="col-container"):
|
| 1566 |
+
gr.HTML(
|
| 1567 |
+
'<img src="data:image/png;base64,' + _LOGO_LIGHT_B64 + '" class="mm3-logo mm3-logo-light" alt="MiniMax Music 3">'
|
| 1568 |
+
'<img src="data:image/png;base64,' + _LOGO_DARK_B64 + '" class="mm3-logo mm3-logo-dark" alt="MiniMax Music 3">',
|
| 1569 |
+
container=False,
|
| 1570 |
+
padding=False,
|
| 1571 |
+
)
|
| 1572 |
gr.Markdown(
|
| 1573 |
+
"MiniMax Music 3 is a music generation model designed to support the creation of full-length songs "
|
| 1574 |
+
"[[prompting guide and skill]](https://huggingface.co/spaces/multimodalart/minimax-music3-prompting-guide) | "
|
| 1575 |
+
"[[model]](https://huggingface.co/MiniMaxAI/MiniMax-Music3) | "
|
| 1576 |
+
"[[project]](https://minimax-ai.github.io/music3-demo/) | "
|
| 1577 |
+
"[[run locally with diffusers]](https://github.com/huggingface/diffusers/blob/82319140e0456fd58beff0a251c38825bfc310de/docs/source/en/api/pipelines/minimax_music3.md)"
|
| 1578 |
)
|
| 1579 |
with gr.Row():
|
| 1580 |
with gr.Column():
|