K2 Flow Sampler
A Krea 2 SAMPLER object that thinks it's smarter than Euler (and sometimes is)
- sampler
K2 Flow Sampler is the bare solver half of the ComfyUI-Krea2-FlowLab pack: it doesn't touch a model, a prompt, or a latent. Feed it a few settings and it hands you a standard ComfyUI SAMPLER object - the thing you plug into the sampler socket of SamplerCustomAdvanced. If you already run a modular custom-sampling graph for Krea 2 and just want to swap in a different solver without rebuilding anything, this is the node you'd reach for.
It's the same solver the pack's all-in-one node uses internally, exposed raw. The author is clear this is an experimental inference-time solver, not an official Krea implementation - it's one indie dev's attempt to squeeze better 8-step Turbo output out of a fancier integrator, and the wider community hasn't really stress-tested it yet. Take the default results as a starting hypothesis, not a verdict.
How it works
Under the hood it wraps a sample_k2_flow function in ComfyUI's KSAMPLER, so it obeys the normal custom-sampler contract and makes exactly one model evaluation per step. The interesting part is what it does with each evaluation:
- Variable-step Adams-Bashforth-2 - a second-order correction that uses the previous step's derivative, rescaled for the current step size, instead of blindly walking Euler-style.
- Curvature gating - it compares the direction of the current velocity field to the previous one (cosine similarity plus a magnitude check) and blends back toward plain Euler when the trajectory turns sharply. That's the guard that keeps a multistep method from overshooting on a twisty path.
- Trust-region limiting - the correction is capped both globally (RMS) and locally (a soft limiter per spatial region), so one wild tensor can't shove the whole image off course.
There's also an eta knob for stochasticity, but it's deliberately windowed: eta_start (0.25) and eta_end (0.72) mean re-noise only happens in the middle of the trajectory, using rectified-flow ancestral transport scaled by s_noise. Start and end stay deterministic.
The inputs
- preset -
euler(correction off, your baseline),conservative,balanced(default),detail, orcustom. The four solver widgets below are only honored when preset iscustom; otherwise the preset's own values win, so don't fiddle them and expect movement. - correction_strength, curvature_threshold, trust_ratio, local_trust - the AB2 guts, manual mode.
- eta, eta_start, eta_end, s_noise - the stochastic middle window.
eta 0is deterministic; 0.15–0.35 is the author's suggested range for Turbo.
Wiring it
K2FlowSampler ────────► SAMPLER
RandomNoise ──────────► SamplerCustomAdvanced (noise)
CFGGuider ────────────► SamplerCustomAdvanced (guider)
Since Krea 2 Turbo is guidance-distilled, keep the guider's cfg at 1.0. Pair it with the pack's K2 Native Scheduler for the sigma grid, or your own scheduler if you're comparing.
Installing it
Same story as the whole pack - no pip, no downloads:
cd ComfyUI/custom_nodes
git clone https://github.com/ekkonwork/ComfyUI-Krea2-FlowLab.git
Restart ComfyUI. Run python custom_nodes/ComfyUI-Krea2-FlowLab/verify_install.py from the ComfyUI root if you want proof the node produces a real SAMPLER object.
Common issues
- Nothing shows up - confirm the folder name is exactly
ComfyUI-Krea2-FlowLab, restart fully, and check the console for anIMPORT FAILED. - Output is worse than Euler - expected. Try
conservative+eta 0; the correction isn't free and Turbo was distilled for a short, mostly-straight trajectory. - Your
etaseems to do nothing - check the window. Ifeta_start≥eta_end, or the run finishes inside a window that doesn't overlap the middle, no noise gets injected at all.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | balanced | 5 options: euler, conservative, balanced, detail, custom |
| correction_strength | FLOAT | 0.620–1.25 | — |
| curvature_threshold | FLOAT | 0.340.02–2 | — |
| trust_ratio | FLOAT | 0.340–2 | — |
| local_trust | FLOAT | 0.850–4 | — |
| eta | FLOAT | 0.000–1 | — |
| eta_start | FLOAT | 0.250–1 | — |
| eta_end | FLOAT | 0.720–1 | — |
| s_noise | FLOAT | 1.000–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| sampler | SAMPLER | — |