alisson-anjos/ComfyUI-H3-Text-Encoders
ComfyUI projection and LoRA adapters for swapping MiniMax-H3 encoders
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
This Python extension sits between the text or vision-language encoder and MiniMax-H3’s conditioning input in ComfyUI. Plato’s Key uses closed-form Ridge or orthogonal Procrustes alignment to map donor representations into the target encoder space. Matching Qwen tokenizers allow 1:1 token alignment; cross-tokenizer calibration can align by character overlap. For cross-family pk_lora, forced Qwen segmentation, a multilayer projection, and a trained rank-32 text encoder LoRA address mismatches that a linear map alone leaves behind. The H3 DiT is unchanged.
Integration runs through a patch node for native ComfyUI CLIP objects or a separate loader for Hugging Face models. The tree separates node files (nodes.py, calibrate_node.py) from platos_key_core.py and calibration assets. pyproject.toml declares safetensors, huggingface_hub, and NumPy; the runtime requirements also enumerate PyTorch, Transformers, Accelerate, and SentencePiece. Operators should account for both manifests rather than assuming the package metadata captures the entire runtime.
Key Capabilities & Differentiators
The extension covers MiniMax-H3 T2VA/Image, FL2VA, and Ref2VA/RefPacks workflows, with adapter families for Qwen 3.5/3.8, Gemma 4, and Inkling-2-Mini. It offers training-free pk_ridge, text-only pk_lora, and pk_lora_vision for native vision-tower conditioning on image references. Projection and the two LoRAs are tunable independently. Setting a LoRA strength to zero leaves the projection active; on cross-dimension keys, setting projection strength to zero still yields the target width.
For Qwen 3.5 9B, the listed text cosine is 97.9% for pk_lora versus 93.05% for pk_ridge; the vision key lists 89.5% visual cosine. These are alignment metrics, not direct measurements of speech clarity, video quality, or throughput. The local calibration node accepts donor and target CLIP objects, uses an offline multilingual corpus plus optional custom prompts, selects 1:1 or character-overlap alignment automatically, and returns a live patched CLIP object, metrics, and a saved key path.
Trade-offs & Limitations
Compared with keeping H3’s original Qwen3-VL-32B encoder, the adapter path lets you choose smaller or quantized donor weights, but adds a model/key matching step and another source of conditioning drift. A training-free Ridge or character-overlap key avoids trained adapter weights and can be a reasonable starting point for visuals. Cross-family charov and legacy 4layer mappings have documented limitations on speech; for dialogue and multi-shot work, test pk_lora against the original encoder on the same prompts and references rather than choosing by cosine or R² alone.
The vision bundle adds a reference-conditioning path and a larger key artifact; for text-only inputs, pk_lora is the lighter download. CPU offload trades GPU residency for host memory and potential transfer overhead, so measure it in the full H3 graph. The plugin is GPL-3.0: review distribution obligations separately from the terms for the H3 model, donor encoders, and downloadable adapter weights.
Hardware & Deployment Guide
Install under ComfyUI/custom_nodes, use ComfyUI’s Python environment for requirements.txt, and restart the host. Put single-file encoders in models/text_encoders/ and keys in models/clip_projections/; projection directories can also be registered through extra_model_paths.yaml. Wire single-file encoders through Load CLIP and PlatosKeyPatchCLIP. The separate HF node accepts local Hugging Face model directories or hf: repositories, not standalone encoder weights.
This is a self-hosted GPU workflow, with CPU offload available for the HF loader and sequential offload during calibration. Local files avoid remote retrieval through the HF path, while the built-in calibration corpus supports offline use. Size VRAM and host RAM for the chosen encoder, H3 itself, reference inputs, and concurrent jobs. The package manifest is at 0.6.1, with no GitHub release listed; documented compatibility milestones include v0.4.2+ for vision LoRA and HF vision loading, and v0.5.7+ in the local-calibration setup.
pk_lora bundles forced Qwen segmentation, a projection, and rank-32 text LoRA in one .safetensors file.pk_lora_vision adds native vision-tower conditioning for image references; a W_vision projection alone does not include a vision LoRA.Self-hosted ComfyUI teams that want to replace H3’s original encoder with a smaller or quantized model and can validate visual conditioning, dialogue, and multi-shot behavior on their own workflows.
You do not run MiniMax-H3, require unchanged native conditioning, or cannot provision and test the GPU resources and matched model/key artifacts.
Quick Start & Installation
cd ComfyUI/custom_nodes git clone https://github.com/alisson-anjos/ComfyUI-H3-Text-Encoders.git cd ComfyUI-H3-Text-Encoders && pip install -r requirements.txt
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/alisson-anjos/ComfyUI-H3-Text-Encoders.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about ComfyUI-H3-Text-Encoders
Where does the adapter sit, and which loader should I use?
hf: repository, use Plato’s Key Load Any HF Text Encoder instead. In either case, select a key calibrated for the encoder; the adapter changes the conditioning, not the H3 DiT.How much GPU memory do I need, and does offload help?
Can I self-host this commercially or redistribute it in an appliance?
Should I keep the original encoder, use Ridge, or choose a LoRA key?
pk_lora when speech or multi-shot sequencing matters. Choose pk_lora_vision when you need native vision-tower conditioning from image references.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy