Nodes/H3 Relay/H3RelayInternalSpectrum
ComfyUI Node

H3RelayInternalSpectrum

Twenty knobs, and the defaults are the right answer

By akatz-ai·Created 28 days ago·Updated 8 days ago· 15
H3RelayInternalSpectrum
  • model
  • model
enabledtrue
blend_weight0.50
degree1
ridge_lambda0.10
window_size2.00
flex_window0.75
warmup_steps1
tail_actual_steps1
max_history8
debugfalse
history_storagesystem_ram
bootstrap_first_forecasttrue
anchor_residual_feedbackfalse
selective_rollback_correctionfalse
offline_smoothing_replaytrue
audio_blend_weight0.00
offline_archive_storagesystem_ram
model_aware_modeoff
model_aware_risk_threshold0.65
model_aware_trust_shrinkagefalse
model_aware_replay_generic_correctionfalse
generic_correction_modecoordinate_rls
generic_correction_limiterhard_clip
generic_correction_limit0.40
generic_correction_attenuationno_attenuation

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's model output 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 disables bootstrap_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.

Categorysampling/spectrum

Inputs (26)

NameTypeDefaultDescription
modelMODEL
enabledBOOLEANtrue
blend_weightFLOAT0.500–1Direct 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.
degreeINT11–16Polynomial degree. Values other than 1 disable bootstrap_first_forecast.
ridge_lambdaFLOAT0.100–10
window_sizeFLOAT2.001–16
flex_windowFLOAT0.750–8
warmup_stepsINT10–64Initial native solver steps. Values above 1 disable bootstrap_first_forecast.
tail_actual_stepsINT10–64Requested 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_historyINT82–64
debugBOOLEANfalse
history_storageoptCOMBOsystem_ramStorage for the bounded causal history, capped by max_history. Offline replay uses the separate offline_archive_storage setting.
bootstrap_first_forecastoptBOOLEANtrueForecast 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_feedbackoptBOOLEANfalseExperimental video-scored actual-refresh guard; never injects a hidden residual. Disable offline_smoothing_replay before enabling this mode.
selective_rollback_correctionoptBOOLEANfalseExperimental thresholded, budgeted rollback for the reviewed deterministic Euler sampler only. Disable offline_smoothing_replay before enabling this mode.
offline_smoothing_replayoptBOOLEANtrueCompatibility-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_weightoptFLOAT0.000–1Direct 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_storageoptCOMBOsystem_ramStorage 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_modeoptCOMBOoffExperimental 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_thresholdoptFLOAT0.650–1Advanced threshold for converting a prospective forecast into an actual model evaluation. Lower values are more conservative and may spend more NFEs.
model_aware_trust_shrinkageoptBOOLEANfalseExperimental 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_correctionoptBOOLEANfalseOffline 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_modeoptCOMBOcoordinate_rlsFull-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_limiteroptCOMBOhard_clipGeneric-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_limitoptFLOAT0.400.01–1Symmetric 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_attenuationoptCOMBOno_attenuationFull-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)

NameTypeDescription
modelMODEL