-
Notifications
You must be signed in to change notification settings - Fork 4
feat: BYOC StreamServer, FrameProcessor with example app #8
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
Conversation
|
@ad-astra-video This refactor moves the pydantic models for requests to start streams, update params, list streams, get version, (basic) capabilities and health checks. There's also a mess of av frame / tensor conversion methods that were needed in comfystream trickle integration which should be useful for other builders |
c9e1b64 to
18cfe62
Compare
| self.health_manager = health_manager | ||
|
|
||
| @abstractmethod | ||
| async def create_stream_handler(self, request_id: str, **kwargs) -> Optional[StreamHandler]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not seeing why we need this. I was thinking a stream would look the same from a trickle protocol perspective for all streams.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've had success with moving a ton of generic error handling logic for stream processing in #9. I'm going to try building an app from these changes. @ad-astra-video lmk if you think we should go include this
73fb24a to
75d3a96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reviewed and tested locally. I observed passthrough audio and video transformation using the example processor.
Some small refinements may be needed as we push this with pipeline building.
The StreamServer api makes it really easy to get a pipeline onboarded to the network!
This pull request modernizes and streamlines the example code for the PyTrickle project, introducing a new async processor demo, updating supporting infrastructure, and removing outdated or redundant examples. The main focus is on providing a more advanced, async-capable example (
async_processor_example.py) with clean error handling, real-time parameter control, and orchestrator registration, while also updating the development workflow and project exports.New Example and Supporting Infrastructure
async_processor_example.py, which demonstrates an advanced, async frame processor that applies an Accent Green color tint, supports real-time intensity adjustment, error handling, and optional orchestrator registration. This example is now the primary demo for async processing.Dockerfile.async_processor_example) for the new async processor example, enabling easy containerized deployment with CUDA support and all necessary dependencies..vscode/launch.json) for quickly running and debugging the new async processor example with appropriate environment variables.Project and Example Cleanup
simple_stream_processing.pyandhttp_server_example.pyexamples, which are now superseded by the new async processor demo. [1] [2]Makefileto run the new async processor example by default for therun-exampletarget.Library Exports and API Improvements
pytrickle/__init__.pyto export new and relevant components (such asFrameProcessor,RegisterCapability,FPSMeter, and management classes), and removed the deprecatedcreate_appexport, aligning the public API with the new async example and modern usage patterns.