Repository navigation
Conversation
Each song of a request is decoded as soon as its latents stand, instead of after the last song: GET /job names tracks_ready while the job runs, and GET /job?id=N&result=1&track=K fetches one finished track in the same multipart as the whole result. pipeline_generate takes a track_ready callback for it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A request for several songs (
lm_batch_size> 1) decoded every song only after the last one's latents weresolved, so a client waited for the whole batch before it could play the first song.
Now each song is decoded as soon as its latents stand, inside the per-song loop of
pipeline_generate(the NARis released before the VAE is taken, so a store that keeps one group on the card swaps them per song).
pipeline_generatetakes an optionaltrack_ready(void *, size_t track, Yue2Song &)callback; the serveruses it to keep each finished track (replay request, encoded audio, latents) on the job:
GET /job?id=Nanswers{"status":"running","tracks_ready":K};GET /job?id=N&result=1&track=Kreturns track K alone, in the same multipart as the whole result(404 while it is not ready; once the job is done the whole result holds every track and the single ones are
dropped);
GET /job?id=N&result=1is unchanged.Callers that pass no callback behave as before, apart from the VAE now running between songs instead of after
all of them.
Tested in YuE2 Studio (Windows, RTX 4090, the same change on our fork): a two-song request at 30 s each — the
first song reached the library through
track=0and played while the second was still rendering.Ported onto master by hand from our fork, where it runs in YuE2 Studio 4.1.0; not built on master on our side.