Flux2Klein KSampler Experimental
A standalone sampler tuned to Klein's shift schedule
- model
- positive
- latent_image
- negative
- LATENT
Klein's distilled checkpoints are trained on exactly 4 steps, and the author has said as much directly in support threads: push past that and the model starts "making things up" because it's operating outside the distribution it was distilled for. This node exists because the standard KSampler doesn't know that - it's a purpose-built Euler sampler with a resolution-aware shift schedule tuned to how Klein actually wants to be sampled, rather than a generic sampler you have to hand-configure correctly every time.
What it's doing differently
This calls the diffusion model directly with a shifted Euler schedule, where the shift itself scales with your output resolution - base_shift at the smallest resolution, max_shift at the largest, interpolated between. That's the mechanism behind Flux-family models' resolution-dependent sampling behavior, baked into the node instead of left for you to reason about manually. It also natively understands reference latents sitting in your positive conditioning's metadata, and supports both full denoise (text-to-image) and partial denoise from a starting latent (img2img).
It is explicitly experimental - the README calls it out as not a drop-in replacement for every standard sampler workflow, and it doesn't expose every feature a general-purpose KSampler does.
The inputs that matter
steps- default4. The tooltip spells out the split plainly: distilled checkpoints want 4, base (undistilled) checkpoints want 25–50. Mixing these up is the single most common way to get bad results out of Klein generally, not just this node.denoise-1.0for full generation from noise; lower values blend noise into your input latent for img2img.base_shift/max_shift- the schedule-shift values at minimum and maximum resolution respectively. Defaults (0.5and1.15) match Klein's official template; there's rarely a reason to touch these unless you're deliberately experimenting with the schedule shape.cfg_scale(optional) - default1.0, meaning CFG is effectively off, which is correct for the distilled default. The base (undistilled) model uses roughly4.0. This requires anegativeconditioning to do anything, since CFG needs both a positive and negative prediction to work from.guidance_embed(optional) - only takes effect if the loaded checkpoint actually has an embedded-guidance layer. The tooltip is explicit that Klein 9B models do not, so this input is silently ignored for the checkpoint most people are running.
Output is a single LATENT - VAE-decode it as normal.
Installing it
ComfyUI Manager: search ComfyUI-Flux2Klein-Enhancer, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/capitan01R/ComfyUI-Flux2Klein-Enhancer.git
No additional dependencies.
Where people get burned
Steps is the one that actually matters here. The default 4 isn't a placeholder - it's the number the distilled checkpoint was trained on, and going higher doesn't buy you more refinement the way it does on a base model. It buys you a model improvising past what it learned, which shows up as fine-detail weirdness and artifacts that look like a bug in the sampler when the sampler is actually doing exactly what it was told. If you're seeing odd results and you've bumped steps up "for quality," that's the first thing to undo.
Second, guidance_embed being ignored on Klein 9B is expected, not broken - don't spend time debugging why that slider "does nothing" on the checkpoint most people run.
Because this is explicitly experimental and calls the model directly rather than routing through ComfyUI's general sampler infrastructure, it may not play perfectly with every custom node that expects to hook a standard KSampler - if something downstream behaves unexpectedly, try swapping back to a normal KSampler with a matching shift schedule to isolate whether the issue is this node or something else in the graph.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| latent_image | LATENT | — | |
| steps | INT | 41–200 | Denoising steps. Distilled: 4. Base: 25-50. |
| seed | INT | 00–18446744073709550000 | — |
| denoise | FLOAT | 1.000–1 | 1.0 = full denoise from pure noise. Lower values blend noise into the input latent for img2img. |
| base_shift | FLOAT | 0.500–10 | Schedule shift at minimum resolution. |
| max_shift | FLOAT | 1.150–10 | Schedule shift at maximum resolution. |
| negativeopt | CONDITIONING | — | |
| cfg_scaleopt | FLOAT | 1.01–30 | Classifier-free guidance scale. 1.0 = disabled (distilled default). Base model uses ~4.0. Requires negative conditioning. |
| guidance_embedopt | FLOAT | 1.00–30 | Embedded guidance value. Only active if the loaded model has a guidance embedding layer. Klein 9B models do not — this will be ignored for them. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |