Nodes/comfyui-fams/KSampler (Complex)
ComfyUI Node

KSampler (Complex)

Three samplers in a trench coat

By famellad·Created 3 months ago·Updated 25 days ago· 0
KSampler (Complex)
  • latent_image
  • structure_model
  • structure_positive
  • structure_negative
  • style_model
  • style_positive
  • style_negative
  • specifics_model
  • specifics_positive
  • specifics_negative
  • FINAL_LATENT
  • STYLIZED_LATENT
  • STRUCTURAL_LATENT
structure_noise_seed0
structure_steps7
structure_cfg7.00
structure_sampler_name
structure_scheduler
style_noise_seed0
style_steps7
style_cfg7.00
style_sampler_name
style_scheduler
specifics_noise_seed0
specifics_steps7
specifics_cfg7.00
specifics_sampler_name
specifics_scheduler
share_seedfalse
share_cfgfalse
share_sampler_namefalse
share_schedulerfalse
generation_strategy
pass_overlap0
preview_structurefalse
low_res_hackfalse
lrh_factor0.70
hi_res_fixfalse
hrf_factor1.5
hrf_method

A stock KSampler is one pass over the latent: one prompt, one seed, one sampler, one scheduler. KSampler (Complex) breaks that into three legs - structure, style, specifics - each with its own model, prompt, seed, steps, CFG, sampler, and scheduler, all feeding the same latent in sequence. That's the "finer control over the diffusion process" the pack's README promises, and it's the flagship of this suite.

What it is

The idea is the same staging a photographer or painter uses: first lock in the composition (structure), then apply the look (style), then push detail (specifics). Each leg runs ComfyUI's standard sampler machinery on the previous leg's result - leg one starts from your latent at full denoise, legs two and three work from what came before. The node's web extension even color-codes the widget sections (Structure / Style / Specifics / Extra Parameters) so the wall of inputs is readable.

The settings that matter

The settings that actually matter:

  • generation_strategy - how the steps are counted. total_pass (default) runs the three legs as one continuous denoise schedule, so total steps add up across legs. individual_pass restarts each leg from step 0, giving each a fresh full denoise. cumulative_pass is in the dropdown but currently behaves identically to total_pass in the code - don't expect a difference.
  • preview_structure - runs only leg one and returns, so you can check composition and color before committing to the other two legs. Cheap way to iterate on a scene.
  • low_res_hack (lrh_factor, 0.7) - shrinks the latent for the structure pass, then restores full size. The tooltip's claim is real: some models compose better at small latent sizes, and locking that smaller composition in before upscaling fixes a class of "empty/awkward composition" problems.
  • hi_res_fix (hrf_factor 1.5, hrf_method double/single_early/single_late) - upscales the latent mid-generation, the same trick as the classic two-pass hi-res fix the KB covers in upscaling. The tooltip's warning is the practical one: "higher values tend to overcook the image." Trust it.

The share_* toggles (share_seed, share_cfg, share_sampler_name, share_scheduler) make the style and specifics legs reuse the structure values, and the optional style_model / style_positive / style_negative / specifics_* inputs fall back to the structure ones when left unwired. So the "default" experience is one model and one prompt, with the staging bookkeeping handled for you. The three seeds default to randomize each run - for reproducible output, lock the structure seed and tick share_seed.

Outputs and shortcuts

Three outputs come out: STRUCTURAL_LATENT (after leg one), STYLIZED_LATENT (after leg two), and FINAL_LATENT. VAE-decode the intermediate ones to compare stages side by side. A neat trick: set a leg's steps to 0 and it short-circuits to the previous result - style_steps = 0 means "skip style", which is the clean way to dial this back toward a normal sampler.

The honest part

Now the honest part. This is an experimental node from a single-commit pack, and it shows. pass_overlap exists in the UI, but the code says "TODO implement pass overlap" - it currently does nothing, so don't waste time expecting it to change anything. The default 7 steps per leg is very low - fine for drafts and seed farming, but for final images you'll want 20–30 steps and a converging sampler like DPM++ 2M. And the sampler rules from the KB still apply: on flow-matching models like Flux, Karras scheduling and CFG behave differently, so this node is happiest with classic SD 1.5/SDXL-style checkpoints and their fine-tunes.

Installing it

Install is the standard pack route - Manager (search "comfyui-fams") or git clone https://github.com/famellad/comfyui-fams into custom_nodes/, then restart. No model downloads. One thing to fix up-front: the pack needs ImageMagick + wand installed or it won't register at all, even though this node never uses them - check that before you blame the sampler.

If you read this and think "I could just chain three KSamplers," you're right - you could, with worse ergonomics. This node's whole value is the staging bookkeeping: shared settings, per-leg control, and the intermediate latents to inspect, all in one box.

CategoryFams/Samplers

Inputs (37)

NameTypeDefaultDescription
latent_imageLATENT
structure_modelMODEL
structure_noise_seedINT00–18446744073709550000
structure_stepsINT71–10000
structure_cfgFLOAT7.000–100
structure_sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
structure_schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
structure_positiveCONDITIONING
structure_negativeCONDITIONING
style_noise_seedINT00–18446744073709550000
style_stepsINT70–10000
style_cfgFLOAT7.000–100
style_sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
style_schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
specifics_noise_seedINT00–18446744073709550000
specifics_stepsINT70–10000
specifics_cfgFLOAT7.000–100
specifics_sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
specifics_schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
share_seedBOOLEANfalseOnly use the seed defined in the Structure section.
share_cfgBOOLEANfalseOnly use the CFG value defined in the Structure section.
share_sampler_nameBOOLEANfalseOnly use the sampler defined in the Structure section.
share_schedulerBOOLEANfalseOnly use the scheduler defined in the Structure section.
generation_strategyCOMBO3 options: total_pass, cumulative_pass, individual_pass
pass_overlapINT00–5
preview_structureBOOLEANfalseOnly generate the structure pass, to get a preview of the composition and a sense of the colors.
low_res_hackBOOLEANfalseSome models produce better compositions with smaller latents, this shrinks the latent for the first pass to lock that smaller composition in, and then restores the original size for the rest of the generation.
lrh_factorFLOAT0.700.05–0.95
hi_res_fixBOOLEANfalseIncrease the size of the latent mid-generation to ultimate generate a larger image with more detail.
hrf_factorFLOAT1.51–8Higher values tend to overcook the image, pick more conservative sampler/scheduler pairs or lower the guidance for the latter passes.
hrf_methodCOMBOdouble: The latent is upscaled two times, once before the style pass and again before the specifics pass to reach the desired factor. single_early: The latent is upscaled only once, right before the style pass. single_late: The latent is upscaled only once, right before the specifics pass.
style_modeloptMODEL
style_positiveoptCONDITIONING
style_negativeoptCONDITIONING
specifics_modeloptMODEL
specifics_positiveoptCONDITIONING
specifics_negativeoptCONDITIONING

Outputs (3)

NameTypeDescription
FINAL_LATENTLATENT
STYLIZED_LATENTLATENT
STRUCTURAL_LATENTLATENT