Skip to content

Support MiniMax-H3-Image generation and reference editing with Sol Auto, FP8 and SP/TP etc. - #56

Open
Uxito-Ada wants to merge 1 commit into
Tele-AI:mainfrom
Uxito-Ada:feat/minimax-h3-image
Open

Uxito-Ada wants to merge 1 commit into
Tele-AI:mainfrom
Uxito-Ada:feat/minimax-h3-image

Conversation

@Uxito-Ada

@Uxito-Ada Uxito-Ada commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add MiniMax-H3-Image T2I and reference-image editing using TeleFuser's existing abstractions, where Q-SPA can be enabled (SP/TP, FP8 GEMM and Sol-Attention).
  • Add Sol Auto, where automatically let short context uses cuda graph to run Sol attention, and long context uses eager mode to run Sol.
  • Add MiniMax-H3-Image examples, usage documentation and tests.
  • Fix tensor contiguity at the inherited H3 FP8 attention correction call site; no attention API changes.

Results

Performance

  • Model: MiniMaxAI/MiniMax-H3-Image
  • Hardware: 4× NVIDIA H100 80GB HBM3 (81559 MiB each), NV18 links; 2× Intel Xeon Platinum 8468 (192 logical CPUs, memory limit 800 GiB).
  • Software: driver 590.48.01, Python 3.11.13, PyTorch 2.11.0+cu130, Transformers 5.22.2, xFormers 0.0.35, CUTLASS DSL 4.5.3; actual FP8 GEMM uses installed tf_kernel 0.1.0.
  • Workload: 2048×2048, six published PDD steps, seed 42; prompt: "A red bicycle leaning against a white plaster wall, detailed natural photograph, soft morning sunlight.".

TeleFuser vs vLLM-Omni:

Longer native image context

The same-process dense/eager-Sol comparison reduces latency by 11.0%. The auto row is a separate final launch confirming the new dispatch policy; its difference from eager is not attributed solely to the guard. This supports the short-context/extra-pass explanation, not a universal speedup claim. Auto KV splitting resolves to two here, versus one at 2048², so this is not an isolated sequence-length-only experiment.

Actual TeleFuser and vLLM same-input generated images

TeleFuser Ablation:

Measured CPU-offload to resident optimization steps

Additional vLLM-omni Performance Reproduction:

These are actual same-host H100 measurements:

vLLM-Omni execution policy Median HTTP latency Max sampled memory/GPU
1 GPU: DiT/VAE resident, encoder layer offload 3.041 s 69.24 GiB
1 GPU: DiT + encoder layer offload, VAE resident 8.353 s 10.47 GiB
4 GPUs: SP4 + encoder TP4, layer offload 2.630 s 9.67 GiB

Measured vLLM-Omni H100 resident and layer-offload profiles

Use --sp 2 --tp 2 for hybrid. For dense BF16 omit --fp8 --sol-fp8; for dense FP8 omit --sol-fp8. --no-vae-parallel, --no-vae-cuda-graph and --text-encoder-tp expose ablations. No charts, benchmark outputs or new production service/environment interfaces are added to the repository.

Generated outputs

Same-input text-to-image configuration comparison

Both outputs below use the same snow-scene prompt, seed 71, six PDD steps and 2048×2048 output, with no reference image. Only the execution configuration differs.

BF16, one GPU:

TeleFuser MiniMax-H3-Image BF16 output

TP2 + FP8 GEMM + BF16 Sol, two GPUs:

TeleFuser MiniMax-H3-Image TP2 FP8 Sol output

Reference-image editing demonstration — different task and instruction

Input reference: the BF16 snowy-forest image above.

Edit instruction: "Change the snowy forest in <Picture 1> into an autumn forest with orange and golden leaves, preserving the red fox and the photographic composition."

BF16 edited result (2048×2048):

TeleFuser MiniMax-H3-Image autumn edit

The autumn leaves are explicitly requested by this edit instruction. This image demonstrates reference editing and is not a BF16/FP8 output-equivalence comparison. Its historical pipeline time is 97.237 s and is excluded from the text-to-image performance chart.

Tests

  • Image-model, image-VAE, conditioner and sampling tests: 10 passed, two independent-reference cases skipped because the current Diffusers environment lacks H3-Image reference classes.
  • Existing H3 DiT and FP8 smoothing regressions: 41 passed.
  • Cookbook: 19 passed; complete documentation build and site link validation passed.
  • Independent image-only distributed/worker tools; Sol fallback is treated as a validation failure.
  • Ruff and example CLI checks.

Architecture support

The image DiT extends the maintained MiniMax H3 DiT for SP/TP and attention. Only the absent audio branches and step-dependent PDD output projection differ. The conditioner extends the existing H3 encoder and preserves rotary precision; the released image VAE has its own architecture and checkpoint format.

Includes PPL_CONFIG, get_pipeline, run, run_with_file, and --gpu_num in examples/minimax_h3_image/minimax_h3_image_t2i_h100.py.

@Uxito-Ada
Uxito-Ada requested a review from lzx1413 November 23, 2026 04:11
@Uxito-Ada Uxito-Ada changed the title Add MiniMax-H3-Image generation and reference editing with SP/TP Support MiniMax-H3-Image generation and reference editing with Sol, FP8 and SP/TP etc. Nov 23, 2026
@lzx1413 lzx1413 mentioned this pull request Nov 23, 2026
1 of 15 tasks
@Uxito-Ada
Uxito-Ada force-pushed the feat/minimax-h3-image branch from 19ad6f4 to 4535fb6 Compare November 24, 2026 01:55
Add MiniMax H3 Image text-to-image and reference-image editing through the
standard TeleFuser pipeline, examples and cookbook. Reuse H3 components with
pure TP and hybrid SP/TP, native FP8 GEMMs and FP8 Sol attention.

Include resident encoder/DiT/VAE execution, independently sharded encoding,
parallel VAE tiles and bounded CUDA graph replay. Preserve the measured Sol
statistics, padding and prefix optimizations and their native GPU coverage.

Consolidate the reviewed PR implementation into one linear topic commit so
GitHub can rebase it onto main without replaying historical merge conflicts.
The pre-rebase history and benchmark commit identities are backed up locally.
@Uxito-Ada
Uxito-Ada force-pushed the feat/minimax-h3-image branch from 9f9dd40 to fadab3d Compare November 26, 2026 06:22
@Uxito-Ada

Uxito-Ada commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

Clarification of Sol Auto

output size # kv split Sol attention execution backend
2048*2048 1 CUDA graph
4096*4096 2 eager mode
  • Cuda graph can cache and replay the kernels to reduce kernel launch overhead for short output.
  • Fallback to eager for long output, because KV is sliced at that time, and thus eager can avoid graph break.

@Uxito-Ada Uxito-Ada changed the title Support MiniMax-H3-Image generation and reference editing with Sol, FP8 and SP/TP etc. Support MiniMax-H3-Image generation and reference editing with Sol Auto, FP8 and SP/TP etc. Nov 26, 2026

This branch has not been deployed

No deployments
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