Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
fddc151
chore(deps): bump next from 15.2.4 to 15.5.3 in /ui (#392)
dependabot[bot] Sep 15, 2025
bc719dc
workflows: fix sample rate in audio transcription (#408)
eliteprox Sep 17, 2025
ad301a4
feat(byoc): add trickle to comfystream (#357)
eliteprox Sep 19, 2025
914fd85
refactor(workflows): remove ai-runner workflow trigger from docker.ya…
eliteprox Sep 23, 2025
4f48695
fix(nodes): add input timeout to LoadTensor and LoadAudioTensor nodes…
eliteprox Sep 23, 2025
bcebd51
cleanup(nodes): Improve input exception logging (#427)
eliteprox Sep 25, 2025
5c66950
Update documentation links to docs.comfystream.org (#431)
eliteprox Sep 26, 2025
e25d25a
launch.json: update capability name for byoc (#437)
eliteprox Sep 26, 2025
29a51d5
fix(docker): add missing development libraries for Cairo and Pango (#…
eliteprox Sep 26, 2025
70f924c
feat: GitHub workflow opencv-cuda compilation (#432)
JJassonn69 Sep 27, 2025
daf4fc5
chore: update opencv-cuda for Python 3.12, add FasterLivePortrait (#413)
JJassonn69 Sep 27, 2025
2909ea4
chore(deps): bump actions/setup-node from 4 to 5 (#377)
dependabot[bot] Sep 27, 2025
cc292f8
chore(deps-dev): bump brace-expansion from 1.1.11 to 1.1.12 in /ui (#…
dependabot[bot] Sep 27, 2025
50717e0
Feat/updated UI remove inline (#444)
JJassonn69 Sep 29, 2025
89c66bb
models: use taesd safetensors instead of pth for performance (#440)
eliteprox Sep 29, 2025
c2bf2e0
bump comfyui, add comfyui manager, blacklist loading for performance …
eliteprox Sep 29, 2025
95f90d8
chore(deps): bump pytrickle 0.1.4, replace deprecated pynvml with nvi…
eliteprox Sep 30, 2025
6ce5ef9
Chore/update workflow manual (#457)
JJassonn69 Sep 30, 2025
359593a
Bump version to 0.1.6 in pyproject.toml, package-lock.json, and packa…
JJassonn69 Sep 30, 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
22 changes: 0 additions & 22 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,28 +83,6 @@ jobs:
cache-from: type=registry,ref=livepeer/comfyui-base:build-cache
cache-to: type=registry,mode=max,ref=livepeer/comfyui-base:build-cache

trigger:
name: Trigger ai-runner workflow
needs: base
if: ${{ github.repository == 'livepeer/comfystream' }}
runs-on: ubuntu-latest
steps:
- name: Send workflow dispatch event to ai-runner
uses: actions/github-script@v7
with:
github-token: ${{ secrets.CI_GITHUB_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: "ai-runner",
workflow_id: "comfyui-trigger.yaml",
ref: "main",
inputs: {
"comfyui-base-digest": "${{ needs.base.outputs.image-digest }}",
"triggering-branch": "${{ github.head_ref || github.ref_name }}",
},
});

comfystream:
name: comfystream image
needs: base
Expand Down
184 changes: 184 additions & 0 deletions .github/workflows/opencv-cuda-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
name: Build OpenCV CUDA Artifact

on:
workflow_dispatch:
inputs:
python_version:
description: 'Python version to build'
required: false
default: '3.12'
type: string
cuda_version:
description: 'CUDA version to build'
required: false
default: '12.8'
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
PYTHON_VERSION: ${{ github.event.inputs.python_version || '3.12' }}
CUDA_VERSION: ${{ github.event.inputs.cuda_version || '12.8' }}

jobs:
build-opencv-artifact:
name: Build OpenCV CUDA Artifact
runs-on: [self-hosted, linux, gpu]

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build OpenCV CUDA Docker image
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile.opencv
build-args: |
BASE_IMAGE=nvidia/cuda:${{ env.CUDA_VERSION }}.1-cudnn-devel-ubuntu22.04
PYTHON_VERSION=${{ env.PYTHON_VERSION }}
CUDA_VERSION=${{ env.CUDA_VERSION }}
tags: opencv-cuda-artifact:latest
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Extract OpenCV libraries from Docker container
run: |
echo "Creating temporary container..."
docker create --name opencv-extract opencv-cuda-artifact:latest

echo "Creating workspace directory..."
mkdir -p ./opencv-artifacts

# Try to copy from system installation
docker cp opencv-extract:/usr/local/lib/python${{ env.PYTHON_VERSION }}/site-packages/cv2 ./opencv-artifacts/cv2 || echo "cv2 not found in system site-packages"

echo "Copying OpenCV source directories..."
# Copy opencv and opencv_contrib source directories
docker cp opencv-extract:/workspace/opencv ./opencv-artifacts/ || echo "opencv source not found"
docker cp opencv-extract:/workspace/opencv_contrib ./opencv-artifacts/ || echo "opencv_contrib source not found"

echo "Cleaning up container..."
docker rm opencv-extract

echo "Contents of opencv-artifacts:"
ls -la ./opencv-artifacts/

- name: Create tarball artifact
run: |
echo "Creating opencv-cuda-release.tar.gz..."
cd ./opencv-artifacts
tar -czf ../opencv-cuda-release.tar.gz . || echo "Failed to create tarball"
cd ..

echo "Generating checksums..."
sha256sum opencv-cuda-release.tar.gz > opencv-cuda-release.tar.gz.sha256
md5sum opencv-cuda-release.tar.gz > opencv-cuda-release.tar.gz.md5

echo "Verifying archive contents..."
echo "Archive size: $(ls -lh opencv-cuda-release.tar.gz | awk '{print $5}')"
echo "First 20 files in archive:"
tar -tzf opencv-cuda-release.tar.gz | head -20

- name: Extract and verify tarball
run: |
echo "Testing tarball extraction..."
mkdir -p test-extract
cd test-extract
tar -xzf ../opencv-cuda-release.tar.gz
echo "Extracted contents:"
find . -maxdepth 2 -type d | sort
cd ..
rm -rf test-extract

- name: Upload OpenCV CUDA Release Artifact
uses: actions/upload-artifact@v4
with:
name: opencv-cuda-release-python${{ env.PYTHON_VERSION }}-cuda${{ env.CUDA_VERSION }}-${{ github.sha }}
path: |
opencv-cuda-release.tar.gz
opencv-cuda-release.tar.gz.sha256
opencv-cuda-release.tar.gz.md5
retention-days: 30

- name: Create Release Notes
run: |
cat > release-info.txt << EOF
OpenCV CUDA Release Artifact

Build Details:
- Python Version: ${{ env.PYTHON_VERSION }}
- CUDA Version: ${{ env.CUDA_VERSION }}
- OpenCV Version: 4.11.0
- Built on: $(date -u)
- Commit SHA: ${{ github.sha }}

Contents:
- cv2: Python OpenCV module with CUDA support
- opencv: OpenCV source code
- opencv_contrib: OpenCV contrib modules source
- lib: Compiled OpenCV libraries
- include: OpenCV header files

Installation:
1. Download opencv-cuda-release.tar.gz
2. Extract: tar -xzf opencv-cuda-release.tar.gz
3. Copy cv2 to your Python environment's site-packages
4. Ensure CUDA libraries are in your system PATH

Checksums:
SHA256: $(cat opencv-cuda-release.tar.gz.sha256)
MD5: $(cat opencv-cuda-release.tar.gz.md5)
EOF

- name: Upload Release Info
uses: actions/upload-artifact@v4
with:
name: release-info-python${{ env.PYTHON_VERSION }}-cuda${{ env.CUDA_VERSION }}-${{ github.sha }}
path: release-info.txt
retention-days: 30

create-release-draft:
name: Create Release Draft
needs: build-opencv-artifact
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

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

- name: Download artifacts
uses: actions/download-artifact@v4
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
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
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 }}
body_path: ./artifacts/release-info.txt
draft: true
files: |
./artifacts/opencv-cuda-release.tar.gz
./artifacts/opencv-cuda-release.tar.gz.sha256
./artifacts/opencv-cuda-release.tar.gz.md5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: 18
cache: npm
Expand Down
36 changes: 33 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,40 @@
"--media-ports=5678",
"--host=0.0.0.0",
"--port=8889",
"--log-level=DEBUG",
"--log-level=INFO",
"--comfyui-inference-log-level=DEBUG",
],
"python": "/workspace/miniconda3/envs/comfystream/bin/python",
"justMyCode": true
"justMyCode": true,
"python": "${command:python.interpreterPath}"
},
{
"name": "Run ComfyStream BYOC",
"type": "debugpy",
"request": "launch",
"cwd": "/workspace/ComfyUI",
"program": "/workspace/comfystream/server/byoc.py",
"console": "integratedTerminal",
"args": [
"--workspace=/workspace/ComfyUI",
"--host=0.0.0.0",
"--port=8000",
"--log-level=INFO",
"--comfyui-inference-log-level=DEBUG",
"--width=512",
"--height=512"
],
"env": {
"ORCH_URL": "https://172.17.0.1:9995",
"ORCH_SECRET": "orch-secret",
"CAPABILITY_NAME": "comfystream",
"CAPABILITY_DESCRIPTION": "ComfyUI streaming processor for BYOC mode",
"CAPABILITY_URL": "http://172.17.0.1:8000",
"CAPABILITY_PRICE_PER_UNIT": "0",
"CAPABILITY_PRICE_SCALING": "1",
"CAPABILITY_CAPACITY": "1"
},
"justMyCode": true,
"python": "${command:python.interpreterPath}"
},
{
"name": "Run ComfyStream UI (Node.js)",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ This repo also includes a WebRTC server and UI that uses comfystream to support

Refer to [.devcontainer/README.md](.devcontainer/README.md) to setup ComfyStream in a devcontainer using a pre-configured ComfyUI docker environment.

For other installation options, refer to [Install ComfyUI and ComfyStream](https://pipelines.livepeer.org/docs/technical/install/local-testing) in the Livepeer pipelines documentation.
For other installation options, refer to [Install ComfyUI and ComfyStream](https://docs.comfystream.org/technical/get-started/install) in the ComfyStream documentation.

For additional information, refer to the remaining sections below.

### Docker Image

You can quickly deploy ComfyStream using the docker image `livepeer/comfystream`

Refer to the documentation at [https://pipelines.livepeer.org/docs/technical/getting-started/install-comfystream](https://pipelines.livepeer.org/docs/technical/getting-started/install-comfystream) for instructions to run locally or on a remote server.
Refer to the documentation at [https://docs.comfystream.org/technical/get-started/install](https://docs.comfystream.org/technical/get-started/install) for instructions to run locally or on a remote server.

#### RunPod

Expand Down
86 changes: 80 additions & 6 deletions configs/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ models:
# TAESD models
taesd:
name: "TAESD"
url: "https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_decoder.pth"
path: "vae_approx/taesd_decoder.pth"
url: "https://huggingface.co/madebyollin/taesd/resolve/main/taesd_decoder.safetensors"
path: "vae_approx/taesd_decoder.safetensors"
type: "vae_approx"
extra_files:
- url: "https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_encoder.pth"
path: "vae_approx/taesd_encoder.pth"
- url: "https://huggingface.co/madebyollin/taesd/resolve/main/taesd_encoder.safetensors"
path: "vae_approx/taesd_encoder.safetensors"

# ControlNet models
controlnet-depth:
name: "ControlNet Depth"
url: "https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors"
path: "controlnet/control_v11f1p_sd15_depth_fp16.safetensors"
type: "controlnet"
type: "controlnet"

controlnet-mediapipe-face:
name: "ControlNet MediaPipe Face"
Expand Down Expand Up @@ -74,8 +74,82 @@ models:
path: "text_encoders/CLIPText/model.fp16.safetensors"
type: "text_encoder"

# JoyVASA models for ComfyUI-FasterLivePortrait
joyvasa_motion_generator:
name: "JoyVASA Motion Generator"
url: "https://huggingface.co/jdh-algo/JoyVASA/resolve/main/motion_generator/motion_generator_hubert_chinese.pt?download=true"
path: "liveportrait_onnx/joyvasa_models/motion_generator_hubert_chinese.pt"
type: "torch"

joyvasa_audio_model:
name: "JoyVASA Hubert Chinese"
url: "https://huggingface.co/TencentGameMate/chinese-hubert-base/resolve/main/chinese-hubert-base-fairseq-ckpt.pt?download=true"
path: "liveportrait_onnx/joyvasa_models/chinese-hubert-base-fairseq-ckpt.pt"
type: "torch"

joyvasa_motion_template:
name: "JoyVASA Motion Template"
url: "https://huggingface.co/jdh-algo/JoyVASA/resolve/main/motion_template/motion_template.pkl?download=true"
path: "liveportrait_onnx/joyvasa_models/motion_template.pkl"
type: "pickle"

# LivePortrait ONNX models - only necessary to build TRT engines
warping_spade:
name: "WarpingSpadeModel"
url: "https://huggingface.co/warmshao/FasterLivePortrait/resolve/main/liveportrait_onnx/warping_spade-fix.onnx?download=true"
path: "liveportrait_onnx/warping_spade-fix.onnx"
type: "onnx"

motion_extractor:
name: "MotionExtractorModel"
url: "https://huggingface.co/warmshao/FasterLivePortrait/resolve/main/liveportrait_onnx/motion_extractor.onnx?download=true"
path: "liveportrait_onnx/motion_extractor.onnx"
type: "onnx"

landmark:
name: "LandmarkModel"
url: "https://huggingface.co/warmshao/FasterLivePortrait/resolve/main/liveportrait_onnx/landmark.onnx?download=true"
path: "liveportrait_onnx/landmark.onnx"
type: "onnx"

face_analysis_retinaface:
name: "FaceAnalysisModel - RetinaFace"
url: "https://huggingface.co/warmshao/FasterLivePortrait/resolve/main/liveportrait_onnx/retinaface_det_static.onnx?download=true"
path: "liveportrait_onnx/retinaface_det_static.onnx"
type: "onnx"

face_analysis_2dpose:
name: "FaceAnalysisModel - 2DPose"
url: "https://huggingface.co/warmshao/FasterLivePortrait/resolve/main/liveportrait_onnx/face_2dpose_106_static.onnx?download=true"
path: "liveportrait_onnx/face_2dpose_106_static.onnx"
type: "onnx"

appearance_feature_extractor:
name: "AppearanceFeatureExtractorModel"
url: "https://huggingface.co/warmshao/FasterLivePortrait/resolve/main/liveportrait_onnx/appearance_feature_extractor.onnx?download=true"
path: "liveportrait_onnx/appearance_feature_extractor.onnx"
type: "onnx"

stitching:
name: "StitchingModel"
url: "https://huggingface.co/warmshao/FasterLivePortrait/resolve/main/liveportrait_onnx/stitching.onnx?download=true"
path: "liveportrait_onnx/stitching.onnx"
type: "onnx"

stitching_eye_retarget:
name: "StitchingModel (Eye Retargeting)"
url: "https://huggingface.co/warmshao/FasterLivePortrait/resolve/main/liveportrait_onnx/stitching_eye.onnx?download=true"
path: "liveportrait_onnx/stitching_eye.onnx"
type: "onnx"

stitching_lip_retarget:
name: "StitchingModel (Lip Retargeting)"
url: "https://huggingface.co/warmshao/FasterLivePortrait/resolve/main/liveportrait_onnx/stitching_lip.onnx?download=true"
path: "liveportrait_onnx/stitching_lip.onnx"
type: "onnx"

sd-turbo:
name: "SD-Turbo"
url: "https://huggingface.co/stabilityai/sd-turbo/resolve/main/sd_turbo.safetensors"
path: "checkpoints/SD1.5/sd_turbo.safetensors"
type: "checkpoint"
type: "checkpoint"
Loading
Loading