ComfyUI Node
SEGA
Spectral-Energy Guided Attention for ultra-high-resolution generation. Computes per-dimension RoPE mscale from the latent's Fourier spectrum.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The model to patch with SEGA. | |
| width | INT | 102416–8192 | Target image width. Must match the width of your empty latent. |
| height | INT | 102416–8192 | Target image height. Must match the height of your empty latent. |
| model_type | COMBO | auto | Specify the model architecture. 'auto' usually works. |
| method | COMBO | sega | SEGA = NTK base + spectral per-dim mscale. NTK = base NTK only (no spectral). |
| mscale_alpha | FLOAT | 0.150–1 | SEGA amplitude. Controls how much spectral redistribution is applied. |
| mscale_beta | FLOAT | 1.50–10 | SEGA tanh sharpness. Higher = more binary redistribution. |
| mscale_min | FLOAT | 1.000.1–2 | Floor for per-frequency mscale values. |
| spread_min | FLOAT | 0.000–1 | Minimum spectral spread (early denoising steps). |
| spread_max | FLOAT | 1.000–1 | Maximum spectral spread (late denoising steps). |
| spread_alpha | FLOAT | 1.50.1–5 | Non-linear mapping exponent for spread schedule. |
| base_mscale_formula | COMBO | power_res | power_res: m_ref = s^kappa. log_res: m_ref = 1 + kappa*ln(s). |
| base_mscale_coefficient | FLOAT | 0.080–1 | Kappa coefficient for base mscale. Paper uses 0.08. |
| base_resolution | INT | 1024256–4096 | The native training resolution. |
| base_shiftopt | FLOAT | 0.500–10 | Advanced: Base shift for the noise schedule (mu). |
| max_shiftopt | FLOAT | 1.150–10 | Advanced: Max shift for the noise schedule (mu) at high resolutions. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Patched Model | MODEL | The model patched with SEGA. |