-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: generic progress events #6908
Merged
Merged
Conversation
This file contains 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
psychedelicious
requested review from
blessedcoolant,
maryhipp,
hipsterusername,
lstein,
brandonrising and
RyanJDick
as code owners
September 21, 2024 09:43
github-actions
bot
added
api
python
PRs that change python files
invocations
PRs that change invocations
backend
PRs that change backend files
services
PRs that change app services
frontend
PRs that change frontend files
labels
Sep 21, 2024
I’m going to try to test this more hands on tomorrow and then we can get it in. |
psychedelicious
changed the title
Psyche/feat/generic progress events 2
feat: generic progress events
Sep 22, 2024
Eliminate coupling on stable diffusion for progress events. Can be used for any node.
Any node can use this at any time to signal its progress to the client. The docstrings are detailed.
- Update the step callback methods in the invocation API to use the new signal_progress API - Copy and update the `calc_percentage`, reducing special handling for step and total_steps - a followup commit will fix callers of the step callbacks
Each of these was a bit off: - The SD callback started at `-1` and ended at `i`. Combined w/ the weird math on the previous `calc_percentage` util, this caused the progress bar to never finish. - The MultiDiffusion callback had the same problems as SD. - The FLUX callback didn't emit a pre-denoising step 0 image. It also reported total_steps as 1 higher than the actual step count. Each of these now emit the expected events to the frontend: - The initial latents at 0% - Progress at each step, ending at 100%
This is now superseded by the invocation_progress event.
Both the vanilla and autoscale invocations report progress while processing each tile. The autoscale version, which may run the spandrel model multiple times, also includes the current iteration.
hipsterusername
force-pushed
the
psyche/feat/generic-progress-events-2
branch
from
September 22, 2024 17:54
28f4444
to
3cd8ccc
Compare
hipsterusername
approved these changes
Sep 22, 2024
3 tasks
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.
Summary
Generalized progress events:
invocation_progress
event replacesinvocation_denoise_progress
event. It is emitted with amessage
and some optional args:percentage
,image
,image_size
.signal_progress
method.Related Issues / Discussions
QA Instructions
How to test
Text matrix:
Set the log level to trace in system settings, open the browser JS console and generate. You should see:
Discussion items
signal_progress
isn't the best name for the API method.image_size
should beimage_display_size
._new_invoke
step callback handling. I'm not sure how to trigger this code path to test it, but the changes should be similar to the ones I made in b48db16 - just adjust thestep
andtotal_steps
parameters.Merge Plan
Would be nice to get this in for v5 but it's not super important.
Checklist