Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2516242
add workflow to publish to registry (#121)
eliteprox Sep 30, 2025
059d69c
fix(byoc): Use correct capability url for registration (#460)
eliteprox Oct 1, 2025
e51e7cb
ui: fix deprecated husky install command (#445)
eliteprox Oct 6, 2025
082d135
Fix text output panel visibility - hide by default, show on first tex…
Copilot Oct 6, 2025
b0f7476
chore(deps): bump actions/checkout from 4 to 5 (#355)
dependabot[bot] Oct 28, 2025
8ccf37f
chore(deps): bump actions/setup-node from 5 to 6 (#483)
dependabot[bot] Oct 28, 2025
9ccf061
pin setuptools < 81 to resolve opentelemetry warning (#465)
eliteprox Nov 6, 2025
3014234
docker(byoc): add default entrypoint, set log level to INFO, fix cust…
eliteprox Nov 7, 2025
007033c
chore(docker): update cuDNN version in Dockerfile to match PyTorch re…
eliteprox Nov 7, 2025
350fc08
chore(deps): bump actions/upload-artifact from 4 to 5 (#485)
dependabot[bot] Nov 8, 2025
43a85d6
chore(deps): bump github/codeql-action from 3 to 4 (#463)
dependabot[bot] Nov 8, 2025
c54ef01
chore(deps): bump actions/setup-python from 5 to 6 (#375)
dependabot[bot] Nov 10, 2025
2a77dbd
chore(deps): bump softprops/action-gh-release from 1 to 2 (#456)
dependabot[bot] Nov 10, 2025
0f3c00c
chore(deps): bump actions/download-artifact from 4 to 6 (#482)
dependabot[bot] Nov 10, 2025
ff11b85
chore: add ruff config to precommit hooks (#507)
eliteprox Nov 11, 2025
5aa6ece
chore(deps): bump actions/checkout from 5 to 6 (#515)
dependabot[bot] Nov 25, 2025
48fcca4
feat(pipeline): implement pause and resume functionality for prompt e…
eliteprox Nov 25, 2025
06bb2ed
chore(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 in /ui (#511)
dependabot[bot] Nov 25, 2025
1a53b24
fix(devcontainer): update pip install command to include constraints …
eliteprox Nov 28, 2025
7cdde1f
Bump version to 0.1.7 (#536)
Copilot Nov 28, 2025
6f8f675
bump torch==2.8.0 (#369)
eliteprox Dec 4, 2025
401cb09
chore(deps): bump next from 15.5.3 to 15.5.7 in /ui (#547)
dependabot[bot] Dec 5, 2025
4b7b660
fix(docker): update supervisord configuration for Comfystream API (#549)
eliteprox Dec 7, 2025
83697ef
refactor(deps): move byoc / pytrickle dependency outside of comfystre…
Copilot Dec 8, 2025
fbe4845
fix: update the version of react to patched one (#554)
JJassonn69 Dec 8, 2025
7accfef
fix(docker): update base image and ComfyUI version in Dockerfiles (#553)
JJassonn69 Dec 8, 2025
d68bdd3
chore(ci): update GitHub Actions runner to self-hosted (#556)
eliteprox Dec 9, 2025
3d5dc85
chore: update Tailwind CSS to v4 (#557)
JJassonn69 Dec 9, 2025
4a0170b
chore(ci): move tests back to github runner (#561)
eliteprox Dec 10, 2025
06b2a27
Bump comfystream package and UI to version 0.1.8 (#566)
Copilot Dec 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cd /workspace/comfystream

# Install Comfystream in editable mode.
echo -e "\e[32mInstalling Comfystream in editable mode...\e[0m"
/workspace/miniconda3/envs/comfystream/bin/python3 -m pip install -e . --root-user-action=ignore > /dev/null
/workspace/miniconda3/envs/comfystream/bin/python3 -m pip install -e .[server] -c src/comfystream/scripts/constraints.txt --root-user-action=ignore > /dev/null

# Install npm packages if needed
if [ ! -d "/workspace/comfystream/ui/node_modules" ]; then
Expand Down
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ insert_final_newline = true
insert_final_newline = unset

[*.py]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false

[workflows/comfy*/*.json]
insert_final_newline = unset
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: [self-hosted, linux, gpu]
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
runs-on: [self-hosted, linux, amd64]
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/opencv-cuda-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
rm -rf test-extract

- name: Upload OpenCV CUDA Release Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: opencv-cuda-release-python${{ env.PYTHON_VERSION }}-cuda${{ env.CUDA_VERSION }}-${{ github.sha }}
path: |
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
EOF

- name: Upload Release Info
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: release-info-python${{ env.PYTHON_VERSION }}-cuda${{ env.CUDA_VERSION }}-${{ github.sha }}
path: release-info.txt
Expand All @@ -155,22 +155,22 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: opencv-cuda-release-python${{ env.PYTHON_VERSION }}-cuda${{ env.CUDA_VERSION }}-${{ github.sha }}
path: ./artifacts

- name: Download release info
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: release-info-python${{ env.PYTHON_VERSION }}-cuda${{ env.CUDA_VERSION }}-${{ github.sha }}
path: ./artifacts

- name: Create Release Draft
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
tag_name: opencv-cuda-v${{ env.PYTHON_VERSION }}-${{ env.CUDA_VERSION }}-${{ github.run_number }}
name: OpenCV CUDA Release - Python ${{ env.PYTHON_VERSION }} CUDA ${{ env.CUDA_VERSION }}
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/publish-comfyui-node.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish ComfyUI Custom Node

on:
workflow_dispatch:

permissions:
contents: read
issues: write

jobs:
publish-comfyui-node:
name: Publish Custom Node to ComfyUI registry
runs-on: ubuntu-latest
# Ensure this only runs on main branch
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- name: Check out code
uses: actions/checkout@v6
with:
submodules: true

- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@v1
with:
## Add your own personal access token to your Github Repository secrets and reference it here.
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- uses: actions/setup-node@v5
- uses: actions/setup-node@v6
with:
node-version: 18
cache: npm
Expand All @@ -38,7 +38,7 @@ jobs:
cd -

- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: release-artifacts
path: releases/
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: typescript,javascript,python
config-file: ./.github/codeql-config.yaml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4


editorconfig:
name: Run editorconfig checker
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
Expand All @@ -59,14 +59,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: pip
Expand Down
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cd ui && npx lint-staged

2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Import and expose node classes
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS

__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
76 changes: 50 additions & 26 deletions benchmark.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import av
import argparse
import asyncio
import json
import time
import torch
import logging
import asyncio
import argparse
import time

import av
import numpy as np
import torch

from comfystream.client import ComfyStreamClient

logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s')
logging.basicConfig(format="%(asctime)s - %(levelname)s - %(message)s")
logger = logging.getLogger()


Expand All @@ -22,14 +23,30 @@ def create_dummy_video_frame(width, height):

async def main():
parser = argparse.ArgumentParser(description="Benchmark ComfyStreamClient workflow execution.")
parser.add_argument("--workflow-path", default="./workflows/comfystream/tensor-utils-example-api.json", help="Path to the workflow JSON file.")
parser.add_argument(
"--workflow-path",
default="./workflows/comfystream/tensor-utils-example-api.json",
help="Path to the workflow JSON file.",
)
parser.add_argument("--num-requests", type=int, default=100, help="Number of requests to send.")
parser.add_argument("--fps", type=float, default=None, help="Frames per second for FPS-based benchmarking.")
parser.add_argument("--cwd", default="/workspace/ComfyUI", help="Current working directory for ComfyStreamClient.")
parser.add_argument(
"--fps", type=float, default=None, help="Frames per second for FPS-based benchmarking."
)
parser.add_argument(
"--cwd",
default="/workspace/ComfyUI",
help="Current working directory for ComfyStreamClient.",
)
parser.add_argument("--width", type=int, default=512, help="Width of dummy video frames.")
parser.add_argument("--height", type=int, default=512, help="Height of dummy video frames.")
parser.add_argument("--verbose", action="store_true", help="Enable verbose logging (shows progress for each request).")
parser.add_argument("--warmup-runs", type=int, default=5, help="Number of warm-up runs before benchmarking.")
parser.add_argument(
"--verbose",
action="store_true",
help="Enable verbose logging (shows progress for each request).",
)
parser.add_argument(
"--warmup-runs", type=int, default=5, help="Number of warm-up runs before benchmarking."
)

args = parser.parse_args()

Expand All @@ -44,7 +61,9 @@ async def main():
client = ComfyStreamClient(cwd=args.cwd)
await client.set_prompts([prompt])

logger.info(f"Starting benchmark with workflow: {args.workflow_path}, requests: {args.num_requests}, resolution: {args.width}x{args.height}, warmup runs: {args.warmup_runs}")
logger.info(
f"Starting benchmark with workflow: {args.workflow_path}, requests: {args.num_requests}, resolution: {args.width}x{args.height}, warmup runs: {args.warmup_runs}"
)

if args.warmup_runs > 0:
logger.info(f"Running {args.warmup_runs} warm-up runs...")
Expand All @@ -66,11 +85,13 @@ async def main():
await client.get_video_output()
request_end_time = time.time()
round_trip_times.append(request_end_time - request_start_time)
logger.debug(f"Request {i+1}/{args.num_requests} completed in {round_trip_times[-1]:.4f} seconds")
logger.debug(
f"Request {i + 1}/{args.num_requests} completed in {round_trip_times[-1]:.4f} seconds"
)

end_time = time.time()
total_time = end_time - start_time
output_fps = args.num_requests / total_time if total_time > 0 else float('inf')
output_fps = args.num_requests / total_time if total_time > 0 else float("inf")

# Calculate percentiles for sequential mode
p50_rtt = np.percentile(round_trip_times, 50)
Expand All @@ -79,17 +100,17 @@ async def main():
p95_rtt = np.percentile(round_trip_times, 95)
p99_rtt = np.percentile(round_trip_times, 99)

print("\n" + "="*40)
print("\n" + "=" * 40)
print("FPS Results:")
print("="*40)
print("=" * 40)
print(f"Total requests: {args.num_requests}")
print(f"Total time: {total_time:.4f} seconds")
print(f"Actual Output FPS:{output_fps:.2f}")
print(f"Total requests: {args.num_requests}")
print(f"Total time: {total_time:.4f} seconds")
print("\n" + "="*40)
print("\n" + "=" * 40)
print("Latency Results:")
print("="*40)
print("=" * 40)
print(f"Average: {np.mean(round_trip_times):.4f}")
print(f"Min: {np.min(round_trip_times):.4f}")
print(f"Max: {np.max(round_trip_times):.4f}")
Expand All @@ -99,7 +120,6 @@ async def main():
print(f"P95: {p95_rtt:.4f}")
print(f"P99: {p99_rtt:.4f}")


else:
# This is mainly used to stress test the ComfyUI client, gives us a good idea on how frame skipping etc is working on the client end.
logger.info(f"Running FPS-based benchmark at {args.fps} FPS...")
Expand All @@ -118,9 +138,11 @@ async def collect_outputs_task():

last_output_receive_time = time.time()
received_frames_count += 1
logger.debug(f"Received output frame {received_frames_count} at {last_output_receive_time - start_time:.4f} seconds")
logger.debug(
f"Received output frame {received_frames_count} at {last_output_receive_time - start_time:.4f} seconds"
)
except asyncio.TimeoutError:
logger.debug(f"Output collection task timed out after waiting for 5 seconds.")
logger.debug("Output collection task timed out after waiting for 5 seconds.")
break
except Exception as e:
logger.debug(f"Output collection task finished due to exception: {e}")
Expand All @@ -140,7 +162,9 @@ async def collect_outputs_task():
request_send_time = time.time()
client.put_video_input(frame)

logger.debug(f"Sent request {i+1}/{args.num_requests} at {request_send_time - start_time:.4f} seconds")
logger.debug(
f"Sent request {i + 1}/{args.num_requests} at {request_send_time - start_time:.4f} seconds"
)

await output_collector_task

Expand All @@ -150,16 +174,16 @@ async def collect_outputs_task():
elif received_frames_count == 0:
output_fps = 0.0
else:
output_fps = float('inf')
output_fps = float("inf")

print("\n" + "="*40)
print("\n" + "=" * 40)
print("FPS Results:")
print("="*40)
print("=" * 40)
print(f"Target Input FPS: {args.fps:.2f}")
print(f"Actual Output FPS:{output_fps:.2f} ({received_frames_count} frames received)")
print(f"Total requests: {args.num_requests}")
print(f"Total time: {last_output_receive_time - start_time:.4f} seconds")


if __name__ == "__main__":
asyncio.run(main())
asyncio.run(main())
2 changes: 0 additions & 2 deletions configs/nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ nodes:
url: "https://github.com/yondonfu/ComfyUI_TensorRT.git"
branch: "quantization_with_controlnet_fixes"
type: "tensorrt"
dependencies:
- "tensorrt==10.12.0.36"

comfyui-depthanything-tensorrt:
name: "ComfyUI DepthAnything TensorRT"
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG BASE_IMAGE=livepeer/comfyui-base:latest

FROM ${BASE_IMAGE}
FROM ${BASE_IMAGE}

ENV PATH="/workspace/miniconda3/bin:${PATH}" \
NVM_DIR=/root/.nvm \
Expand Down
Loading
Loading