h3.c icon indicating copy to clipboard operation
h3.c copied to clipboard

Long clips (≥56 frames) render structured noise for some prompts at 480×864 portrait — robust to seed, canvas size, RoPE mode and fast presets; the same prompt renders cleanly at 22 frames

Open php-cpm opened this issue 1 month ago • 0 comments

Environment

  • MacBook Pro, Apple M2 Max, 32 GB unified memory, applegpu_g14s, macOS 26.6.2 (25G83), Metal 4
  • h3-metal 0.1.0-dev, built from main (source downloaded 2026-10-03) with the stock Makefile (make -j8, Apple clang 21.0.0), no local modifications
  • FFmpeg 8.1.2 (Homebrew)
  • Checkpoint: official MiniMaxAI/MiniMax-H3 snapshot, FL2VA/ subtree only, sharded files used as-released (no conversion, no repacking). ./h3 --info -d ./MiniMax-H3:
Device: Apple M2 Max (applegpu_g14s)
  physical memory       32.0 GiB
  recommended GPU set   25.0 GiB
  max Metal buffer      18.7 GiB
  Apple GPU family      8
  Metal 4               yes
Native checkpoint inventory (header-only):
  Qwen3-VL encoder   14 files  1058 tensors   62.133 GiB
  FL2VA DiT          13 files   535 tensors   61.728 GiB
  video VAE           1 files   560 tensors    9.700 GiB
  audio VAE           1 files  1087 tensors    0.564 GiB

Summary

With one specific prompt ("pelican riding a bicycle"), every clip of 56 frames or longer at 480×864 portrait decodes to full-frame structured noise (exit 0, no Metal errors), while the same prompt at 22 frames and a different prompt at 124 frames render cleanly with byte-identical command lines. The failure is deterministic per (prompt, shape, seed) — re-running an identical command reproduces the identical noise pattern — and survives every knob I tried: canvas size, seed, RoPE mode, --layers/--reuse/--token-reduction. A 480×864 × 124-frame run of the cat prompt is clean, so this does not look like a hard shape/token-count limit; it looks like a prompt-conditioning × long-horizon divergence.

Reproduction

Clean baseline (same prompt, 22 frames):

./h3 -d ./MiniMax-H3 --width 480 --height 864 --frames 22 --steps 8 \
  --layers 50 --reuse 1 --ssd-streaming \
  -p "A large white pelican with a bright orange beak rides a vintage red bicycle along a sunlit seaside boardwalk path, webbed feet on the pedals, wings on the handlebars, ocean sparkling behind wooden railings, golden hour light, camera tracks smoothly alongside at wheel level, feathers ruffling in the breeze, cinematic, ultra detailed" \
  -o outputs/pelican_22f.mp4

→ clean pelican-on-bicycle video+audio, 0.925 s.

Failing (same prompt, long clip — only --frames changed):

./h3 -d ./MiniMax-H3 --width 480 --height 864 --frames 120 --steps 8 \
  --layers 50 --reuse 1 --ssd-streaming \
  -p "A large white pelican with a bright orange beak rides a vintage red bicycle along a sunlit seaside boardwalk path, webbed feet on the pedals, wings on the handlebars, ocean sparkling behind wooden railings, golden hour light, camera tracks smoothly alongside at wheel level, feathers ruffling in the breeze, cinematic, ultra detailed" \
  -o outputs/pelican_124f.mp4

→ structured noise on every frame (120 requested, aligned to 124). GEN_EXIT=0.

Clean control (long clip, different prompt, identical flags):

./h3 -d ./MiniMax-H3 --width 480 --height 864 --frames 120 --steps 8 \
  --layers 50 --reuse 1 --ssd-streaming \
  -p "An astronaut tabby cat wearing a clear glass space helmet swims freestyle through a crystal-clear pool under a starry night sky, nebula light shimmering on the water surface, tiny bubbles trailing from its paws, fur rippling underwater, cinematic tracking shot at water level, soft moonlight, slow motion, ultra detailed" \
  -o outputs/cat_124f.mp4

→ clean 124-frame video+audio.

Full matrix (all runs on the same machine/binary/checkpoint, sequential, default seed 42 unless noted; prompts: P1 = long pelican prompt above, P2 = "A white pelican rides a red bicycle along a sunny seaside boardwalk path by the ocean, golden afternoon light, smooth cinematic tracking shot, ultra detailed", C = astronaut cat prompt above):

