-
Notifications
You must be signed in to change notification settings - Fork 7
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
Webhook 'output' event not fired, num_outputs done wrong? #10
Comments
I haven't run the numbers, but I don't remember it seeming longer. The real reason to do this is that it allows you to have a deterministic seed for output 2-N. Currently if you like the 3rd output when doing the [prompt] * num_outputs, you cannot get back to it, causing frustration. Regarding iterator vs returning at the end, it seems like maybe there is an issue with webhooks & iterators. That might be able to be fixed. |
Assuming we'll get the webhook event-fixed; Retrieving the 3rd seed is then probably necessary for doing it like this, I'll run some numbers regarding yield vs. non-yield to see if we're sacrificing any speed. I'm adding a |
I also want to get AIT supported. Which will require this style of
generation.
Whether yield or all at once is orthogonal
…On Sat, Apr 1, 2023 at 7:41 PM Pontus Aurdal ***@***.***> wrote:
Assuming we'll get the webhook event-fixed; Retrieving the 3rd seed is
then probably necessary for doing it like this, I'll run some numbers
regarding yield vs. non-yield to see if we're sacrificing any speed. I'm
adding a yield_output -input parameter that will switch output-strategy,
I think if either option has pros/cons the option to switch should be there.
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAAG6SFMIYRF4CN6ES6H3W7C4JBANCNFSM6AAAAAAWP2J4UQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Here are the numbers (4 samples). All at once is negligible faster.
Until webhook |
Webhook: output
If
num_outputs
input parameter is > 1 thepredict
function will yield outputs while they are being generated (like here: https://github.com/anotherjesse/dream-templates/blob/main/controlnet-1.5-canny/predict.py#L313)I don't seem to receive the
output
webhook event, although I've set theoutput
webhook event filter in the prediction API-call. Without this webhook event it makes it very hard to logically determine which number in thenum_outputs
process to update in a client application.Iterating num_outputs
I also suspect iterating over the
num_outputs
input parameter and running image generation on each of them is not optimal. I've always seen it done by multiplying the prompts bynum_outputs
(like here: https://github.com/replicate/cog-stable-diffusion/blob/main/predict.py#L108). It appears to be takingnum_outputs
-times longer using this method.dream-templates way results in this:
Traditional (multiplying prompts) results in this:
The text was updated successfully, but these errors were encountered: