Skip to content
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

Latency inference score t2 i #3074

Merged
merged 4 commits into from
Jun 5, 2024
Merged

Conversation

rickstaa
Copy link
Contributor

@rickstaa rickstaa commented Jun 5, 2024

What does this pull request do? Explain your changes. (required)

Updates the formula used to calculate latency score for T2I request so that num_inference_steps is included in the measurement.

Specific updates (required)

  • Update ai_process.go to use the formula:
    took.Seconds() / float64(outPixels) / (float64(numImages) * float64(numInferenceSteps))

How did you test each of these updates (required)

Tested with high-end range values for num_inference_steps and num_images_per_prompt

Results:

25 inference
0.00000006567261756897  - 1 image
0.00000006524371048584 - 25 images

100 inference
0.00000004808495975494 - 1 image
0.00000004837596923332 - 25 images

Does this pull request close any open issues?

LIV-362

Checklist:

@github-actions github-actions bot added the AI Issues and PR related to the AI-video branch. label Jun 5, 2024
@rickstaa rickstaa merged commit 6535844 into ai-video Jun 5, 2024
7 of 9 checks passed
@rickstaa rickstaa deleted the latency-inference-score-T2I branch June 5, 2024 11:41
eliteprox added a commit to eliteprox/go-livepeer that referenced this pull request Jul 26, 2024
…re calculation (livepeer#3074)

* fix(ai): Fix accuracy of T2I latency score when num_inference_steps provided

* refactor(ai): update numInferenceSteps default

This commit ensures that the same numInferenceSteps default value is
used as the one set in
https://github.com/livepeer/ai-worker/blob/31fe460a45e1d9e908d3a1bdcfdd8822c3889214/runner/app/routes/text_to_image.py#L28.

---------

Co-authored-by: Elite Encoder <john@eliteencoder.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI Issues and PR related to the AI-video branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants