Skip to content

About

Pi extensions that keep image-heavy sessions small

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

English · 简体中文 · Español · Русский · 日本語

pi-image-compact

Keeps image-heavy Pi sessions small, so a pile of screenshots no longer ends in a 413 "request too large" error. In a modelled session of 12 large figures, every request stays under 16 MB and the session sends about half the image tokens (182k instead of 373k). On a public test set of 12 screenshots, plots and photos, WebP made the images a third smaller (3.22 → 2.16 MB).

The same twelve figure reads with and without pi-image-compact

pi-image-compact.mp4

Also on YouTube.

pi install npm:pi-image-compact

Four independent extensions; turn any of them off with pi config: compress · budget · prune · status

Image tokens per request and per session, with and without pi-image-compact

Development

npm install && npm test

Contributing

I am still learning, so ideas, issues and pull requests are all very welcome.

License

MIT

About

Pi extensions that keep image-heavy sessions small

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages