Update app.py
Browse files134 unmodified lines13513613713813813914014147 unmodified lines189190191192193194195196197198199200201202203204205206207208201 unmodified lines410411412413414415416698 unmodified lines1115111611171118111911201121134 unmodified linesFPS, FRAMES_PER_CHUNK, LATENTS_PER_CHUNK = 24, 17, 5# It is the *snapped* frame count the ceiling has to hold for: 15 s is 360 frames, which rounds up to 362, i.e.# 15.083 s, and is refused.MIN_UI_DURATION, MAX_UI_DURATION = 2, 14MIN_UI_DURATION, MAX_UI_DURATION = 2, 30
SAMPLERS = { "euler": "euler",47 unmodified lines
MiniMaxH3ModularPipeline.min_duration = property(lambda self: float(seconds))
def raise_duration_ceiling(seconds: float = MAX_UI_DURATION) -> None: """Let the pipeline generate past its 15 s ceiling — experimental, past what MiniMax-H3 was trained/released at. `min_duration`/`max_duration` are the only place either bound is read (`before_denoise.py`'s validation step, `if not min_duration <= duration <= max_duration: raise ValueError`), and nothing architectural depends on the value: MiniMax-H3's RoPE computes `inv_freq` on the fly from arbitrary `position_ids`, not a fixed-size precomputed table, so there's no hard wraparound past 15 s — just untested territory, expect drift, looping, or identity loss rather than a clean extrapolation. Same technique as `lower_duration_floor`, the ceiling side. """ from diffusers.modular_pipelines.minimax_h3.modular_pipeline import MiniMaxH3ModularPipeline
MiniMaxH3ModularPipeline.max_duration = property(lambda self: float(seconds))
# `load_lora_adapter` requires every key (weights and `network_alphas` alike) to share a `prefix` whenever# `network_alphas` is passed — `prefix=None` with a non-empty `network_alphas` is a hard error. This string is# arbitrary (it's stripped off immediately, and the transformer itself has no `transformer.`-prefixed attribute)201 unmodified lines from h3_split_blocks import MiniMaxH3GeneratorBlocks
lower_duration_floor() raise_duration_ceiling() manager = ComponentsManager() blocks = MiniMaxH3GeneratorBlocks() print(f"[gen] loading {[c.name for c in blocks.expected_components]} from {MODEL_REPO} ...", flush=True)698 unmodified lines maximum=MAX_UI_DURATION, step=1, value=5, info="Unstable past 15 seconds.", ) steps = gr.Slider( label="Steps",app.py+17-1