H3RelayInternalSpectrum
Twenty knobs, and the defaults are the right answer
- model
- model
Open the H3 Relay example workflow, expand the hidden nodes, and you'll find H3RelayInternalSpectrum - a wall of twenty-ish parameters that looks like an invitation to ruin your settings. It isn't. It's a vendored copy of the Comfy-Org Spectrum MiniMax H3 runtime (by xmarre), and it's the sampling layer that sits between your model and the sampler. The good news: the defaults are the validated configuration, and Sequence Start's spectrum_enabled toggle switches the whole thing on and off for you. Leave it on.
So what does Spectrum actually do? It's a step-forecasting and spectral-blending layer for H3. Instead of paying full inference cost on every diffusion step, it keeps a bounded history of actual solver features, fits a polynomial to them, and forecasts near-future steps. Then it blends the forecast against the real trajectory with a weight you control. On top of that, its default offline_smoothing_replay path addresses the classic H3 complaint: audio stutter and temporal inconsistency. It captures a local trajectory, then replays it offline applying blends using past and future anchors - at the cost of a second sampler pass, which is why the tooltip calls it the "historically validated H3 audio/stutter path."
The inputs that matter
model(MODEL) - the model to wrap. Chain this node'smodeloutput into your sampler.enabled(default true) - Spectrum's on/off, independent of anything upstream.blend_weight(default 0.5) - the direct video spectral share: how much forecast vs. actual.audio_blend_weight(default 0) - the audio share. Default zero is deliberate: it prevents spectral mixing of the audio rows, which is what keeps H3's generated sound intact.degree(1) - polynomial degree. Anything above 1 disablesbootstrap_first_forecast.warmup_steps(1) - how many initial native solver steps run before forecasting kicks in.max_history(8) - how much bounded causal history the forecaster keeps.tail_actual_steps(1) - requested final native tail; the sampler's own rules may override it.
The experimental pile - do not touch
model_aware_mode (default off), anchor_residual_feedback, selective_rollback_correction, generic_correction_*, model_aware_* - these are research switches, and the tooltips say so. The pattern to remember: the experimental modes that apply corrections explicitly tell you to disable offline_smoothing_replay first, and the supported defaults for all of them are the conservative values. If you're not reproducing a specific experiment, changing them makes results worse.
One automatic behavior worth knowing: bootstrap_first_forecast defaults to true but quietly disables itself (with a console warning) if your degree or warmup_steps settings make it invalid. It fails soft, not hard.
Why it's here
Spectrum is why the H3 Relay default is "Euler + beta57 + Spectrum": the combination gives you H3's intended manual sampling curve (16 steps, alpha 0.5 / beta 0.7) plus this smoothing layer, and Sequence Start wires spectrum_enabled straight into it. If you switch to a sampler Spectrum doesn't support, the pack simply runs without it - Spectrum is bypassed, not broken.
Install is the shared pack path: ComfyUI Manager → H3 Relay, or git clone https://github.com/akatz-ai/h3-relay into custom_nodes, restart. Needs the MiniMax H3 models (separately licensed, territorial) and FFmpeg.
Inputs (26)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| enabled | BOOLEAN | true | — |
| blend_weight | FLOAT | 0.500–1 | Direct video spectral share. Audio uses the separate audio_blend_weight setting. In ordinary single-pass H3, video forecasts can still affect later audio through joint transformer calls. |
| degree | INT | 11–16 | Polynomial degree. Values other than 1 disable bootstrap_first_forecast. |
| ridge_lambda | FLOAT | 0.100–10 | — |
| window_size | FLOAT | 2.001–16 | — |
| flex_window | FLOAT | 0.750–8 | — |
| warmup_steps | INT | 10–64 | Initial native solver steps. Values above 1 disable bootstrap_first_forecast. |
| tail_actual_steps | INT | 10–64 | Requested final native tail. RES enforces its three-step solver tail. ER-SDE offline replay promotes only a penultimate step that the normal schedule would forecast, preserving a future exact terminal anchor without a blanket two-step tail. |
| max_history | INT | 82–64 | — |
| debug | BOOLEAN | false | — |
| history_storageopt | COMBO | system_ram | Storage for the bounded causal history, capped by max_history. Offline replay uses the separate offline_archive_storage setting. |
| bootstrap_first_forecastopt | BOOLEAN | true | Forecast solver step 1 from the actual step-0 feature. Requires degree=1 and warmup_steps<=1; incompatible settings disable it with a console warning. |
| anchor_residual_feedbackopt | BOOLEAN | false | Experimental video-scored actual-refresh guard; never injects a hidden residual. Disable offline_smoothing_replay before enabling this mode. |
| selective_rollback_correctionopt | BOOLEAN | false | Experimental thresholded, budgeted rollback for the reviewed deterministic Euler sampler only. Disable offline_smoothing_replay before enabling this mode. |
| offline_smoothing_replayopt | BOOLEAN | true | Compatibility-safe default and historically validated H3 audio/stutter path: capture a local-only trajectory, then apply configured blends using past and future anchors without causal video-to-audio feedback. It uses a second sampler pass and retains every actual anchor. Current controlled native ER-SDE testing favored full single-pass for one recurring temporal facial artifact; replay remains supported. |
| audio_blend_weightopt | FLOAT | 0.000–1 | Direct audio spectral share. The default 0 prevents spectral mixing of audio rows. The default offline replay path also isolates capture from video-to-audio trajectory coupling. |
| offline_archive_storageopt | COMBO | system_ram | Storage for every actual anchor retained until offline replay completes. This archive is not capped by max_history. Keep system_ram for constrained GPUs; vram is an explicit speed/memory tradeoff. |
| model_aware_modeopt | COMBO | off | Experimental model/patch-aware scheduling and confidence. 'schedule' may replace risky forecasts with actual evaluations. 'schedule_confidence' also adapts ridge regularization, usable degree, and spectral share without applying a correction. 'full' additionally applies the bounded generic latest-delta residual correction. Current controlled native ER-SDE testing prefers full single-pass among the compared model-aware quality modes. No equivalent conclusion is established for other samplers. The correction itself adds no denoiser forward. |
| model_aware_risk_thresholdopt | FLOAT | 0.650–1 | Advanced threshold for converting a prospective forecast into an actual model evaluation. Lower values are more conservative and may spend more NFEs. |
| model_aware_trust_shrinkageopt | BOOLEAN | false | Experimental research/reproduction switch for model_aware_mode='full'. The supported default is false and current native ER-SDE perceptual A/B testing does not recommend promotion. Offline replay keeps the rejected causal-kappa transfer disabled and uses shadow-only diagnostics. No transformer evaluation is added. |
| model_aware_replay_generic_correctionopt | BOOLEAN | false | Offline replay-only legacy/ablation switch for model_aware_mode='full'. False is the supported default: do not transplant the causal PR #39 latest-delta scalar onto the different future-bracket replay direction. True explicitly restores that old replay transfer for regression/scientific reproduction. The causal PR #39 correction, validation attenuation, local/spectral blending, scheduling, and transformer NFE are unchanged. |
| generic_correction_modeopt | COMBO | coordinate_rls | Full-mode correction controller. coordinate_rls is the validated default from three-run hidden-space and decoded-media ER-SDE evidence. Legacy retains the exact previous EWMA path for reproduction. Regional mode remains experimental. No mode adds a transformer evaluation. |
| generic_correction_limiteropt | COMBO | hard_clip | Generic-correction gain limiter. hard_clip with limit 0.40 is the validated full-mode default. rational with 0.25 remains the exact legacy reproduction setting. |
| generic_correction_limitopt | FLOAT | 0.400.01–1 | Symmetric gain-limit scale. 0.40 is validated with coordinate_rls/hard_clip; use 0.25 with legacy/rational/mode_default for the previous exact baseline. |
| generic_correction_attenuationopt | COMBO | no_attenuation | Full-mode attenuation policy. no_attenuation is the validated coordinate_rls default. mode_default with legacy exactly preserves the previous correction path. This setting adds no transformer evaluation. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |