ComfyUI Node

SEGA

Spectral-Energy Guided Attention for ultra-high-resolution generation. Computes per-dimension RoPE mscale from the latent's Fourier spectrum.

By wildminder·Created 10 months ago·Updated 14 days ago· 603
SEGA
  • model
  • Patched Model
width1024
height1024
model_typeauto
methodsega
mscale_alpha0.15
mscale_beta1.5
mscale_min1.00
spread_min0.00
spread_max1.00
spread_alpha1.5
base_mscale_formulapower_res
base_mscale_coefficient0.08
base_resolution1024
base_shift0.50
max_shift1.15
Categorymodel_patches/position_encoding

Inputs (16)

NameTypeDefaultDescription
modelMODELThe model to patch with SEGA.
widthINT102416–8192Target image width. Must match the width of your empty latent.
heightINT102416–8192Target image height. Must match the height of your empty latent.
model_typeCOMBOautoSpecify the model architecture. 'auto' usually works.
methodCOMBOsegaSEGA = NTK base + spectral per-dim mscale. NTK = base NTK only (no spectral).
mscale_alphaFLOAT0.150–1SEGA amplitude. Controls how much spectral redistribution is applied.
mscale_betaFLOAT1.50–10SEGA tanh sharpness. Higher = more binary redistribution.
mscale_minFLOAT1.000.1–2Floor for per-frequency mscale values.
spread_minFLOAT0.000–1Minimum spectral spread (early denoising steps).
spread_maxFLOAT1.000–1Maximum spectral spread (late denoising steps).
spread_alphaFLOAT1.50.1–5Non-linear mapping exponent for spread schedule.
base_mscale_formulaCOMBOpower_respower_res: m_ref = s^kappa. log_res: m_ref = 1 + kappa*ln(s).
base_mscale_coefficientFLOAT0.080–1Kappa coefficient for base mscale. Paper uses 0.08.
base_resolutionINT1024256–4096The native training resolution.
base_shiftoptFLOAT0.500–10Advanced: Base shift for the noise schedule (mu).
max_shiftoptFLOAT1.150–10Advanced: Max shift for the noise schedule (mu) at high resolutions.

Outputs (1)

NameTypeDescription
Patched ModelMODELThe model patched with SEGA.