Nodes/CRT-Nodes/KSampler Batch Advanced (CRT)
ComfyUI Node

KSampler Batch Advanced (CRT)

The batch sampler with a two-stage detail daemon bolted on

By PGCRT·Created 2 years ago·Updated a day ago· 132
KSampler Batch Advanced (CRT)
  • model
  • vae
  • positive
  • negative
  • latent_image
  • image
  • images
  • comparison_grid
  • latents
seed0
increment_seedtrue
steps8
cfg1.0
sampler_name
scheduler
denoise1.00
modeBatch (Parallel)
image_megapixels1.00
edit_model_flux2kleinfalse
reference_modeper_item
enable_vae_decodetrue
create_comparison_gridtrue
save_imagestrue
save_folder_path.\ComfyUI\output
save_subfolder_nameKSAMPLER_BATCH_ADV
save_filename_prefixoutput
stage1_sigma_factor1.005
stage2_sigma_factor0.995
stage1_sigma_start0.300
stage1_sigma_end0.500
stage2_sigma_start0.000
stage2_sigma_end0.700
details_amount_stage10.50
details_amount_stage20.15
enable_noise_injectionenable
injection_point0.50
injection_seed_offset1
injection_strength0.10
normalize_injected_noiseenable

Take everything KSampler Batch (CRT) does - batch sampling, one conditioning pass, per-item seeds, image batches, comparison grids, self-saving - and add a two-stage sampling schedule plus a noise-injection pass, and you get this node. It's the advanced sibling, for when the plain batch sampler gets you 90% of the way and you want the last 10% of control over detail.

Same core story as the base node: encode conditioning once, render the whole batch in a single pass. The differences are the extra stages, and they're the entire reason to pick this one over the plain version.

The two-stage sampling

Instead of one denoise schedule, you get stage1 and stage2 sigma ranges. In plain terms: stage 1 runs over a coarse part of the schedule to establish composition, stage 2 runs over a finer range to polish detail. The knobs:

  • stage1_sigma_start / stage1_sigma_end and the stage-2 equivalents define the schedule regions. Defaults run stage 1 from 0.3→0.5 and stage 2 from 0→0.7 - the numbers are sigma fractions, and the stage1_sigma_factor (1.005) and stage2_sigma_factor (0.995) are tiny nudges to keep the stages from overlapping exactly.
  • details_amount_stage1 and details_amount_stage2 are the "detail daemon" - positive values push detail, negative values suppress it. Defaults are 0.5 for stage 1 and 0.15 for stage 2, which reads as "coarse pass does the heavy lifting, fine pass adds a little polish." If your batch comes out overcooked or smeary, these two are the first thing to touch.

Noise injection

The other headline feature: enable_noise_injection (default on) injects fresh noise at a point in the schedule - injection_point (0.5 default), injection_strength (0.1), and injection_seed_offset (1, so the injected noise differs from the base seed) - with normalize_injected_noise to keep its magnitude in check. The practical effect is busting out of repetitive or stuck generations: the model gets a nudge of fresh randomness mid-schedule, which shows up as variety across a batch. Turn it down or off if your batch output starts looking noisy or unstable rather than varied.

Everything else is familiar

Model, VAE, conditioning, image/latent inputs, image_megapixels, edit_model_flux2klein + reference_mode for Klein edit/fill batches, saving to .\ComfyUI\output\KSAMPLER_BATCH_ADV by default, and the same images / comparison_grid / latents outputs. If you don't touch the advanced knobs, it behaves like a slightly more opinionated KSampler Batch - which is honestly how most people should start with it. Dial the stages and injection in only after the plain version isn't giving you the spread or detail you want.

Install and the honest caveat

cd ComfyUI/custom_nodes
git clone https://github.com/PGCRT/CRT-Nodes.git
pip install -r requirements.txt

or ComfyUI Manager → "CRT-Nodes". The honest caveat: this node is a lot of knobs, and the defaults are a reasonable starting point, not a prescription. If you're new to two-stage sampling, the sigma-factor and sigma-range settings are the easiest to break - changing stage1_sigma_start past stage1_sigma_end gives you an empty stage and a confusing render. Start from defaults, change one thing at a time, and use the comparison_grid output to actually compare before you believe what you changed did anything.

CategoryCRT/Sampling

Inputs (36)

NameTypeDefaultDescription
modelMODEL
vaeVAE
positiveCONDITIONING
seedINT00–18446744073709550000
increment_seedBOOLEANtrueEach batch item gets seed+1, seed+2, etc. Disable to use same seed for all.
stepsINT81–10000
cfgFLOAT1.00–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
denoiseFLOAT1.000–1
modeCOMBOBatch (Parallel)2 options: Batch (Parallel), Sequential
image_megapixelsFLOAT1.000.1–16Target resolution in megapixels. Images are resized (lanczos) preserving aspect ratio.
edit_model_flux2kleinBOOLEANfalseEnable ReferenceLatent-style conditioning for edit/fill models (flux2klein).
reference_modeCOMBOper_itemper_item: each image is its own reference. shared: image[0] is reference for all.
enable_vae_decodeBOOLEANtrueDecode latents to images using the VAE.
create_comparison_gridBOOLEANtrueCreate a horizontal side-by-side comparison grid.
save_imagesBOOLEANtrue
save_folder_pathSTRING.\ComfyUI\output
save_subfolder_nameSTRINGKSAMPLER_BATCH_ADV
save_filename_prefixSTRINGoutput
stage1_sigma_factorFLOAT1.0050–100
stage2_sigma_factorFLOAT0.9950–100
stage1_sigma_startFLOAT0.3000–1
stage1_sigma_endFLOAT0.5000–1
stage2_sigma_startFLOAT0.0000–1
stage2_sigma_endFLOAT0.7000–1
details_amount_stage1FLOAT0.50-5–5
details_amount_stage2FLOAT0.15-5–5
enable_noise_injectionCOMBOenable2 options: disable, enable
injection_pointFLOAT0.500–1
injection_seed_offsetINT1-100–100
injection_strengthFLOAT0.10-20–20
normalize_injected_noiseCOMBOenable2 options: enable, disable
negativeoptCONDITIONING
latent_imageoptLATENTStarting latent. If image is also connected, image takes priority. If neither is connected, a dummy empty latent is auto-generated.
imageoptIMAGEInput image batch. Resized to image_megapixels before encoding. In edit_model_flux2klein mode: used as reference latent.

Outputs (3)

NameTypeDescription
imagesIMAGE
comparison_gridIMAGE
latentsLATENT