Skip to content

Switch to event based/callback based approach for dream web#129

Closed
TesseractCat wants to merge 5 commits intoinvoke-ai:mainfrom
TesseractCat:main
Closed

Switch to event based/callback based approach for dream web#129
TesseractCat wants to merge 5 commits intoinvoke-ai:mainfrom
TesseractCat:main

Conversation

@TesseractCat
Copy link
Contributor

@TesseractCat TesseractCat commented Aug 27, 2022

This uses HTTP fetch streaming to push images to the web interface as they are generated, and adds a progress bar by exposing the img_callback parameter to prompt2image.

As a result of using a callback based approach, when generating multiple images, it will add them to the result list immediately, rather than waiting until all images have completed.

@bakkot bakkot mentioned this pull request Aug 28, 2022
@bakkot
Copy link
Contributor

bakkot commented Aug 28, 2022

Here is a commit on top of this branch which also streams the intermediate images, so you can watch it denoise. Feel free to pull this in to this branch.

(This really makes me want to have the ability to cancel requests, because you can often see it's not going to be what you want before it actually finishes.)

Screen Shot 2022-08-28 at 1 09 07 PM

@lstein
Copy link
Collaborator

lstein commented Aug 29, 2022

I'm fixing issues with the dream_web having to do with upscaling and will work on this next.

@lstein lstein self-assigned this Aug 29, 2022
@lstein lstein self-requested a review August 29, 2022 03:16
Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

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

Unfortunately in the intervening time between submission of the PR, dream_web.py has been made into a module and moved into ldm/dream/server.py. scripts/dream.py --web now invokes this module. I think this makes better sense than maintaining two different launch scripts that share identical arguments.

Would it be possible to redo the PR using the new structure?

@bakkot
Copy link
Contributor

bakkot commented Aug 29, 2022

I took the liberty of doing that rebase in #180. Feel free to ignore it if you'd prefer to keep this PR as the source of truth, though.

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.

4 participants