Nodes/ComfyUI_StarNodes/⭐ Star Distilled Optimizer (QWEN/ZIT)
ComfyUI Node

⭐ Star Distilled Optimizer (QWEN/ZIT)

The Z-Image-Turbo two-pass recipe, packaged as options you plug into a sampler

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star Distilled Optimizer (QWEN/ZIT)
    • options
    enabletrue
    start_samplereuler
    refine_samplerres_multistep
    start_steps6
    refine_steps3
    start_denoise1.00
    refine_denoise0.60
    patch_shift2.55
    patch_multiplier1.00
    noise_multiplier1.00

    Z-Image-Turbo is the distilled model that eats attention for breakfast: 6B params, ~8 steps, Apache 2.0. But distilled models have a known weakness - few steps means little time to refine detail - and the community's fix for ZIT specifically is a two-pass trick: a short coarse pass, then a second refinement pass at lower denoise over the result. Star Distilled Optimizer (QWEN/ZIT) is the StarNodes way to drive that two-pass recipe, and the QWEN in the name is because the same approach applies to Qwen's distilled variants.

    One thing to get straight immediately: this is not a sampler. It's an options bundle that only does something when plugged into the options input of the pack's StarSampler (Unified) node - that's the STARNODES_OPTIONS output. On its own it does nothing.

    How it works

    Every input becomes a setting the sampler reads when it runs:

    • start_sampler (default euler) and start_steps (default 6) - the initial ZIT pass. Z-Image-Turbo's native territory is ~8 steps, and the default 6 keeps it close to the model's comfort zone.
    • refine_sampler (default res_multistep) and refine_steps (default 3) - the second pass. res_multistep is the sampler people use for this refinement step, and the tooltip helpfully notes you can swap it if your ComfyUI build lacks it. Setting refine_steps to 0 disables the refine pass entirely.
    • start_denoise (default 1.0) and refine_denoise (default 0.6) - full noise on the first pass, then a gentler 60% on the refine so the second pass cleans up rather than re-rolls.
    • patch_shift (default 2.55) and patch_multiplier (default 1) - the ZIT model-sampling patch parameters (ModelSamplingZImage-style). These adjust the sampling shift for the distilled model's schedule; the defaults are the numbers people actually run.
    • noise_multiplier (default 1) - a multiplier on the generated noise latent.

    And enable (default on) is the master switch - if you disable it, StarSampler ignores the whole bundle. That makes it easy to A/B the two-pass recipe against a single pass: same node, flip one boolean.

    Why you'd reach for it

    Because the two-pass refinement is the difference between "good enough" and "actually crisp" on a model that finishes in seconds. Z-Image-Turbo's weakness is detail at the end of its short schedule, and the coarse-then-refine pattern gives it a second chance. The alternative is building the two-pass graph by hand with custom samplers and latent plumbing - which this node replaces with a config panel.

    Installing it

    Standard StarNodes install - ComfyUI Manager, search Starnodes, install, restart:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
    cd ComfyUI_StarNodes
    pip install -r requirements.txt
    

    Search the canvas for star - it's under ⭐StarNodes/Sampler, and it needs StarSampler on the canvas to be useful.

    Gotchas

    The number one mistake is connecting this node somewhere that isn't StarSampler's options input and wondering why nothing happens. Number two: don't treat the defaults as gospel for your model - if res_multistep isn't available in your ComfyUI (it's a newer sampler), swap it or you'll hit a missing-sampler error that's easy to misread as a pack bug. And remember the refine pass at denoise 0.6 still costs a full extra sampler run; on a weak card, the speed win of ZIT shrinks fast when you double the work. Start with refine_steps at 2–3 and only raise it if the result genuinely needs it.

    Category⭐StarNodes/Sampler

    Inputs (10)

    NameTypeDefaultDescription
    enableBOOLEANtrueEnable the ZIT two-pass optimizer. When disabled, StarSampler ignores this options input.
    start_samplerCOMBOeulerSampler used for the initial ZIT pass.
    refine_samplerCOMBOres_multistepSampler used for the refinement pass (useful if res_multistep is unavailable).
    start_stepsINT61–10000Steps for the initial ZIT pass.
    refine_stepsINT30–10000Steps for the refinement pass (0 disables the refine pass).
    start_denoiseFLOAT1.000–1Denoise used for the initial ZIT pass (typically 1.0).
    refine_denoiseFLOAT0.600–1Denoise used for the refinement pass.
    patch_shiftFLOAT2.550–10ZIT model sampling shift parameter (ModelSamplingZImage-style patch).
    patch_multiplierFLOAT1.000–10ZIT model sampling multiplier parameter (ModelSamplingZImage-style patch).
    noise_multiplierFLOAT1.000–4096Multiplier applied to the generated noise latent.

    Outputs (1)

    NameTypeDescription
    optionsSTARNODES_OPTIONS