Nodes/ComfyUI-Flow-Control/Flow - KSampler
ComfyUI Node

Flow - KSampler

A KSampler that takes its orders from your loader

By krich-cto·Created 2 years ago·Updated 2 years ago· 1
Flow - KSampler
  • basic_pipe
  • gen_info
  • latent_image
  • latent
  • basic_pipe
  • gen_info
seed0
denoise1.00

Normal KSamplers make you set steps, CFG, sampler and scheduler on the node itself, every single time, and they usually don't agree with the model you loaded. FlowKSampler flips that: it reads steps, CFG, sampler name and scheduler out of a gen_info dictionary that comes from the pack's checkpoint or Flux preset loader. You pick the checkpoint, the loader remembers how that checkpoint wants to be sampled, and the sampler just obeys. Same idea as the CivitAI "Generation data" defaults people manually copy, except it's automatic and it stays in the graph.

This is the sampler node inside ComfyUI-Flow-Control, so it's built around the pack's gen_info pipe. It's also the node where the pack's Flux support actually lives.

How it works

It takes a basic_pipe - that's the (model, clip, vae, positive, negative) bundle the Flow loaders and encoders produce - plus latent_image, a seed, a denoise, and the all-important gen_info. From gen_info it pulls steps, cfg, sampler_name and scheduler. Everything you'd normally dial on the sampler is dialed on the loader instead.

The interesting branch is Flux. Since base in gen_info says "Flux", it doesn't run classifier-free guidance - Flux doesn't work that way. Instead it uses the noise/guider plumbing from ComfyUI's custom sampler nodes (Noise_RandomNoise + BasicGuider), injects the loader's guidance value into the conditioning, and runs a plain guided diffusion schedule. So the same node handles CFG-based SDXL/Pony/SD15 sampling and guidance-based Flux, switching on the metadata.

Along the way it stamps seed and denoise back into gen_info, which is how FlowSaveImage knows what seed to record even though the seed was set here, not on the loader.

The inputs that matter

  • basic_pipe - the whole (model, clip, vae, positive, negative) bundle. Wire it from FlowCheckpointPresetLoader or FlowFluxPresetLoader → FlowClipTextEncode → here.
  • gen_info - carries the sampler settings. This is the steering wheel.
  • seed - the only thing you'll actually change per run (plus maybe denoise for img2img).
  • latent_image - your empty latent or the img2img latent.

Outputs: latent (the denoised result, straight into VAE Decode), basic_pipe and gen_info passed through so you can chain to the next stage or the save node.

Install

Part of ComfyUI-Flow-Control, one install:

cd ComfyUI/custom_nodes
git clone https://github.com/krich-cto/ComfyUI-Flow-Control

Restart ComfyUI, or use Manager and search "ComfyUI-Flow-Control". No downloads beyond what the loaders already need.

Gotchas

The obvious trap: if gen_info isn't a dict from the Flow pipe, the node bails out and returns your input latent without sampling anything. Connect a stock sampler's gen_info (there isn't one) or feed it garbage and you'll get a blank run that silently passes your latent through - the console prints "Invalid generate information type" so keep an eye on it. Also remember steps/CFG/sampler/scheduler are now living on the loader, which is a mental shift if you're used to tuning them on the sampler. If you edit a preset, the sampler doesn't care - it just re-reads gen_info next run. That's the feature and the confusion, both.

CategoryFlow/Sampler

Inputs (5)

NameTypeDefaultDescription
basic_pipeBASIC_PIPE
gen_infoGENINFO
latent_imageLATENT
seedINT00–18446744073709550000
denoiseFLOAT1.000–1

Outputs (3)

NameTypeDescription
latentLATENT
basic_pipeBASIC_PIPE
gen_infoGENINFO