anchor_shift built the two-pass machinery — stop the schedule, hand the state over,
re-enter exactly (_sample_chunk continue_from_state, _renoise_to_sigma, _schedule_view).
The user's point: that is generally useful, not anchor-specific. This exposes it on its
own, and keeps the two features independent as they asked: reaching the second_pass
branch means anchor_shift did not act on this scene, so they can never nest.
second_pass stop partway and finish in a second pass
second_pass_sigma where pass 1 stops (walked against the real schedule)
second_pass_restart_sigma where pass 2 re-enters; 0 = carry straight on
second_pass_sigmas OPTIONAL SIGMAS socket: pass 2 runs THAT schedule instead
At restart 0 with no second schedule the split is behaviour-neutral by construction —
pass 2 resumes from the exact handed-over state, nothing added, and 5+4 steps on a
9-step schedule is still 9. It earns its keep when the second half is made different:
re-entering higher (the model reworks what it committed to) or finishing on a different
schedule entirely, so the tail can have its own step count, spacing or shift.
Two things a split gets silently wrong if you let it, both handled:
- The i2v anchor. _sample_chunk drops noise_mask from what it returns, so pass 2 would
run UNPINNED and re-denoise the reference frame. anchor_shift wants exactly that;
a plain second pass must not. _restore_pinned_prefix puts the mask back AND restores
the pinned frames from the original chunk, since a rewind re-noise adds noise
everywhere including frames that are meant to be frozen.
- The sampler's own phases. Pass 2's schedule_context is the alternate schedule at
offset 0 when one is connected, or the main schedule at the slice offset when not —
so quality steps / final-correction window / AB2 ramp are measured against whichever
schedule pass 2 is actually running.
Every refusal names its fix (cut outside the schedule, entry below the cut, a
single-sigma SIGMAS input that is not a schedule) and lands in the scene report as
second_pass(SKIPPED: ...) — never a silent no-op.
Editor + Easy Gen get the three widgets under Engine > Experimental. The SIGMAS socket
is node-graph only for now: the Editor's fixed graph takes sigmas from ("studio", 5) and
has no second scheduler node, so exposing it there is a graph-topology change I have not
made unilaterally.
Latent/pixel-space pass-2 operations (sharpen, downscale->rescale, upscale) are next,
as opt-in options with nothing on by default.
New tests/test_second_pass.py: 10 tests over the split, the separate schedule, the
refusals and the pin. Suite at baseline: 22 pre-existing failures, 299 passing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>