Skip to content

Switch to event based/callback based approach for dream web (rebased) - #180

Closed
bakkot wants to merge 1 commit into
invoke-ai:mainfrom
bakkot:rebase-streaming-web
Closed

Switch to event based/callback based approach for dream web (rebased)#180
bakkot wants to merge 1 commit into
invoke-ai:mainfrom
bakkot:rebase-streaming-web

Conversation

@bakkot

@bakkot bakkot commented Aug 29, 2022

Copy link
Copy Markdown
Contributor

This is #129 rebased, plus my commit which adds renders images as they denoise (which is fun, and also lets you see if the image is going to be entirely the wrong shape, though as of now it's impossible to cancel a generation so this is not helpful) (EDIT: my commit has been moved to #181).

@bakkot
bakkot force-pushed the rebase-streaming-web branch 2 times, most recently from 6c6c110 to 7a25b29 Compare August 29, 2022 05:14

@TesseractCat TesseractCat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rebase looks good, but the progress visualization needs to be optional for performance reasons.

If there's a way to asynchronously read tensor data from the GPU we should do that.

Comment thread ldm/dream/server.py Outdated
@bakkot
bakkot force-pushed the rebase-streaming-web branch from 7a25b29 to 070795a Compare August 29, 2022 05:21

@lstein lstein left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and will be generally useful outside the webUI as well. Any idea what the performance hit is?

@lstein

lstein commented Aug 29, 2022

Copy link
Copy Markdown
Collaborator

I'm almost done with the integration. There were some issues with correctly handling upscale requests, which should replace the original rather than supplement it. (can add option to keep originals later)

@bakkot

bakkot commented Aug 29, 2022

Copy link
Copy Markdown
Contributor Author

Any idea what the performance hit is?

No noticeable performance hit from this PR. I pulled out the slow part to #181, which is about a 20% slowdown when the checkbox is checked (which it is not by default).

@lstein

lstein commented Aug 29, 2022

Copy link
Copy Markdown
Collaborator

This turned out to be harder than expected due to the way in which a batch of images are first generated, and then post-processed using GFPGAN and ESRGAN. However, it seems to be working now. When post-processing is requested, the code first generates and displays the original image, then displays a "post-processing file 1/3" message, and then replaces the original image with the upscaled image. The only problem I've encountered is that the browser seems to cache the image thumbnail, and may not display the reconstructed faces when the underlying image files are updated. This will become a non-issue when PR #181 is integrated.

Speaking of which, there are likely to be new conflicts with PR #181, and I apologize in advance if I've created a headache for @bakkot .

@lstein lstein closed this Aug 29, 2022
@lstein

lstein commented Aug 29, 2022

Copy link
Copy Markdown
Collaborator

This was inadvertently closed before the merge was pushed. However, the PR is now merged into main.

@bakkot
bakkot deleted the rebase-streaming-web branch August 29, 2022 16:36
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.

3 participants