@@ -23,6 +23,35 @@ import (
23
23
"github.com/livepeer/ai-worker/worker"
24
24
)
25
25
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
+
26
55
func sendImages (ctx context.Context , imageDir string , inputFps int ) error {
27
56
publisher , err := zmq4 .NewSocket (zmq4 .PUB )
28
57
if err != nil {
@@ -215,6 +244,7 @@ func main() {
215
244
modelID := flag .String ("modelid" , "liveportrait" , "Model ID for the live pipeline" )
216
245
imageDir := flag .String ("imagedir" , "runner/example_data/live-video-to-video/" , "Path to the image to send" )
217
246
expOutputFps := flag .Int ("expoutputfps" , 27 , "Minimum expected output FPS" )
247
+ comfyuiPrompt := flag .String ("comfyuiprompt" , defaultPrompt , "Prompt to be used in comfyui pipeline" )
218
248
flag .Parse ()
219
249
220
250
pipeline := "live-video-to-video"
@@ -283,6 +313,9 @@ func main() {
283
313
ModelId : modelID ,
284
314
SubscribeUrl : "tcp://172.17.0.1:5555" ,
285
315
PublishUrl : "tcp://172.17.0.1:5556" ,
316
+ Params : & map [string ]interface {}{
317
+ "prompt" : * comfyuiPrompt ,
318
+ },
286
319
}
287
320
288
321
slog .Info ("Running live-video-to-video" )
0 commit comments