Skip to content

minimax-H3 FL2VA train error #1660

Open

Description

@stihuangyuan

[rank5]: noise_pred, noise_pred_audio = pipe.model_fn(
[rank5]: ^^^^^^^^^^^^^^
[rank5]: TypeError: model_fn_minimax_h3() missing 1 required positional argument: 'audio_latents'

Activity

  1. mi804 commented on Sep 1, 2026

    @mi804
    Collaborator

    Thanks for the report.

    This error means audio_latents was never produced for that sample, which happens when a video in your dataset has no audio track — without input_audio, the audio encoding step is skipped and model_fn fails on the missing argument. Only rank 5 crashed, so likely just a subset of your data is affected.

    Try adding --silent_on_missing_audio to your training command — it substitutes a silent track for those samples.

    If the error persists, please share your full training command.

  2. stihuangyuan commented on Sep 14, 2026

    @stihuangyuan
    Author

    --silent_on_missing_audio

    This error still happen when stage2 training. my training command follow github doc:
    modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "minimax_h3/MiniMax-H3-FL2VA/*" --local_dir ./data/diffsynth_example_dataset

    T2VA - stage 1 (data process)

    accelerate launch examples/minimax_h3/model_training/train.py
    --dataset_base_path data/diffsynth_example_dataset/minimax_h3/MiniMax-H3-FL2VA
    --dataset_metadata_path data/diffsynth_example_dataset/minimax_h3/MiniMax-H3-FL2VA/metadata.csv
    --data_file_keys "video,input_audio"
    --extra_inputs "input_audio"
    --height 480
    --width 832
    --num_frames 124
    --dataset_repeat 1
    --model_id_with_origin_paths "MiniMax/MiniMax-H3:FL2VA/text_encoder/model*.safetensors,MiniMax/MiniMax-H3:FL2VA/video_vae/source/model.safetensors,MiniMax/MiniMax-H3:FL2VA/audio_vae/model.safetensors"
    --learning_rate 1e-5
    --num_epochs 1
    --remove_prefix_in_ckpt "pipe.dit."
    --output_path "./models/train/MiniMax-H3-T2VA-full-split-cache"
    --trainable_models "dit"
    --use_gradient_checkpointing
    --task "sft:data_process"

    T2VA - stage 2 (train)

    accelerate launch --config_file examples/minimax_h3/model_training/full/accelerate_config_zero3.yaml
    examples/minimax_h3/model_training/train.py
    --dataset_base_path ./models/train/MiniMax-H3-T2VA-full-split-cache
    --data_file_keys "video,input_audio"
    --extra_inputs "input_audio"
    --height 480
    --width 832
    --num_frames 124
    --dataset_repeat 100
    --model_id_with_origin_paths "MiniMax/MiniMax-H3:FL2VA/transformer/model*.safetensors"
    --learning_rate 1e-5
    --num_epochs 2
    --remove_prefix_in_ckpt "pipe.dit."
    --output_path "./models/train/MiniMax-H3-T2VA-full"
    --trainable_models "dit"
    --use_gradient_checkpointing
    --find_unused_parameters
    --task "sft:train"

  3. stihuangyuan commented on Sep 16, 2026

    @stihuangyuan
    Author

    Thanks for the report.

    This error means audio_latents was never produced for that sample, which happens when a video in your dataset has no audio track — without input_audio, the audio encoding step is skipped and model_fn fails on the missing argument. Only rank 5 crashed, so likely just a subset of your data is affected.

    Try adding --silent_on_missing_audio to your training command — it substitutes a silent track for those samples.

    If the error persists, please share your full training command.

    @mi804 This error still happen when stage2 training. my training command follow github doc:
    modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "minimax_h3/MiniMax-H3-FL2VA/*" --local_dir ./data/diffsynth_example_dataset

    T2VA - stage 1 (data process)
    accelerate launch examples/minimax_h3/model_training/train.py
    --dataset_base_path data/diffsynth_example_dataset/minimax_h3/MiniMax-H3-FL2VA
    --dataset_metadata_path data/diffsynth_example_dataset/minimax_h3/MiniMax-H3-FL2VA/metadata.csv
    --data_file_keys "video,input_audio"
    --extra_inputs "input_audio"
    --height 480
    --width 832
    --num_frames 124
    --dataset_repeat 1
    --model_id_with_origin_paths "MiniMax/MiniMax-H3:FL2VA/text_encoder/model*.safetensors,MiniMax/MiniMax-H3:FL2VA/video_vae/source/model.safetensors,MiniMax/MiniMax-H3:FL2VA/audio_vae/model.safetensors"
    --learning_rate 1e-5
    --num_epochs 1
    --remove_prefix_in_ckpt "pipe.dit."
    --output_path "./models/train/MiniMax-H3-T2VA-full-split-cache"
    --trainable_models "dit"
    --use_gradient_checkpointing
    --task "sft:data_process"

    T2VA - stage 2 (train)
    accelerate launch --config_file examples/minimax_h3/model_training/full/accelerate_config_zero3.yaml
    examples/minimax_h3/model_training/train.py
    --dataset_base_path ./models/train/MiniMax-H3-T2VA-full-split-cache
    --data_file_keys "video,input_audio"
    --extra_inputs "input_audio"
    --height 480
    --width 832
    --num_frames 124
    --dataset_repeat 100
    --model_id_with_origin_paths "MiniMax/MiniMax-H3:FL2VA/transformer/model*.safetensors"
    --learning_rate 1e-5
    --num_epochs 2
    --remove_prefix_in_ckpt "pipe.dit."
    --output_path "./models/train/MiniMax-H3-T2VA-full"
    --trainable_models "dit"
    --use_gradient_checkpointing
    --find_unused_parameters
    --task "sft:train"

  4. mi804 commented on Sep 20, 2026

    @mi804
    Collaborator

    Thanks for reporting this! The example videos include audio, and we’ve verified that training runs successfully with the example script. One possible cause is a missing audio dependency, such as torchcodec, in your Python environment, though we’d need the full error logs to confirm. Could you please share the complete traceback, along with any earlier warnings or errors? This would help us investigate further.

  5. mvanhorn commented on Oct 13, 2026

    @mvanhorn

    FlowMatchSFTMiniMaxH3AudioVideoLoss sampled audio noise, stored audio_latents, and added the audio loss only when the key audio_input_latents was present.

    require_minimax_h3_audio_input_latents returns audio_input_latents only when it is a tensor and otherwise raises ValueError describing the skipped encode and a data-process rerun.

    #1748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions