Skip to content

Commit d89d4e6

Browse files
committed
feat: comfyui test
1 parent 5b087ef commit d89d4e6

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/ai-runner-pipelines-fps-test.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- { id: noop, input_fps: 30, exp_output_fps: 28 }
2626
- { id: liveportrait, input_fps: 30, exp_output_fps: 28 }
2727
- { id: streamdiffusion, input_fps: 30, exp_output_fps: 28 }
28+
- { id: comfyui, input_fps: 30, exp_output_fps: 28 } # only depth anything for now
2829
steps:
2930
- name: Checkout code
3031
uses: actions/checkout@v4
@@ -52,8 +53,7 @@ jobs:
5253
5354
- name: Install packages
5455
run: |
55-
apt-get update && apt-get install -y libzmq3-dev
56-
rm -rf /var/lib/apt/lists/*
56+
sudo sh -c "apt-get update && apt-get install -y libzmq3-dev && rm -rf /var/lib/apt/lists/*"
5757
5858
- name: Clean up runner dockers
5959
run: |

cmd/examples/live-video-to-video/main.go

+33
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,35 @@ import (
2323
"github.com/livepeer/ai-worker/worker"
2424
)
2525

26+
const defaultPrompt = `{
27+
"1": {
28+
"inputs": {
29+
"images": ["2", 0]
30+
},
31+
"class_type": "SaveTensor",
32+
"_meta": {
33+
"title": "SaveTensor"
34+
}
35+
},
36+
"2": {
37+
"inputs": {
38+
"engine": "depth_anything_vitl14-fp16.engine",
39+
"images": ["3", 0]
40+
},
41+
"class_type": "DepthAnythingTensorrt",
42+
"_meta": {
43+
"title": "Depth Anything Tensorrt"
44+
}
45+
},
46+
"3": {
47+
"inputs": {},
48+
"class_type": "LoadTensor",
49+
"_meta": {
50+
"title": "LoadTensor"
51+
}
52+
}
53+
}`
54+
2655
func sendImages(ctx context.Context, imageDir string, inputFps int) error {
2756
publisher, err := zmq4.NewSocket(zmq4.PUB)
2857
if err != nil {
@@ -215,6 +244,7 @@ func main() {
215244
modelID := flag.String("modelid", "liveportrait", "Model ID for the live pipeline")
216245
imageDir := flag.String("imagedir", "runner/example_data/live-video-to-video/", "Path to the image to send")
217246
expOutputFps := flag.Int("expoutputfps", 27, "Minimum expected output FPS")
247+
comfyuiPrompt := flag.String("comfyuiprompt", defaultPrompt, "Prompt to be used in comfyui pipeline")
218248
flag.Parse()
219249

220250
pipeline := "live-video-to-video"
@@ -283,6 +313,9 @@ func main() {
283313
ModelId: modelID,
284314
SubscribeUrl: "tcp://172.17.0.1:5555",
285315
PublishUrl: "tcp://172.17.0.1:5556",
316+
Params: &map[string]interface{}{
317+
"prompt": *comfyuiPrompt,
318+
},
286319
}
287320

288321
slog.Info("Running live-video-to-video")

0 commit comments

Comments
 (0)