Sampler Steps at Equal Turning Angles Cut Flow-Model Error by 30–43%
The idea is simple: a multistep sampler already remembers the previous velocity, and the cosine between the old and new velocity shows how sharply the trajectory turns. The author tried to turn this into an adaptive step size on the Anima model. The controller lost to the standard schedule because its first step is blind. But a step grid built in advance at equal turning angles delivered a clear gain.
AI-processed from Habr AI; edited by Hamidun News
Every step a flow model takes when generating an image costs a full pass through a large network. Everyone therefore wants fewer steps at the same quality, and the key question is where exactly to place those steps. The author of a study on Habr tested an elegant idea: take a hint from something the sampler already computes for free. The idea survived only half-intact, and the second half turned out to be more practical than the first.
A free signal and what it sees
A multistep sampler such as Adams-Bashforth stores the previous velocity. The cosine between the old and new velocity requires no extra network calls. If it is close to 1, the trajectory is almost straight and the step can grow. If the direction changes sharply, it is better to break the step into smaller ones.
The signal has a blind spot: the cosine sees the rotation of the velocity but not the change in its length. On Anima this barely matters in the middle of the trajectory, where length accounts for 0.3–0.4% of the acceleration energy. At the ends, the contribution of length rises to 8–9%, and in places to 23%.
The error estimate for an Euler step, E = (h/2)·|v|·θ, where θ is the angle between neighboring velocities, works well. Its median ratio to the real error is 80–84%, and the correlation across units (prompt-and-seed combinations) reaches 91–92%. All it needs is a calibration constant.
There is also a noise floor. In bf16 with classifier-free guidance, the angle between neighboring velocity evaluations jitters by about 1.7°. This is rounding noise, not roughness in the flow. A controller that targets an angle below this floor collapses to the minimum step.
The controller lost, the grid won
The adaptive controller h_next = h · (target_angle / measured_angle) turned out worse than the standard schedule at an equal number of calls. The error depended not on the target angle but on the initial step: 0.80 at a step of 0.06, 0.51 at 0.02, and 0.26 at 0.01. The reason is that the first step has no history, so the controller is blind exactly where curvature is greatest.
The author then built a static grid in advance. He averaged the velocity turning rate over the remaining 11 units and placed the steps so that the turning angle was the same at every step. He then ran plain Euler.
The result: error relative to the converged solution is 30–43% lower at 8, 12, 16 and 24 calls than with the standard ComfyUI schedule. Adding an error-propagation profile (early error weighs about four times more at the end) lifts the gain to 41–50%. At that point, 8 calls give lower error than the standard schedule at 24. On a prompt with a face, the grid reaches the reference composition in just 8 steps, while the standard schedule draws a different one.
Adapting to a specific image added nothing. A grid built from one image and applied to another gave the same error. So the gain comes from the shape of the grid, not from tuning to the trajectory.
Where it breaks down
The metric changes the picture. By LPIPS, the grid wins by 30–35% and comes out ahead in 9–11 of 12 units. On flat fills, faces and geometric grids, LPIPS is 39–48% lower. But on a texture prompt (fur), LPIPS is about 16% worse, even though the latent-space distance improved. The grid places steps early, where composition is decided, and few at the end, where fine texture emerges, so the image comes out smoother.
The author lists the limitations candidly:
- one model (Anima), one resolution, one guidance scale;
- 12 units, so effects below 5–8% are not visible;
- the hypotheses were not fixed before the measurements, and the finding about the first step was obtained post hoc;
- only Euler and Adams-Bashforth 2 were tested, and on these grids the latter is worse than Euler;
- the idea is not new: a similar approach was proposed in CAT-Flow, which the author did not compare against.
What to do with this
If you run a flow model in ComfyUI and count network calls, do not assume the standard schedule is optimal for a small number of steps. For Anima, the repository contains ready-made sigma lists for 8, 12, 16 and 24 calls. You can feed them into the manual sigmas node with the standard euler sampler (576×768, CFG 5).
For a different model, you need to capture reference trajectories and compute the turning-rate profile. One image takes about two minutes. The author did not test how many images are enough. For texture-heavy scenes, it is better to compare the grid by eye rather than by a latent metric alone. The code, 30 tests and the preprint are available in the YakovSava/zero-cost-proxy-research repository.
- Nov 6, 2026INT8 barely degrades images, and the AB-2 sampler beats Euler in 12 of 12 tests
- Oct 9, 2026MESSENGER cuts 3D motion forecasting error by 71.6% on nuScenes
- Jul 19, 2026Solo developer behind Sunarius: neural networks didn't build the RPG for him, but they lowered the barrier to entry
- Jun 13, 2026German researchers train AI to track glaciers to within meters
Key Questions Answered
What are the key details on A free signal and what it sees?
A multistep sampler such as Adams-Bashforth stores the previous velocity. The cosine between the old and new velocity requires no extra network calls. If it is close to 1, the trajectory is almost straight and the step can grow. If the direction changes sharply, it is better to break the step into smaller ones. The signal has a blind spot: the cosine sees the rotation of the velocity but not the change in its length.
What are the key details on The controller lost, the grid won?
The adaptive controller h_next = h · (target_angle / measured_angle) turned out worse than the standard schedule at an equal number of calls. The error depended not on the target angle but on the initial step: 0.80 at a step of 0.06, 0.51 at 0.02, and 0.26 at 0.01. The reason is that the first step has no history, so the controller is blind exactly where curvature is greatest. The author then built a static grid in advance.
Where it breaks down?
The metric changes the picture. By LPIPS, the grid wins by 30–35% and comes out ahead in 9–11 of 12 units. On flat fills, faces and geometric grids, LPIPS is 39–48% lower. But on a texture prompt (fur), LPIPS is about 16% worse, even though the latent-space distance improved. The grid places steps early, where composition is decided, and few at the end, where fine texture emerges, so the image comes out smoother.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.