Nodes/SP-Nodes/SP_FluxUnsampler_InverseSampler
ComfyUI Node

SP_FluxUnsampler_InverseSampler

Dialing in the noising half of a Flux unsample

By bananasss00·Created 2 years ago·Updated 6 days ago· 20
SP_FluxUnsampler_InverseSampler
    • flux_unsampler_sampler
    sampler_name
    steps60
    use_noise_mixerfalse
    mix_percent0.98
    random_noise0.00
    mix_typemix
    random_mix_typeadd
    take_diff

    Unsampling is the trick people reach for when plain img2img can't push far enough: instead of dumping random noise onto an image and denoising once, you run the diffusion process backward along a controlled path toward noise, then forward again under a new prompt. Community comparisons describe it as holding composition like a ControlNet and style like an IP-Adapter, without needing either - but that only works if the "backward" half of the pass is actually tracking the image faithfully instead of just adding noise and hoping. SP_FluxUnsampler_InverseSampler is the node that configures that half - the inverse/noising pass - for whatever downstream node in this pack's unsampling pipeline (SP_FluxUnsampler and friends) consumes it.

    How it works

    At its core this is a sampler picker: sampler_name gives you all 44 of ComfyUI's standard samplers (euler, dpm_2, heun, dpmpp_2m, and so on), and steps sets how many of them run - default 60, notably higher than the 20-30 you'd use for a normal generation. That's not an accident; a careful inversion pass wants more steps than a forward one, because every step is an opportunity for the tracked noise path to drift from the real one, and drift here is exactly what makes unsampling fail to reconstruct the source.

    On top of the base sampler sits a "noise mixer," gated by use_noise_mixer (off by default). When it's on, mix_percent and random_noise control how much of the injected noise comes from the deterministic inversion trajectory versus genuine randomness, and mix_type/random_mix_type (each mix or add) decide whether that blending is a weighted average or a straight addition. take_diff is the other toggle - working from the difference between successive predictions rather than raw values is a common way inversion samplers fight the same drift problem. None of this is documented beyond the parameter names and defaults, so treat the mixer as "more randomness, more variety, more risk of losing the source" and dial it in by eye rather than by formula.

    Inputs and outputs that matter

    • sampler_name - pick the base algorithm; if you're not sure, start with whatever your forward pass uses so the two halves behave similarly.
    • steps (default 60) - the one worth raising if your reconstruction looks off before you touch anything else.
    • use_noise_mixer, mix_percent (default 0.98), random_noise, mix_type, random_mix_type - leave the mixer off until the plain inversion is working, then nudge it on for variety.
    • take_diff - an inversion-quality toggle; flip it if the default reconstruction is drifting.
    • Output: flux_unsampler_sampler, wired into the sampler-config slot of whichever node in your unsampling chain expects it.

    Installing it

    Through ComfyUI Manager: search "SP-Nodes," install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bananasss00/ComfyUI-SP-Nodes
    

    Restart ComfyUI afterward. No extra model download for this node specifically, but the pipeline it belongs to needs a Flux checkpoint - Dev, not Schnell, since Schnell's 1-4 step budget and lack of a real guidance scale don't leave room for a multi-step controlled inversion.

    Common issues

    The reconstruction doesn't look like the source image. Raise steps first - 60 is already generous but not infinite, and inversion accuracy degrades fast below it. If that doesn't help, the problem is more likely in the prompt describing the source (on the downstream node, not here) than in this node's settings.

    Output looks noisier or wilder than expected. Check use_noise_mixer - it's easy to leave it on from a previous test and forget it's injecting extra randomness into every run.

    It's slow. 60 steps through the inverse pass, then more steps through the forward pass, is the cost of the whole technique - this isn't the node to reach for when a quick low-denoise img2img would do the job just as well.

    CategorySP-Nodes/Group Nodes

    Inputs (8)

    NameTypeDefaultDescription
    sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
    stepsINT601–10000The number of steps used in the denoising process.
    use_noise_mixerBOOLEANfalse
    mix_percentFLOAT0.980–1
    random_noiseFLOAT0.000–100
    mix_typeCOMBOmix2 options: mix, add
    random_mix_typeCOMBOadd2 options: mix, add
    take_diffBOOLEAN

    Outputs (1)

    NameTypeDescription
    flux_unsampler_samplerflux_unsampler_sampler