Nodes/Y7Nodes for ComfyUI/Y7 Flux.2 Sampler
ComfyUI Node

Y7 Flux.2 Sampler

The Flux.2 sampler that can't drift out of sync

By yushan777·Created about a year ago·Updated 4 days ago· 8
Y7 Flux.2 Sampler
  • model
  • latent_image
  • positive
  • negative
  • output
seed0
cfg1.0
sampler_nameeuler
steps4
denoise1.00

Sampling a Flux.2 model in stock ComfyUI is a five-node ceremony: RandomNoise for the seed, KSamplerSelect for the sampler, Flux2Scheduler to build the sigma schedule, CFGGuider to hold the model and conditioning, and SamplerCustomAdvanced to actually run it all. Every template workflow ships that chain, but hand-building it is where people get burned - most often on the scheduler, which makes you type width and height separately from the latent you're actually sampling. Change the resolution upstream, forget to update the scheduler, and you get artifacts you'll blame on the model. Y7 Flux.2 Sampler is that entire chain in one node, from solo-author pack Y7Nodes (menu: Y7Nodes/Klein), and it closes the width/height trap by construction: there are no width or height widgets at all.

How it works

Flux.2 latents are downscaled 16x from pixels, so the latent's own spatial dimensions are the token grid the sigma schedule needs. The node reads them straight off the incoming latent_image, runs the same "empirical mu" sigma math the built-in Flux2Scheduler uses (vendored into the pack so it doesn't depend on ComfyUI internals), and hands the result to a standard CFG-guided sampler. In practice it behaves like a KSampler that already knows the right scheduler - feed it a model, conditioning, and a starting latent, and you get a denoised latent back.

A genuinely nice detail for edit workflows: any noise_mask carried on the incoming latent is honored automatically. That's exactly what the pack's Y7 Flux.2 Klein Edit 1 node stamps onto its reference_latent output, so a masked inpaint-style edit flows through this sampler with zero extra wiring.

The inputs that matter

  • model - your Klein (or full Flux.2) checkpoint.
  • latent_image - the latent to denoise, from an Empty Flux.2 Latent for fresh generations, or the reference_latent output of the Klein Edit node. Its dimensions set the resolution.
  • positive / negative - conditioning in, same as any sampler.
  • cfg (default 1.0) - this default is the point. The distilled Klein checkpoints are guidance-distilled, meaning CFG is effectively baked in; at 1.0 the negative is skipped. If you're used to SDXL habits, resist cranking it.
  • sampler_name (default euler) and steps (default 4) - Klein's designed settings.
  • seed - standard controls, including randomize. Set ComfyUI's "widget control mode" to Before once so the number on screen is the seed actually used.

Settings for the right Klein variant

The defaults target the distilled checkpoints (4 steps, CFG 1, euler), which is what almost everyone runs. Two adjustments worth knowing:

  • The most common quality fix for the distilled models is 8 steps and a CFG of about 1.2–1.5 - it costs roughly 2x the wall time and buys back most of the anatomy glitches (extra fingers, third arms) Klein is known for.
  • If you load a base (non-distilled) Klein checkpoint instead, those defaults are wrong - base wants ~50 steps at CFG 4–5. Leave it at 4 steps and CFG 1 and you'll get soft, mushy results and blame the model. The step count goes to 4096 and CFG to 100, so the node can do either; the default is just the distilled sweet spot.

Output: one output LATENT, ready for a VAE Decode. Wire it to decode and preview, same as any sampler output.

Install

Easiest is ComfyUI Manager - search Y7 or Y7Nodes, install, restart. Manual is the usual pair of commands:

cd ComfyUI/custom_nodes
git clone https://github.com/yushan777/ComfyUI-Y7Nodes
cd ComfyUI-Y7Nodes
pip install -r requirements.txt

Then restart ComfyUI. The pack's requirements list is mostly for its other nodes (token counters, LM Studio clients) - this sampler itself adds no dependencies beyond current ComfyUI, and it downloads no model files. The Klein weights, VAE, and Qwen3 text encoder are separate HuggingFace downloads, not something the pack fetches for you.

Gotchas

Two real ones. First, because the node is written against ComfyUI's newer comfy_api node interface, an out-of-date ComfyUI may not show it at all - update core before you debug anything else. Second, don't expect negative-prompt magic: at the distilled default of CFG 1.0 your negative conditioning is effectively ignored, and that's correct behavior, not a bug. If you genuinely need negative steering you're on the wrong checkpoint - that's what the non-distilled base models are for.

CategoryY7Nodes/Klein

Inputs (9)

NameTypeDefaultDescription
modelMODEL
latent_imageLATENTLatent to denoise. Its width/height also determine the Flux.2 sigma schedule, so no separate width/height widgets are needed.
positiveCONDITIONING
negativeCONDITIONING
seedINT00–18446744073709550000
cfgFLOAT1.00–100
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
stepsINT41–4096
denoiseFLOAT1.000–1How much of the latent to redo. 1.0 = start from pure noise (normal generation); 0 returns the latent untouched. Matches SplitSigmasDenoise. Note it shortens the run as well as the noise level, so at 4 steps only a handful of settings are reachable, and Flux.2's schedule means even 0.5 keeps under 10% of the incoming image - leave it at 1.0 unless you know you want this.

Outputs (1)

NameTypeDescription
outputLATENT