mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #42] [MERGED] Web app pictures reached the engine without their embeddings (strata_resume job thread) #296
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#296
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?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/42
Author: @tanutanu56
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @mw00
Base:
main← Head:fix-image-lost-in-resume-job📝 Commits (1)
8a02290strata_resume: carry the image embeddings file over to the job thread📊 Changes
2 files changed (+28 additions, -2 deletions)
View changed files
📝
serve/server.py(+10 -1)📝
serve/test_server.py(+18 -1)📄 Description
Pictures sent from the web app are read as a blank / black image (or the model invents a task for them), while the same request sent straight to the API is read correctly.
Cause
Service.embeddingsis athreading.local: the request thread prepares the prompt, encodes the images and setsembeddings.path;generate()reads it when the engine call starts. Withstrata_resume(which the web app always sends) the first chunk is pulled on the request thread, but the rest of the generator runs on thestrata-jobthread, whereembeddings.pathisNone. The engine then gets the prompt with the image's pad tokens and no embeddings, so the model "sees" nothing. Withoutstrata_resume, everything runs on one thread and works, which is whycurland--benchnever showed it.Fix
carry_embeddings(local, path, chunks): a small generator that sets the file on the job thread before it first pulls from the answer generator. One call site (thestrata_resumebranch);StreamJobis untouched.Reproduction (v1.0.16 and v1.0.17, GLM Maya-S, vision on)
A 512x384 picture, red background with a yellow circle, asked "background and circle colour in a word",
reasoning_effort: none:stream: truestream: true, strata_resume: true(before)stream: true, strata_resume: true(after)In the web app, a new chat with any picture answered about a black image, or made up a maths problem about it.
Tests
serve.test_server.TestCarryEmbeddingsruns the generator on a second thread and checks that it sees the request thread's file.python -m unittest serve.test_server: 54 tests, OK. The table above was measured on the running server; I did not re-run the live check on this branch, only on the same change applied to a v1.0.16 checkout.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.