Skip to content

Use the already decoded query image in find - #1701

Merged
serengil merged 3 commits into
serengil:masterfrom
Afloat16:fix/single-read-find-20261109
Nov 9, 2026
Merged

serengil merged 3 commits into
serengil:masterfrom
Afloat16:fix/single-read-find-20261109

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

What has been done

find loaded the query to validate it, then passed the original source back into face detection. A non-seekable stream was exhausted on the second read and URLs could be downloaded twice. Pass the validated BGR array into detection.

How to test

python -m unittest discover -s tests/unit -p test_single_read_find.py

The focused regression passes on Python 3.12 and fails on master a8cee7b at the second stream read. It exercises the NPZ gallery, search and skip-detector paths with a stub decoder and model. No weights or native codec were used.

@Afloat16
Afloat16 force-pushed the fix/single-read-find-20261109 branch from ef2fcb1 to 83e1b37 Compare November 9, 2026 12:24
@Afloat16
Afloat16 force-pushed the fix/single-read-find-20261109 branch from 83e1b37 to 5695078 Compare November 9, 2026 12:46
Flask 3 supplies Werkzeug Headers to the API routes. Include that existing input alongside the dictionary used by gRPC in the validate annotation. Keep the optional header type under TYPE_CHECKING.

Verified the six mypy errors on the unchanged base. With this annotation, all 144 source files pass mypy 1.14.1 under both Flask 3.1.3 and Flask 2.0.2. Pylint scores 10.00/10, the existing token-validation tests pass in both environments, and dictionary, Headers and EnvironHeaders checks cover valid, absent, invalid and disabled authentication.
@Afloat16
Afloat16 force-pushed the fix/single-read-find-20261109 branch from 5695078 to 54994c7 Compare November 9, 2026 12:57
@serengil
serengil merged commit a2d66b2 into serengil:master Nov 9, 2026
3 checks passed
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.

2 participants