MiniMax H3 Text Encoder Swap: Qwen3.5 and Gemma 4 in ComfyUI
Plato's Key adapters let MiniMax-H3 run on Qwen3.5 or Gemma 4 text encoders, cutting the native 32B encoder to under 10 GB with no DiT changes.
.safetensors per encoder, no DiT weights touched. A Qwen3.5 9B encoder at 9.7 GB replaces the 27.1 GB int8 native one.
Same prompt through four encoders, from the adapter repo. Source: Alissonerdx/TE-PK-Minimax-H3
How it works
Plato's Key (Stanford Hazy Research, Nov 25) showed that one model can use another model's hidden states after a single rotation and scale, fitted in closed form. Alisson applied it to H3: the adapter rotates the new encoder's output into the shape H3's Qwen3-VL-32B expects, so the video model never notices the swap.
Encoders sharing Qwen3-VL's tokenizer need only a linear key. Cross-family ones (Gemma 4, Inkling-2-Mini) get a bundled rank-32 LoRA on top, because plain linear keys keep the visuals but garble spoken dialogue.
Run it
Install the node pack, drop one key plus one encoder, then route through the patch node:
- Clone the node pack into
ComfyUI/custom_nodes/and runpip install -r requirements.txtinside it. - Put the encoder in
ComfyUI/models/text_encoders/and its key inComfyUI/models/clip_projections/. - Wire
Load CLIP→ Plato's Key Patch CLIP (H3 Plug & Play) →MiniMax H3 Reference to VideoorMiniMax H3 Image to Video. Strength 1.0,apply_to_pooledoff.
Any HuggingFace transformers encoder can also be loaded directly with Plato's Key Load Any HF Text Encoder (H3), which offloads to CPU and skips the CLIP loader.
| Encoder | Native size | Key file |
|---|---|---|
| Qwen3-VL-32B (stock H3) | 27.1 GB int8 | none |
| Qwen3.5 9B | 9.7 GB int8 | minimax_h3_32b_pk_ridge_qwen3.5_9b |
| Qwen3.5 2B | 4.5 GB bf16 | minimax_h3_32b_pk_ridge_qwen3.5_2b |
| Gemma 4 E4B | fp8 | minimax_h3_32b_pk_lora_gemma4_e4b |
| Qwen3.8 27B | 17.3 GB w4a8 | minimax_h3_32b_pk_ridge_qwen3.8_27b |
Three-way comparison of the Gemma 4 adapter. Source: Alissonerdx/TE-PK-Minimax-H3
What to expect
The author's own numbers are token-level similarity to the native encoder, not a quality score: Qwen3.5 9B lands at 93.05% cosine (R² 0.99), Gemma 4 E4B at 97.6% with the LoRA versus 90.1% without it. Qwen3.5 0.8B drops to 91.1%, so the smallest encoder is the one most likely to soften prompt following.
pk_lora keys, and the author is still training Gemma 4 12B and 31B. Existing H3 LoRAs and accelerators were trained against the native encoder, so test your usual stack before swapping in production graphs.
The same rotation trick is spreading: Nynxz/ComfyUI-PlatoKeys applies it to Krea 2, MOSS-Image and Z-Image text encoders, including Qwen 9B to 4B compression.
Availability
- Keys and comparison clips: Alissonerdx/TE-PK-Minimax-H3.
- Node pack: alisson-anjos/ComfyUI-H3-Text-Encoders.
- Qwen encoders: Comfy-Org/Qwen3.5 and Comfy-Org/gemma-4.
- Model page: MiniMax-H3.
Comments
Sign in with GitHub to join the discussion.