Skip to content

Commit cbf4cbd

Browse files
justinchubyCopilotCopilot
authored
Prevent incomplete hierarchical audio metadata exports (#537)
## Summary - detect global-frame/local-codebook/flow/vocoder packages before generic diffusion dispatch and refuse incomplete ordinary-diffusion metadata - document the official local RVQ loop as stateless growing-length recomputation rather than inventing a second KV cache - support fully offline exports from pinned local diffusers/modular-pipeline checkouts, including local component configs, optional scheduler metadata, and sharded weights The offline path is required for the 54 GB pinned checkpoint: it avoids mutable/repeated Hub lookups after provenance is fixed and enables H200 validation from the required catalogue directory. ## Real checkpoint evidence - pinned HF revision: `fbdf52fbaaca799592917417eb05f1899f1255ec` - real LFS payload downloaded: 54 GB weights / 107 GB checkout - fp16 ONNX neural-component export completed: 27 GB at `/datadisks/disk1/justinchu/inference-metadata-catalogue/minimax-music3/onnx-components-f16` - representative source/export value check: `model.layers.0.input_layernorm.weight` max abs delta `2.98e-08`, correlation `0.9999999999998486`, identical L2 norm This is real-weight export evidence, not L4/L5 runtime evidence. No package has been published. ## Validation - `python3 -m pytest src/mobius/integrations/diffusers/_builder_test.py -q --tb=short` (37 passed) - graph-only build of all 11 Music3 ONNX artifacts from the local pinned checkout - full fp16 weighted export completed successfully Part of #504. Canonical nested workflow emission remains the next producer commit; the guard intentionally stays fail-closed until that executable workflow exists. --------- Signed-off-by: justinchuby <[email protected]> Signed-off-by: Justin Chu <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: justinchuby <[email protected]>
1 parent c97035c commit cbf4cbd

21 files changed

Lines changed: 6325 additions & 41 deletions

‎src/mobius/components/_rotary_embedding.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ def forward(self, op: OpBuilder, position_ids: ir.Value):
313313
return self._cast_embeddings(op, cos, sin)
314314

315315

316-
def yarn_apply_mscale(rope_type: str | None, rope_scaling: dict | None, scaling: float) -> float:
316+
def yarn_apply_mscale(
317+
rope_type: str | None, rope_scaling: dict | None, scaling: float
318+
) -> float:
317319
"""Apply the DeepSeek-V2/V3 YaRN attention-softmax scale correction.
318320
319321
This mirrors HuggingFace's ``yarn_apply_mscale`` in

‎src/mobius/generation/__init__.py‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@
55

66
from __future__ import annotations
77

8+
from mobius.generation._hierarchical_audio import (
9+
build_acoustic_code_frame,
10+
build_autoregressive_audio_initializer,
11+
build_candidate_token_map,
12+
build_chunk_carry_update,
13+
build_chunk_overlap_prepare,
14+
build_chunk_plan,
15+
build_chunk_slice,
16+
build_codebook_embedding_id,
17+
build_drop_first_frame,
18+
build_embedding_sum,
19+
build_flow_guidance,
20+
build_flow_model_inputs,
21+
build_frame_hidden_append,
22+
build_guided_vocabulary_slice,
23+
build_last_sequence_value,
24+
build_local_codebook_select,
25+
build_local_rvq_append,
26+
build_local_rvq_initializer,
27+
build_overlap_blend,
28+
build_request_continue,
29+
build_waveform_stitch,
30+
)
831
from mobius.generation._policy_components import (
932
SOLVER_BUILDERS,
1033
PolicyCapabilities,
@@ -93,16 +116,25 @@
93116
"PolicyCapabilities",
94117
"PolicyComponent",
95118
"attach_policy_components",
119+
"build_acoustic_code_frame",
96120
"build_adaptive_k_policy",
121+
"build_autoregressive_audio_initializer",
97122
"build_batch_minimum",
98123
"build_boolean_not",
99124
"build_code_frame_update",
100125
"build_code_history_append",
126+
"build_candidate_token_map",
127+
"build_chunk_carry_update",
128+
"build_chunk_overlap_prepare",
129+
"build_chunk_plan",
130+
"build_chunk_slice",
131+
"build_codebook_embedding_id",
101132
"build_codec_layout_transpose",
102133
"build_counter_rng_normal",
103134
"build_ddim_solver_step",
104135
"build_decoder_state_initializer",
105136
"build_decoder_step_update",
137+
"build_drop_first_frame",
106138
"build_duplex_agent_frame_select",
107139
"build_duplex_cell_to_frame",
108140
"build_duplex_frame_assemble",
@@ -118,9 +150,14 @@
118150
"build_eos_termination",
119151
"build_euler_model_input",
120152
"build_euler_solver_step",
153+
"build_embedding_sum",
121154
"build_flow_match_solver_step",
155+
"build_flow_guidance",
156+
"build_flow_model_inputs",
157+
"build_frame_hidden_append",
122158
"build_grammar_logits_processor",
123159
"build_greedy_sampler",
160+
"build_guided_vocabulary_slice",
124161
"build_guidance_combine",
125162
"build_image_dimensions",
126163
"build_image_grid_positions",
@@ -131,9 +168,15 @@
131168
"build_integer_row_broadcast",
132169
"build_iteration_cast",
133170
"build_last_token_logits",
171+
"build_last_sequence_value",
172+
"build_local_codebook_select",
173+
"build_local_rvq_append",
174+
"build_local_rvq_initializer",
134175
"build_masked_token_update",
135176
"build_model_token_cast",
136177
"build_multistep_solver_step",
178+
"build_overlap_blend",
179+
"build_request_continue",
137180
"build_pack_latents_2x2",
138181
"build_proposal_metrics",
139182
"build_scalar_constant",
@@ -166,6 +209,7 @@
166209
"build_video_latent_initializer",
167210
"build_video_latent_permute",
168211
"build_video_latent_unscale",
212+
"build_waveform_stitch",
169213
"build_x0_flow_velocity",
170214
"build_zeros_like",
171215
"rotary_axis_count",

0 commit comments

Comments
 (0)