Create HyperFlow H3 Curve Fit (Pruned Bases)
The node you queue once, alone, to un-break a pruned MiniMax-H3
- report
This is not a generation node. It has no MODEL input, it touches neither your sampler nor your model chain, and you should never leave it in a workflow you render with. Queue it on its own, take the small file it writes, delete it from the graph. A build step with a ComfyUI face.
It exists because pruned MiniMax-H3 checkpoints break HyperFlow's best trick. The two-time (t, r) conditioning needs the model's time embedder; pruned bases throw the time embedder away and keep a small adaln_t_table instead. No embedder, no two-time conditioning: the pruned adapter build applies the backbone LoRA only and drifts off the released recipe. You'd get eight steps of a model, not eight steps of HyperFlow.
What a curve fit is
The refit puts most of that signal back without the embedder. For every AdaLN projection - 50 blocks plus the final layer - it stores the 8-wide curve coordinates that best reproduce what the full-weight model produces with HyperFlow on, across the 16 trained (t, r) pairs and a set of pinned (t, t) rows. The result is about 1.7 MB, bound by SHA-256 to one exact pruned base and one exact adapter.
Does it work? The pack's measurements against the full base, fixed prompt, seed and latents: FL2VA video cosine similarity goes 0.81 to 0.88, REF2VA audio 0.93 to 0.99. Recovering most is not recovering all - the full base stays the reference.
Check whether you need this node at all. Fits ship in the pack for the stock FL2VA and REF2VA pruned int8 checkpoints, the block-spliced hybrids (b15-49 through b30-49), and Singularity REF2VA pruned v1.3; for those, just tick experimental_curve_refit on ApplyHyperFlowH3. This node is for a pruned checkpoint that isn't on that list.
Inputs, and what each one has to be
pruned_model- the pruned/curve H3 base you actually load in ComfyUI, picked from your diffusion models list.teacher_model- the full-weight base the pruned file was made from, in bf16/fp16 orint8_tensorwise(the*_int8_convrotreleases work). For a hybrid, the donor that supplies the time embedder and final layer.hyperflow_file- a file that still has the time-embedder LoRAs: the originalminimax_h3_hyperflow_8step_v1.0or the converted full build. Not_pruned.node_adapter- the adapterApplyHyperFlowH3loads for this base, normally the_prunedbuild. Only its hash is used, so pick the file you'll actually run.splice- hybrids only, one line per donor asFILE:FIRST-LAST, e.g.minimax_h3_ref2va_int8_convrot.safetensors:20-49.
The only output is report, a STRING, also printed to the console - wire it into a text display node if you'd rather read it in the UI. The node is an output node, which is why it queues with nothing downstream, and why it will occupy your GPU mid-session for a few minutes.
Running it
Drop it in a scratch graph, fill the four file fields (plus splice on a hybrid), queue. Under a minute to a few minutes, mostly spent reading the teacher off disk; it frees about 5 GB of VRAM first and reports progress per projection. A ready-made graph ships at example_workflows/hyperflow_curve_fit.json.
The fit lands in curve_fits/ inside the hyperflow folder that holds node_adapter, named <pruned base stem>_hyperflow_curvefit.safetensors. Then turn on experimental_curve_refit on the Apply node, with strength = 1.0 and default gate and sigmas.
Prefer a terminal? Same fit, without ComfyUI:
python tools/fit_curve.py \
--pruned models/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors \
--teacher models/diffusion_models/minimax_h3_fl2va_int8_convrot.safetensors \
--hyperflow models/hyperflow/minimax_h3_hyperflow_8step_v1.0.safetensors \
--node-adapter models/hyperflow/custom_node_hyperflow_8step_v1.0_comfyui_pruned.safetensors
Reading the report, and the ways this goes sideways
You get a relative modulation error per projection, backbone-only versus refit, then a mean - blocks.20.adaln_proj.linear: backbone-only 3.43% refit 1.96%. It should be lower on every line. If one came out worse, your teacher probably isn't the model the pruned file came from. And these are modulation errors, not quality scores: judge with two generations at a fixed seed, refit on and off.
The structural gotchas:
- Matching is by hash, not by filename. Renaming your copy is fine. A mirror, re-upload or re-quantised copy is a different file, and the fit applies best-effort with a console warning or not at all. Same for the adapter.
- ComfyUI caches. After making a fit, toggle
experimental_curve_refitoff and on, or restart, or the Apply node may never notice it. - First run per session re-hashes both files, a few seconds each. That pause is hashing, not a hang.
- Only the released recipe is supported: 8 steps, default sigmas and gate, strength 1.0. Sharing a fit only helps people whose files are byte-identical to yours.
Install
Same pack as the Apply nodes, so if you have those you already have this. ComfyUI Manager, search ComfyUI-HyperFlow-H3 (listed as HyperFlow for MiniMax-H3, publisher adudeguyman), or:
cd ComfyUI/custom_nodes
git clone https://github.com/Adudeguyman/ComfyUI-HyperFlow-H3
# restart ComfyUI
No Python dependencies are declared by the pack, and the bundled fits mean nothing extra to download for the supported pruned bases. If yours isn't on the list you'll need the unpruned teacher checkpoint on disk - the expensive part of the exercise.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| pruned_model | COMBO | The pruned/curve MiniMax-H3 base you load in ComfyUI. | |
| teacher_model | COMBO | The full-weight base the pruned file was made from (bf16/fp16 or int8_tensorwise). For hybrids, the base that supplies the time embedder and final layer. | |
| hyperflow_file | COMBO | A HyperFlow file with the time-embedder LoRAs: the original minimax_h3_hyperflow_8step_v1.0 or the converted full build (not the _pruned build). | |
| node_adapter | COMBO | The adapter Apply HyperFlow H3 loads for this base (normally the _pruned build). The fit binds to its hash. | |
| splice | STRING | Hybrids only: one line per donor, FILE:FIRST-LAST, taking those teacher blocks from another full base, e.g. minimax_h3_ref2va_int8_convrot.safetensors:20-49 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| report | STRING | — |