Skip to content

Add pipeline throttling#369

Merged
yondonfu merged 1 commit intomainfrom
rafal/fps-throttling
Feb 11, 2026
Merged

Add pipeline throttling#369
yondonfu merged 1 commit intomainfrom
rafal/fps-throttling

Conversation

@leszko
Copy link
Copy Markdown
Collaborator

@leszko leszko commented Jan 22, 2026

Summary

  • Adds FPS-based throttling to prevent upstream pipelines from overwhelming downstream pipelines in chained setups (A → B → C)
  • When an upstream pipeline produces frames faster than the downstream can consume, the throttler adds delays to match the consumption rate

How it works

The PipelineThrottler tracks input/output FPS for each pipeline processor:

  • Measures how fast each pipeline consumes frames (input FPS) and produces frames (output FPS)
  • When output FPS exceeds 1.5× the next pipeline's input FPS, introduces a delay to slow down production
  • Throttling only applies to pipelines with video input that are chained to a next processor

Results

Tested with video-depth-anything + longlive + rife on 5090:

  • base (main): 13.6-20.0 FPS
  • with throttling (this PR): 17.0-20.4 FPS

🤖 Generated with Claude Code

@leszko leszko requested a review from yondonfu January 22, 2026 08:43
Copy link
Copy Markdown
Contributor

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

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

Looks pretty good! The main comment is about the locking in throttle and everything else is minor for your consideration.

@leszko leszko force-pushed the rafal/fps-throttling branch from 2e8e9d0 to 6d59905 Compare February 11, 2026 09:08
Signed-off-by: Rafał Leszko <[email protected]>
@leszko leszko force-pushed the rafal/fps-throttling branch from 6d59905 to 955144d Compare February 11, 2026 09:18
@leszko leszko requested a review from yondonfu February 11, 2026 09:50
Copy link
Copy Markdown
Contributor

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

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

LGTM!

@yondonfu yondonfu merged commit 9756f55 into main Feb 11, 2026
6 checks passed
@yondonfu yondonfu deleted the rafal/fps-throttling branch February 11, 2026 21:53
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.

2 participants