Add ComfyStream live-runner for go-livepeer orchestrators - #594
Draft
eliteprox wants to merge 14 commits into
Draft
Add ComfyStream live-runner for go-livepeer orchestrators#594eliteprox wants to merge 14 commits into
eliteprox wants to merge 14 commits into
Conversation
Co-authored-by: eliteprox <16746274+eliteprox@users.noreply.github.com>
Remove repository restrictions from GitHub workflows to enable fork operation
- Standardize on --workspace (with --cwd alias) so ComfyStream can launch from any directory while mapping to the correct ComfyUI cwd. - Pass the workspace/CWD and logging settings cleanly through server args → pipeline → ComfyStreamClient so ComfyUI’s configuration is honored. - Add config passthrough support: when a ComfyUI config file is provided, forward it directly and skip overriding flags to match ComfyUI’s precedence rules. - Ensure ComfyUI packages load correctly via the client initialization (__init__.py/ComfyStreamClient), removing legacy env handling and relying on proper cwd/config inputs. - Update Docker, supervisord, launch configs, and docs to use the unified workspace flag and defaults.
This reverts commit 6853675.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: eliteprox <16746274+eliteprox@users.noreply.github.com>
Preserve workspace cwd when using --config in frame_processor
- Cleaned up __init__.py by removing unused imports and defining __all__. - Introduced overrides.txt for managing package dependencies with specific versions and extra index URLs. - Updated setup_models.py and setup_nodes.py to improve configuration handling and error reporting during node installations. - Enhanced utils.py with new functions for workspace management and improved config path resolution.
…ng and dependency management - Refactored build_trt.py to include a setup_comfy function for better workspace initialization and module imports. - Added a workspace argument to build_trt_engine for flexibility in specifying the ComfyUI workspace. - Updated constraints.txt to pin specific versions of onnxruntime and huggingface-hub, and added a new dependency for transformers. - Modified setup_nodes.py to utilize a centralized constraints file for pip installations, ensuring consistent dependency management across custom nodes.
… dependency management and module imports - Added import for comfy.sd in build_trt.py to streamline module access. - Updated constraints.txt to include a new dependency on nvidia-modelopt with a minimum version requirement. - Modified setup_nodes.py to handle nvidia-modelopt version conflicts by stripping unnecessary extras from the package line.
- Introduced docker-compose.live-runner.yml to facilitate running ComfyStream as a live-runner connected to an existing Livepeer orchestrator. - Created Dockerfile.live-runner to build the necessary environment for the live-runner, including dependencies for livepeer-gateway. - Updated entrypoint.sh to handle the new --live-runner flag for starting the service. - Added server/live_runner.py to implement the live-runner functionality, enabling video analysis and live streaming. - Developed server/live_runner_client.py as a smoke client for testing the live-runner features. - Enhanced README.md with instructions for using the live-runner and added a new workflow JSON for analysis. - Updated pyproject.toml to include live-runner dependencies. - Ensured proper integration with Livepeer's API for session management and media handling.
| raise | ||
| except Exception as exc: | ||
| log.exception("failed to apply analyze workflow") | ||
| raise web.HTTPBadRequest(text=f"invalid workflow: {exc}") from exc |
| ) | ||
| except Exception as exc: | ||
| log.exception("failed to apply stream workflow") | ||
| raise web.HTTPBadRequest(text=f"invalid workflow: {exc}") from exc |
| ) | ||
| except Exception as exc: | ||
| log.exception("failed to update stream workflow") | ||
| raise web.HTTPBadRequest(text=f"invalid workflow update: {exc}") from exc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
comfystream(capacity 1) against a go-livepeer orchestrator with-useLiveRunners, drivingcomfystream.Pipelinein-process (no BYOC/pytrickle subprocess).POST /analyze,POST /start_stream,POST /update_stream,GET /text,GET /healthz.Dockerfile.live-runner,docker-compose.live-runner.yml,--live-runnerentrypoint), optional.[live-runner]deps, a smoke client, and a stub analyze workflow.--workspace/--cwd), constraint/override-based node installs, and CI workflow fork-restriction removals needed to operate from this branch.Motivation
ComfyPeer / live-runner work wants ComfyStream sellable as a session wall-clock / latency runner on an existing orchestrator—same registration + trickle path as the transcode live-runner—rather than a batch $/image race or legacy BYOC.
What's included
Live-runner
server/live_runner.pyserver/live_runner_client.pydocker/Dockerfile.live-runnerlivepeer/comfystream+livepeer-gatewaydocker-compose.live-runner.ymldocker/entrypoint.sh--live-runner→python server/live_runner.py …workflows/comfystream/analyze-stub-api.jsonpyproject.tomllive-runnerextraSupporting (earlier on branch)
--workspace, config passthrough, client init)constraints.txt,overrides.txt, setup_nodes / build_trt)Legacy BYOC (
server/byoc.py) is unchanged.Quick test
Test plan
comfystreamanalyzeagainst stub workflow returns textstart_stream+ frame publish produces trickle video (and optional text)update_streamapplies mid-session workflow/prompt change/healthzhealthy while idle and during a sessiondocker-compose.live-runner.ymlare overridden via env (no committed orch secrets in final merge)--configstill preserves--workspaceNotes / follow-ups
livepeer-gatewaybranchja/live-runneruntil that lands on a tagged release.protobuf>=6.31.1for gateway pb2; call out any ComfyUI pin tension in review.