MiniMax H3 Diff-Aid Text Modulation (Experimental)
A free prompt-adherence experiment with no trained weights
- model
- MODEL
Here's the honest version first, because the name oversells it: this thing has no trained weights. It's an inference-time heuristic inspired by the Diff-Aid paper (Li et al., arXiv:2602.13585) and xmarre's ComfyUI-DiffAid-Patches - "no trained Aid weights or established H3 quality gain," in the author's own node description. What it actually is: a cheap, in-place knob on how strongly MiniMax H3's language rows talk to the rest of the model at a handful of chosen blocks. Whether that helps your video is an experiment you run, not a feature you install.
Worth it anyway, for one reason that's structural rather than cosmetic. H3 is a 33B omni-modal model that packs text, conditioning rows, reference images, audio and target video into a single sequence. The external H3 Diff-Aid patch clones that whole packed stream to modulate one slice of it, which is what makes it fall over under AIMDO (ComfyUI's DynamicVRAM allocator) - users have been fighting AIMDO OOMs since it went default-on in the 0.18 cycle. This node only touches the text-sized slice, in place, on the residual stream H3 already owns. AIMDO recording stays valid, the Comfy compiler can stay enabled, and it costs you text-sized scratch instead of a full-stream copy.
How it works
H3's per-block mod_segments metadata tags each row of the packed sequence with a modality integer. The node reads those scalar tags and treats tag % 3 == 1 as language - so reference rows, audio, and target video are skipped by construction, and visual interruptions inside the text run survive. At each block you list, it applies text = text + text * strength, split into a multiply and an add so the original BF16 rounding is preserved. Nothing here is Triton-dependent or tied to the rest of the pack's sparse attention.
The inputs that matter
Wire model in like any other MODEL patch, in the pack's recommended H3 order: attention patch → Fused Modulation → Chunk FeedForward → this node → EasyCache → guider/sampler. Its single output is MODEL, straight into the guider.
block_indices- default"1,13,25,37,50", 1-based across H3's 50 main DiT blocks. Note the 1-based-ness: this pack's Sol node uses 0-baseddense_blocks, so muscle memory will bite you. The tooltip calls the default spread experimental, not a validated preset.strength- default0.20, and0is a complete bypass. Your only real intensity knob.sigma_start/sigma_end-0.0–1.0, relative to this run's highest sigma:1is the noisiest step,0is clean. Defaults cover the whole run.sigma_rampsoftens the edges;0gives hard boundaries.token_weight_mode/token_tail-none/linear/exponential, weighting language tokens only,token_tail(default0.35) setting the last token's relative weight. Leave both alone until you've seen a baseline.cond_only- defaultTrue, only modulates a confirmed conditional branch.
enabled=False and strength=0 both hand back the incoming model untouched, so you can A/B without rewiring.
Install
Nothing extra: no Diff-Aid install, no Triton, no new package beyond what the pack already wants (torch; Triton is only for the attention nodes, matplotlib only for the schedule preview).
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI-sol-attn.git
Restart ComfyUI, or search "ComfyUI Sol-Attn" in ComfyUI Manager (publisher rvage). Keep one copy of the pack - it preserves the original node IDs for workflow compatibility. You'll also want an H3 checkpoint, e.g. minimax_h3_fl2va_pruned_int8_convrot.safetensors in ComfyUI/models/diffusion_models/.
Where people get burned
It raises on non-H3 models. Unlike the pack's other model patches, which pass through with a warning, this one throws Diff-Aid text modulation requires a native MiniMax H3 model if the model isn't H3. Don't drop it into a Wan or Flux graph.
Narrow sigma windows need sampler metadata. If you set sigma_start/sigma_end to anything other than 0..1, the node needs the sampler to publish sample_sigmas and will raise otherwise. The defaults never need it.
cond_only=True can silently do nothing. The node only acts on a confirmed conditional branch. If your setup doesn't tag that, you get no modulation and no error - the graph won't tell you. The console will: [MiniMax H3 text] experimental modulation on 5 blocks (strength=0.20).
Bad block_indices raise. 1-based integers inside 1..50; a typo or an out-of-range number errors out rather than clamping.
Replace the external node, don't stack it. Leaving the external H3 Diff-Aid Sparse Patch connected reintroduces its full-stream clone and the AIMDO failure this node exists to avoid.
Should you use it?
If you're already running H3 and want better prompt adherence, it's a dependency-free thing to try - same seed, enabled on then off, compare. Just don't expect the paper's results: without the trained Aid network, community feedback on the original Diff-Aid nodes was openly mixed, with one tester reporting "some aspects seem to slightly improve, others to degrade." Start at strength 0.2 with the default blocks and change one thing at a time. And if you came here hoping the "sparse" block selection speeds anything up, it doesn't - it changes conditioning, not attention cost.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| enabled | BOOLEAN | true | — |
| block_indices | STRING | 1,13,25,37,50 | 1-based H3 block numbers. Experimental selection; not a validated quality preset. |
| strength | FLOAT | 0.20-1–1 | Scale language features by 1 + strength. Zero bypasses the patch. |
| sigma_start | FLOAT | 0.0000–1 | Lower active sigma bound: 0 is no noise, 1 is the sampler's highest sigma. |
| sigma_end | FLOAT | 1.0000–1 | Upper active sigma bound, relative to this run's highest sigma. |
| sigma_ramp | FLOAT | 0.0000–0.5 | Smooth fade outside the active sigma window. Zero uses hard boundaries. |
| token_weight_mode | COMBO | none | Optional weighting across language tokens, skipping visual and audio rows. |
| token_tail | FLOAT | 0.350–1 | Last language token's relative weight when token weighting is enabled. |
| cond_only | BOOLEAN | true | Only modulate a confirmed conditional branch. Unconditional or unknown branches bypass. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |