Skip to content

ComfyUI backend: add MiniMax H3 3D latent upscaler support to Refiner - #1562

Closed
tonetxo wants to merge 1 commit into
mcmonkeyprojects:masterfrom
tonetxo:feat/minimax-h3-latent-upscaler
Closed

tonetxo wants to merge 1 commit into
mcmonkeyprojects:masterfrom
tonetxo:feat/minimax-h3-latent-upscaler

Conversation

@tonetxo

@tonetxo tonetxo commented Oct 8, 2026 •

Copy link
Copy Markdown

Summary

This PR adds native support for the MiniMax H3 3D Conv Latent Upscaler (MinimaxH3LatentUpscaler3D) in SwarmUI's Refiner stage.

Changes Included

  1. Installable Features (InstallableFeatures.cs):
    • Added 1-click install entry for Comfyui_Minimax_h3_latent_Upscaler (LBH-123-AI/Comfyui_Minimax_h3_latent_Upscaler).
  2. Backend Feature Mapping (ComfyUIBackendExtension.cs):
    • Mapped MinimaxH3LatentUpscaler3D to the minimax_h3_latent_upscaler feature flag.
  3. Workflow Generation (WorkflowGeneratorSteps.cs):
    • Joint AV Latent Handling: Since MiniMax H3 operates with joint Audio-Video flow (FLOW_AV), passing raw video latents to the second-stage sampler causes IndexError: audio_src = x[1]. We separate the joint AV latent using LTXVSeparateAVLatent, upscale the video latent with MinimaxH3LatentUpscaler3D, and recombine with LTXVConcatAVLatent.
    • Patch Alignment: Enforced 32-pixel spatial alignment ((width / 32) * 32) for MiniMax H3 to ensure patchify_video (which uses 2x2 latent patches) never fails with shape mismatch errors on arbitrary upscale ratios (e.g. 1.33x).
    • Enabled temporal chunking and force unloading on the upscaler to keep VRAM overhead minimal.

Usage Note (T2V / R2V vs Init Image I2V)

  • This is intended for Text-to-Video (T2V) and Reference-to-Video (R2V / Image Prompt).
  • Due to SwarmUI's general step ordering (the Refiner stage runs at step -4 prior to ImageToVideo at step 11), enabling the Refiner alongside Init Image applies the refiner to the initial 2D frame rather than post-processing the generated video. For image-guided generation with latent upscaling, users should use MiniMax H3's native R2V mode (supplying reference images in Prompt Images / ref_images) rather than Init Image.

Tested and verified on Ubuntu with RTX 50-series hardware.

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.

2 participants