Cut layout-agent cost: contact-sheet montage instead of N single crops #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Measured on the 41-page run: roughly 100k tokens per layout agent, ~56 agent-runs, some agents making 70–100 tool calls. The spend is dominated by zoom crops read one image at a time.
Proposal:
v0_annotate.py <chapter_dir> <page_stem> --sheet [--scale N]emits a single montage of all regions at ~3x, each tile labeled with its region id, so an agent verifies every glyph in one image read instead of twenty.Related: layout agents currently verify against the annotated preview, not the rendered page — two regions passed layout and then failed QC because the bbox was a correct glyph extent but an inadequate fill target. Consider having the layout agent run the typesetter and check its own render before declaring
layout_verified.