# canvas frames prompt extra flags result
1 480×864 22 P1 — clean
2 480×864 124 P1 — noise
3 448×800 124 P1 — noise
4 480×864 124 P2 — noise
5 480×864 124 P2 --seed 43 noise
6 480×864 56 P2 — noise
7 480×864 124 P2 --layers 40 --reuse 3 --token-reduction noise
8 480×864 124 C — clean
9 512×512 124 C --steps 4 clean
10 704×1280 124 C — noise
11 704×1280 124 C --use-reference-rope noise
12 704×1280 22 C — clean

The exact template for every run (only the flagged values vary):

./h3 -d ./MiniMax-H3 --width <W> --height <H> --frames <F> --steps 8 \
  --layers <L> --reuse <R> [--ssd-streaming] [<extra flags>] \
  -p "<prompt>" -o outputs/out.mp4

Observations

  • The noise is present from the first frame and fully structured (regular grid patterns), not a partially degraded render. The MP4 muxes normally with its audio track; GEN_EXIT=0.
  • Deterministic: the two 704×1280 runs (#10, #11) produced visually identical noise patterns for the same seed, and identical re-runs of #2 reproduce the same noise.
  • --profile of a failing run (#2) shows nothing anomalous — BF16 SSD stream 287.827 GiB read in 64.931s (4.433 GiB/s), unhidden wait 0.006s; Qwen text encoder wall 9.7 s, DiT Euler denoise wall 1694.5 s over 8 passes, video VAE decoder wall 121.8 s (peak 9.4 GiB); RSS stayed at 1.5–4.4 GiB throughout.
  • Not a capacity issue on this machine: the clean 124-frame cat run at the same canvas (#8) used the same memory path.
  • FYI: while two h3 instances ran concurrently, one failed early with kIOGPUCommandBufferCallbackErrorImpactingInteractivity (AdaLN block 6) — separate from this report, mentioned only in case it helps.

Workaround that works reliably

Conditioning a continuation clip on the last frame of a clean short clip breaks the divergence:

ffmpeg -sseof -0.05 -i pelican_22f.mp4 -frames:v 1 anchor.png

./h3 -d ./MiniMax-H3 --width 480 --height 864 --frames 56 --steps 8 \
  --layers 50 --reuse 1 --ssd-streaming \
  --first-frame anchor.png -p "A white pelican rides a red bicycle along a sunny seaside boardwalk path by the ocean, golden afternoon light, smooth cinematic tracking shot, ultra detailed" \
  -o outputs/pelican_clip2.mp4     # clean

Chaining 22f → 56f → 39f this way produced a clean 117-frame (4.9 s) portrait video, while a monolithic 120-frame run of the same prompt never did.

Success Case

— 480×864 portrait, 8 steps, English prompt, then lanczos upscale to 704×1280 (same canvas as the failing pelican runs):**

./h3 -d ./MiniMax-H3 --width 480 --height 864 --frames 120 --steps 8 \
  --layers 50 --reuse 1 --ssd-streaming \
  -p "An astronaut tabby cat wearing a clear glass space helmet swims freestyle through a crystal-clear pool under a starry night sky, nebula light shimmering on the water surface, tiny bubbles trailing from its paws, fur rippling underwater, cinematic tracking shot at water level, soft moonlight, slow motion, ultra detailed" \
  -o outputs/cat_480x864_124f.mp4

ffmpeg -i outputs/cat_480x864_124f.mp4 \
  -vf "scale=704:1280:flags=lanczos" \
  -c:v libx264 -preset slow -crf 17 -c:a copy -movflags +faststart \
  outputs/space_cat_swim_720p_5s.mp4

→ clean 124-frame (5.17 s) video+audio at 480×864, upscaled to 704×1280. Note this is row #8 in the matrix above: identical canvas, flags and seed as the failing pelican runs (#2, #4) — only the prompt text differs.

Questions

  • Is there a known practical limit on video rows / packed sequence length (or on the native 256 RoPE adaptation range) beyond which conditioning-dependent divergence is expected?
  • Could the native 256 RoPE adaptation be interacting with conditioning content over long horizons? Happy to share noise frames, full --profile logs, or run any targeted experiment you suggest.

php-cpm avatar Oct 04 '26 11:10 php-cpm