From fc8444367d836412be4781e8c763bfef44574f57 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Thu, 8 Oct 2026 00:27:40 +0200 Subject: [PATCH] batch pipeline: a pipelined slot is a cache again, so a request left alone goes back to the solo path (#857) --- src/program/generate.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/program/generate.cpp b/src/program/generate.cpp index 7ee59c92..6e7cee50 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -8388,7 +8388,10 @@ int main(int argc, char** argv) { const double ms = std::chrono::duration(Clock::now() - sl.t0).count(); std::printf("BDONE %d %lld %s %.1f\n", gi * GS + t, (long long) sl.produced, fin, ms); sl.active = false; - sl.cached = false; // the pipeline's pad rows: a pipelined slot is not reused as a cache + // a pipelined slot is a cache again (#857: a request left alone in its slot goes back to the solo path with its + // drafts): its state is final once its last window has left the last stage. A later group window whose pad + // row writes this slot clears the flag (below, where the group starts), so a stale state is never reused + sl.cached = o.prompt_cache > 0 && !sl.img; } else { sl.x = y; sl.p += 1;