Skip to content

Commit cb9f788

Browse files
authored
Remove liveportrait (#393)
1 parent 84924f7 commit cb9f788

8 files changed

+4
-235
lines changed

.github/workflows/ai-runner-live-pipelines-docker.yaml

+2-9
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
strategy:
8484
fail-fast: false
8585
matrix:
86-
pipeline: [streamdiffusion, comfyui, liveportrait]
86+
pipeline: [streamdiffusion, comfyui]
8787
steps:
8888
- name: Check out code
8989
uses: actions/[email protected]
@@ -98,9 +98,6 @@ jobs:
9898
files_yaml: |
9999
base_dockerfile:
100100
- runner/docker/Dockerfile.live-base-${{ matrix.pipeline }}
101-
liveportrait:
102-
- runner/images/**
103-
- runner/requirements-liveportrait.txt
104101
105102
- name: Set up Docker Buildx
106103
uses: docker/setup-buildx-action@v3
@@ -120,11 +117,7 @@ jobs:
120117
github.event_name == 'pull_request' &&
121118
github.event.pull_request.head.repo.full_name == github.repository &&
122119
(
123-
steps.changed-files.outputs.base_dockerfile_any_changed == 'true' ||
124-
(
125-
matrix.pipeline == 'liveportrait' &&
126-
steps.changed-files.outputs.liveportrait_any_changed == 'true'
127-
)
120+
steps.changed-files.outputs.base_dockerfile_any_changed == 'true'
128121
)
129122
)
130123
with:

runner/app/live/pipelines/liveportrait.py

-114
This file was deleted.

runner/app/live/pipelines/loader.py

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ def load_pipeline(name: str, **params) -> Pipeline:
44
if name == "streamdiffusion":
55
from .streamdiffusion import StreamDiffusion
66
return StreamDiffusion(**params)
7-
elif name == "liveportrait":
8-
from .liveportrait import LivePortrait
9-
return LivePortrait(**params)
107
elif name == "comfyui":
118
from .comfyui import ComfyUI
129
return ComfyUI(**params)

runner/app/live/streamer/streamer.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,7 @@ async def monitor_loop(self):
242242
continue
243243

244244
active_after_reload = time_since_last_output < (time_since_reload - 1)
245-
stopped_recently = (
246-
time_since_last_output > 8
247-
if self.pipeline == "liveportrait" # liveportrait loads very quick but gets stuck too often
248-
else active_after_reload and time_since_last_output > 5 and time_since_last_output < 60
249-
)
245+
stopped_recently = active_after_reload and time_since_last_output > 5 and time_since_last_output < 60
250246
if stopped_recently or gone_stale:
251247
logging.warning(
252248
"No output received while inputs are being sent. Restarting process."

runner/dl_checkpoints.sh

+1-23
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ function download_all_models() {
8787
function download_live_models() {
8888
huggingface-cli download KBlueLeaf/kohaku-v2.1 --include "*.safetensors" "*.json" "*.txt" --exclude ".onnx" ".onnx_data" --cache-dir models
8989
huggingface-cli download stabilityai/sd-turbo --include "*.safetensors" "*.json" "*.txt" --exclude ".onnx" ".onnx_data" --cache-dir models
90-
huggingface-cli download warmshao/FasterLivePortrait --local-dir models/FasterLivePortrait--checkpoints
9190
huggingface-cli download yuvraj108c/Depth-Anything-Onnx --include depth_anything_vitl14.onnx --local-dir models/ComfyUI--models/Depth-Anything-Onnx
9291
download_sam2_checkpoints
9392
download_florence2_checkpoints
@@ -145,27 +144,6 @@ function build_tensorrt_models() {
145144
done
146145
done"
147146

148-
# FasterLivePortrait
149-
AI_RUNNER_LIVEPORTRAIT_IMAGE=${AI_RUNNER_LIVEPORTRAIT_IMAGE:-livepeer/ai-runner:live-app-liveportrait}
150-
docker pull $AI_RUNNER_LIVEPORTRAIT_IMAGE
151-
# ai-worker has tags hardcoded in `var livePipelineToImage` so we need to use the same tag in here:
152-
docker image tag $AI_RUNNER_LIVEPORTRAIT_IMAGE livepeer/ai-runner:live-app-liveportrait
153-
docker run --rm -v ./models:/models --gpus all -l TensorRT-engines \
154-
$AI_RUNNER_LIVEPORTRAIT_IMAGE \
155-
bash -c "cd /app/app/live/FasterLivePortrait && \
156-
if [ ! -f '/models/FasterLivePortrait--checkpoints/liveportrait_onnx/stitching_lip.trt' ]; then
157-
echo 'Building TensorRT engines for LivePortrait models (regular)...'
158-
sh scripts/all_onnx2trt.sh
159-
else
160-
echo 'Regular LivePortrait TensorRT engines already exist, skipping build'
161-
fi && \
162-
if [ ! -f '/models/FasterLivePortrait--checkpoints/liveportrait_animal_onnx/stitching_lip.trt' ]; then
163-
echo 'Building TensorRT engines for LivePortrait models (animal)...'
164-
sh scripts/all_onnx2trt_animal.sh
165-
else
166-
echo 'Animal LivePortrait TensorRT engines already exist, skipping build'
167-
fi"
168-
169147
# ComfyUI (only DepthAnything for now)
170148
AI_RUNNER_COMFYUI_IMAGE=${AI_RUNNER_COMFYUI_IMAGE:-livepeer/ai-runner:live-app-comfyui}
171149
docker pull $AI_RUNNER_COMFYUI_IMAGE
@@ -242,7 +220,7 @@ echo "Starting livepeer AI subnet model downloader..."
242220
echo "Creating 'models' directory in the current working directory..."
243221
mkdir -p models
244222
mkdir -p models/checkpoints
245-
mkdir -p models/StreamDiffusion--engines models/FasterLivePortrait--checkpoints models/ComfyUI--models models/ComfyUI--models/sam2--checkpoints models/ComfyUI--models/checkpoints
223+
mkdir -p models/StreamDiffusion--engines models/ComfyUI--models models/ComfyUI--models/sam2--checkpoints models/ComfyUI--models/checkpoints
246224

247225
# Ensure 'huggingface-cli' is installed.
248226
echo "Checking if 'huggingface-cli' is installed..."

runner/docker/Dockerfile.live-base-liveportrait

-67
This file was deleted.

runner/requirements-liveportrait.txt

-13
This file was deleted.

worker/docker.go

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ var pipelineToImage = map[string]string{
6666

6767
var livePipelineToImage = map[string]string{
6868
"streamdiffusion": "livepeer/ai-runner:live-app-streamdiffusion",
69-
"liveportrait": "livepeer/ai-runner:live-app-liveportrait",
7069
"comfyui": "livepeer/ai-runner:live-app-comfyui",
7170
"segment_anything_2": "livepeer/ai-runner:live-app-segment_anything_2",
7271
"noop": "livepeer/ai-runner:live-app-noop",

0 commit comments

Comments
 (0)