Nodes/ComfyUI_Fill-Nodes/FL KSampler SEG Advanced
ComfyUI Node

FL KSampler SEG Advanced

Sampling regions over half a schedule

By filliptm·Created 3 years ago·Updated a day ago· 638
FL KSampler SEG Advanced
  • model
  • regions
  • latent_image
  • positive
  • negative
  • latent
add_noiseenable
noise_seed0
steps25
cfg6.5
sampler_name
scheduler
start_at_step0
end_at_step10000
return_with_leftover_noisedisable
cascade_start_cornertop_left

Most regional samplers give you one dial: denoise per region. FL KSampler SEG Advanced gives you the step window instead - start here, stop there, keep the leftover noise or don't. That's the KSampler Advanced vocabulary bolted onto a per-region segmented sampler, and it's a lot more control than it sounds like once you start chaining passes.

It's the same cascade engine as the basic SEG sampler, just with the schedule exposed. If you haven't met the family yet: the pack's region nodes tessellate your image into overlapping feathered regions, and the SEG sampler walks them in a corner-anchored nearest-neighbour order, sampling each region against the in-progress canvas so the model sees previously painted territory as context. The seam blending happens in feature space because the model does it, not because you got clever with a pixel-space feather.

The mechanism, briefly

start_at_step and end_at_step are indices into the full schedule, applied to every region. Zero to the end is a normal run. Start at 10 of 25 and every region only sees the last 60% of the schedule - useful for refinement passes and for chaining two of these nodes.

The two switches that matter:

  • add_noise - enable when you're starting from a source latent, disable when continuing a latent that already contains noise. Getting this backwards is the classic "why is my image pure static" bug.
  • return_with_leftover_noise - disable finishes the window at zero noise even if you stopped early, enable keeps the noise so a following sampler can pick up where this one left off. That's a two-stage pipeline: sample the first window, hand the noisy latent to a second node with a different prompt or model.

Everything else is familiar: steps, cfg, sampler_name, scheduler, noise_seed, and cascade_start_corner (top_left, top_right, bottom_left, bottom_right, center) which sets where the traversal begins.

Inputs worth explaining

regions is the interesting one. The tooltip says it plainly: encoded regions override positive and negative; use raw Regions to preserve connected reference conditioning. So if you've run your regions through a captioner and encoder, this sampler uses those per-region encodings and your positive/negative become fallbacks. If you're feeding raw regions straight out of the region node, the global positive and negative apply - and if your model has reference conditioning attached (the Krea route), raw regions are what keeps it intact rather than being replaced by per-region conditioning.

latent_image is your starting latent - empty for a fresh generation, or a real one for a refinement pass. model carries any patches, which is how the reference-blending variants hook in.

One behavior worth knowing if you write, and it's in the node's own description: splitting across nodes is not identical to one uninterrupted pass. Overlapping regions get composited in cascade order, so two half-schedule passes won't produce byte-identical output to one full pass. Close, not identical. If you're chasing reproducibility, decide which structure you're using and stay in it.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes

Restart ComfyUI. The pack is a big grab-bag and its requirements.txt is long - librosa, kornia, OpenGL, PDF and API libraries all install whether or not you use them, so the first run after cloning is slow. Nothing in this node needs a downloaded model of its own. You'll want a ComfyUI recent enough for comfy_api.latest, which this node family is built on; on an old build the whole pack can fail to import and no Fill-Nodes nodes appear at all.

Where people get burned

Empty step window. Set start_at_step at or past end_at_step and the node returns your input latent untouched - no error, no visible change. If a sample did nothing, check the window before you check anything else.

An empty latent with a low denoise. The family's rule is real: an empty latent wants a full schedule, an existing latent wants a partial one. If you're refining, feed a real latent. If you're generating, don't shave steps off the front and expect a picture.

Region count and time. Each region is sampled in its own pass, so eight regions over 25 steps is a long queue. The overlap guarantee means coverage is fine at any count, but "more regions" is not free quality - the useful move is fewer, well-placed regions.

Category🏵️Fill Nodes/Ksamplers

Inputs (15)

NameTypeDefaultDescription
modelMODEL
regionsSEG_REGIONSEncoded regions override positive and negative. Use raw Regions to preserve connected reference conditioning.
latent_imageLATENT
positiveCONDITIONING
negativeCONDITIONING
add_noiseCOMBOenableEnable for a source latent. Disable when continuing a latent that already contains noise.
noise_seedINT00–18446744073709550000
stepsINT251–10000
cfgFLOAT6.50–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
start_at_stepINT00–10000Start index in the full schedule, applied to every region. Zero starts at the beginning.
end_at_stepINT100000–10000Stop index in the full schedule. Values above steps run to the end. An empty step window returns the input unchanged.
return_with_leftover_noiseCOMBOdisableDisable to finish at zero noise even when stopping early. Enable to retain noise for a following sampler.
cascade_start_cornerCOMBOtop_left5 options: top_left, top_right, bottom_left, bottom_right, center

Outputs (1)

NameTypeDescription
latentLATENT