Nodes/ComfyUI-AReA/AReA Bootstrap Sampler
ComfyUI Node

AReA Bootstrap Sampler

The AReA Bootstrap Sampler

By smthemex·Created 16 days ago·Updated 16 days ago· 3
AReA Bootstrap Sampler
    • SAMPLER
    ◄bootstrap_side1024►
    ◄phase1_steps8►

    One sampler instead of two passes

    The normal way to get a big FLUX image is the hi-res fix: generate at 1024, upscale the latent, run a second pass at 0.3–0.5 denoise, hope the composition survives. It works, it's fiddly, and you end up with two KSamplers, a scheduler and an upscale node duct-taped down the middle of the graph.

    The AReA Bootstrap Sampler does the same thing inside a single sampler. Stage one generates at the resolution FLUX was trained for. Then the clean latent is bicubic-upsampled to your target size, re-noised, and denoised again - this time with AReA's windowed high-res attention carrying the detail. The patch node supplies the attention; this node supplies the two-stage schedule. It outputs a SAMPLER, not a latent, so it goes into the sampler input of SamplerCustom.

    You don't strictly need it - a patched model plus a normal KSampler at 2048 works. But for txt2img this is the convenience path, and the one I'd reach for.

    What actually happens in the loop

    The order of operations matters because two of this node's gotchas fall straight out of it.

    Stage one ignores the target-resolution noise the sampler was handed. It builds its own latent at bootstrap_side / 8 latent pixels, scaled down if your target is smaller, and runs the whole sigma schedule with plain Euler. At that size you're at or under FLUX's native extent, so the patch node leaves attention alone and this stage is cheap.

    Stage two interpolates that latent up to your real canvas, takes fresh noise from the same seed, and re-noises at the sigma where phase1_steps sits. Then Euler runs the remaining steps at full resolution, where the patched model has switched to Phase II windowed attention. Coarse structure at native res, fine detail at target res - smarter than denoise-the-blurry-upscale-and-pray.

    It's Euler flow-matching, top to bottom. There's no other solver in here and no ancestral noise beyond the stage-two re-noise. A DPM++ variant or a RES4LYF beta schedule won't do what you expect, because this sampler is the thing choosing the steps - the rest is just a scheduler's sigmas.

    The two settings

    bootstrap_side (default 1024, 512–2048) is "side (px) of the stage-1 native-resolution generation". 1024 is FLUX's training size and the sane default; drop to 768 if you're short on time or the composition isn't demanding. Pushing it to 2048 defeats the point - you're back to generating above native resolution with plain attention.

    phase1_steps (default 8, min 1) is where stage two starts - "where Phase II begins in the full step count". Keep it equal to phase1_steps on the AReA patch node. That's the author's own instruction, and ignoring it is the single easiest way to make this node produce mush: the sampler re-noises at step 8 while the model still thinks it's in coarse Phase I, so your remaining steps refine with the wrong attention. It also has to be a fraction of your total steps - at 8 steps total, a phase1_steps of 8 gives stage two a single step, which isn't a second pass, it's a smear. Around a third of your count, same as the patch node.

    That's it. Two widgets, one output. Everything else comes from the model you patched and the sigmas you fed it.

    Wiring it up

    Load example_workflows/AReA-flux.json and look at the top branch: UNETLoader (or LoraLoaderModelOnly after it) → AReAModelPatch → SamplerCustom's model; AReABootstrapSampler → SamplerCustom's sampler; plus a BasicScheduler's SIGMAS, an EmptySD3LatentImage at target size, and your two conditionings. The workflow's own note lists the sizes that work: 2048², 2048×1152, 3072×1728, up to 6144×2048 for panoramas.

    Same install as the rest of the pack, nothing extra:

    cd ComfyUI/custom_nodes
    git clone https://github.com/smthemex/ComfyUI-AReA
    # restart ComfyUI
    

    No requirements, no downloads beyond the FLUX.1 diT, clip_l, t5xxl and ae.safetensors you already have. ComfyUI Manager: search "ComfyUI-AReA".

    Where people get burned

    It only bootstraps on an empty latent. The two-stage path fires when there's no denoise mask and the latent is all zeros. Feed it a VAEEncode of a real image and it quietly runs plain Euler at that resolution - no stage one, no upscale. Correct behaviour, but it looks like the node did nothing. For img2img super-resolution the example workflow does something better: ImageScale up, VAEEncode, patch the model with phase1_steps at 0, plain euler KSampler at about 0.45 denoise.

    Two seeds, one picture. The sampler draws both stages' noise from the KSampler's seed. The seed on the patch node only jitters window boundaries, halo widths and random pooling, so if changing it barely moves the image, that's expected.

    It scales the wrong way for tiny cards. Stage two at 2048+ is the expensive half, and neither stage saves you from the VAE decode afterwards. On a 12GB card, with an fp8 model, 2K is the practical ceiling; turn on tiled VAE.

    It's FLUX.1 only. The patch node will refuse anything that isn't ComfyUI's native Flux class, and Kontext/Fill skip the attention path entirely because of their reference latents. Don't expect this sampler to do anything for edits.

    Worth saying once: smthemex (smthem on HF) ports the week's paper to ComfyUI before anyone else, and the tradeoff is a pack that assumes you opened his example workflow. Do that and this node just works. Build the graph from the node list alone and you'll spend an evening on sigma alignment.

    CategoryAReA

    Inputs (2)

    NameTypeDefaultDescription
    bootstrap_sideINT1024512–2048Side (px) of the stage-1 native-resolution generation.
    phase1_stepsINT81–64Where Phase II begins in the full step count. Keep equal to phase1_steps of the AReA patch node.

    Outputs (1)

    NameTypeDescription
    SAMPLERSAMPLER—