You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
serve: temporary image remains when vision encoder pipe raises #352
In v0.1.31 (9259cad4cfa3543cd3b8decab5962672b968c649), Vision.encode() writes a temporary .img file, then writes/flushes the encoder pipe and reads its reply. The img.unlink() call is after those operations.
If the encoder pipe raises (for example, BrokenPipeError after the encoder exits), that image remains in the server's vision temporary directory. The request raises, but cleanup is skipped. Repeated failures on different images can retain additional image copies while the server stays alive.
Reproducer
Run in the checkout's Python environment. No model, GPU or encoder process is needed. The synthetic bytes only exercise I/O cleanup; they are never decoded.
Confirmed against the exact v0.1.31 Vision class extracted from serve/server.py (source SHA256 d8ab9bb83001123165c14beb46b034ff33bce156957d0241d676aec0ea5407a4). Original exception: BrokenPipeError; remaining .img files: 1.
Expected / narrow repair
Remove the temporary input image even when pipe write, flush or read raises, while preserving the original exception. Put the pipe exchange inside try/finally, with img.unlink(missing_ok=True) in finally. Cache only successful embeddings as before.
Our local repair uses that cleanup. This report does not claim to fix encoder restart/recovery, and does not require an inference-policy or sampling change.
Thanks! Fixed for the next release: the temporary image is removed in a finally, with a test for a pipe that fails. This issue closes with the release.
Activity
Niko1221 commentedon Oct 1, 2026
Thanks! Fixed for the next release: the temporary image is removed in a
finally, with a test for a pipe that fails. This issue closes with the release.serve: a template refusal answers 400 (#365); the temporary image goe…
Engine 0.1.33: a portable image encoder again (Niko1221#411 Niko1221#412
Niko1221 commentedon Oct 1, 2026
Fixed in 0.1.33. Thanks!
serve: a template refusal answers 400 (#365); the temporary image goe…
Engine 0.1.33: a portable image encoder again (#411 #412), setup reco…
serve: a template refusal answers 400 (Niko1221#365); the temporary i…
Engine 0.1.33: a portable image encoder again (Niko1221#411 Niko1221#412
serve: a template refusal answers 400 (Niko1221#365); the temporary i…
Engine 0.1.33: a portable image encoder again (Niko1221#411 Niko1221#412