Nodes/comfyui-qwen-sega/Qwen SEGA Settings
ComfyUI Node

Qwen SEGA Settings

The Config Node Behind the Experiment (and Which Knobs Are Real)

By ventacom·Created 3 months ago·Updated 3 months ago· 0
Qwen SEGA Settings
    • sega_settings
    sega_strength1.00
    sega_start_percent0.000
    sega_end_percent1.000
    frequency_modeadaptive
    low_freq_weight1.00
    high_freq_weight1.00
    rope_scale_min0.90
    rope_scale_max1.20
    debugfalse

    QwenSEGASettings doesn't generate a single pixel. It's the control panel half of a two-node pack, and its only output is a SEGA_SETTINGS object that the sibling Qwen SEGA Sampler swallows whole. If you've landed here it's because you installed ventacom/comfyui-qwen-sega and found yourself staring at nine floats. That's the whole pack: a config node and a sampler node - an MVP port of "Qwen SEGA", a frequency-aware reweighting of Qwen-Image's attention, done ComfyUI-native.

    Set expectations before you build anything. This is early, unproven code from an author with no community footprint to speak of, and the pack name barely exists on reddit - it's an experiment you run to see if sharper Qwen-Image outputs justify the extra VRAM, not a default you bolt onto every graph. That's fine. Just know what you're buying.

    What the knobs actually do

    The sampler runs an FFT on the current latent on every denoising step, measures how much spectral energy sits in each frequency band, then rescales Qwen's rotary position embeddings (RoPE) to steer where attention lands. That happens per frequency and per step, and this node is how you tune it:

    • sega_strength (0–4, default 1) - the master volume. Effective strength is strength × dynamic_spread, a per-step measure of how concentrated the spectrum is. At pure noise the effect is near zero, so it ramps in naturally as detail appears. Start at 1; try 1.5–2 before touching anything else.
    • sega_start_percent / sega_end_percent (0–1) - the active window of denoising, derived from the sigma schedule. Defaults run the whole way (0 to 1). If you only want the late detail phase affected, try 0.4–0.9.
    • rope_scale_min / rope_scale_max (default 0.9 / 1.2) - the clamp range for per-frequency RoPE scaling. This is your guardrail: keep it near 1.0 and the effect stays subtle; widen it and things get aggressive fast.
    • low_freq_weight / high_freq_weight and frequency_mode - spectral weighting bias. One honest note from reading the source: low_boost and balanced currently compute the same ramp, and with both weights at 1.0 every mode is identical. The mode that actually does something distinct is high_boost, and even the weights only matter once you set them apart from 1.0. Don't obsess over this knob.

    debug is just a boolean that toggles debug behavior in the patch path. Flip it on only if you're digging into the code.

    What it outputs

    One thing: sega_settings (type SEGA_SETTINGS). Wire it into the sega_settings input on Qwen SEGA Sampler. That's the entire downstream - there's no other consumer.

    Installing it

    The pack installs like any custom node: search "comfyui-qwen-sega" in ComfyUI Manager, or clone by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ventacom/comfyui-qwen-sega
    cd comfyui-qwen-sega
    pip install -r requirements.txt   # just numpy
    

    Then restart ComfyUI. The dependency list is refreshingly tiny - numpy only - because the heavy lifting rides on ComfyUI's own torch and its native Qwen-Image support. And that's the catch: you need a recent ComfyUI build that ships QwenImageTransformer2DModel. On an older build the sampler has no Qwen model to validate, so the whole pack is dead weight until you update.

    Where people get stuck

    • The settings object validates itself. Set sega_start_percent above sega_end_percent, or rope_scale_min above rope_scale_max, and the node raises a clear ValueError. That's the pack telling you the graph is nonsense, not a bug.
    • It does nothing on its own. No sampler, no effect - if you expected this node to change images by itself, that's the wrong mental model.
    • It's per-branch, not global. Build a fresh settings object for each sampler branch you want to compare side by side.
    Categorysampling/custom_sampling

    Inputs (9)

    NameTypeDefaultDescription
    sega_strengthFLOAT1.000–4
    sega_start_percentFLOAT0.0000–1
    sega_end_percentFLOAT1.0000–1
    frequency_modeCOMBOadaptive4 options: adaptive, balanced, low_boost, high_boost
    low_freq_weightFLOAT1.000–4
    high_freq_weightFLOAT1.000–4
    rope_scale_minFLOAT0.900.1–4
    rope_scale_maxFLOAT1.200.1–4
    debugBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    sega_settingsSEGA_SETTINGS