Skip to content

Add Turing safe-FP16 execution path - #2216

Open
Ownistic wants to merge 2 commits into
deepbeepmeep:mainfrom
Ownistic:pr/minimax-h3-turing-safe-fp16
Open

Ownistic wants to merge 2 commits into
deepbeepmeep:mainfrom
Ownistic:pr/minimax-h3-turing-safe-fp16

Conversation

@Ownistic

Copy link
Copy Markdown

Summary

Adds a native safe-FP16 execution path for MiniMax H3 on pre-Ampere NVIDIA GPUs, including Turing.

The implementation is adapted for WanGP from the reference script:
https://github.com/Amduraznak/minimax-h3-fp16-fix/blob/main/minimax_h3_fp16_fix.py

Changes

  • Enable the safe-FP16 path only for CUDA GPUs below compute capability 8.0 when H3 runs in FP16.
  • Keep numerically sensitive residual and pointwise operations in FP32.
  • Run compatible projections and attention operations in FP16 to reduce Turing denoising time without creating a duplicate full-FP32 model.
  • Keep Qwen3-VL prompt encoding on SDPA while allowing the H3 transformer to use its selected attention backend.

Benchmark

Measured on an RTX 2060 Laptop GPU with 6 GB VRAM (SM 7.5) for a 5s video at 320p resolution:

  • Before: approximately 150 seconds per H3 denoising step
  • After: 31.9 seconds per step with the safe-FP16 path
  • Result: approximately 4.7x faster, or 79% less denoising time

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant