Skip to content

fix(imagegen): reuse complete numbered image batches - #99

Open
rudycelekli wants to merge 1 commit into
Nutlope:mainfrom
rudycelekli:fix/imagegen-batch-cache-20261027
Open

rudycelekli wants to merge 1 commit into
Nutlope:mainfrom
rudycelekli:fix/imagegen-batch-cache-20261027

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

Summary

Reuse a complete image-generation batch instead of requesting it again. With --n 2, generation writes numbered PNGs, but the cache lookup checks the unnumbered path. A repeat request therefore misses its existing images and can make another provider request.

Check each expected numbered output, stop at the first missing file, and return the same path/paths shape as fresh generation. Explicit output still requires matching request metadata; partial batches and --force still bypass the cache. The lookup allocates only for files actually present.

Validation

The same portable tests invoke the actual CLI: unchanged main has two cache failures and four passing controls; this patch passes all six. Coverage includes default and explicit outputs, actual cached PNG content, single images, partial batches, mismatched metadata, force bypass, and a billion-image cache miss under a 32 MiB heap limit. Provider keys are removed from test processes; no generation requests or paid calls were made.

Required local reference checks (101 files), all 50 theme validations, index regeneration without a diff, and diff hygiene pass. The regression runs in the existing Node 20 verify workflow. Local runtime was Node 22; hosted CI is pending and Vercel may separately require team authorization.

Checked all 67 current/historical PRs and cache/imagegen issue overlap. Prepared with AI assistance under the account owner's direction and independently reviewed. Maintainer review and merge remain pending.

@vercel

vercel Bot commented Oct 27, 2026

Copy link
Copy Markdown

@rudycelekli is attempting to deploy a commit to the Together AI Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant