This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 57fe259773 avfilter/dnn: add synchronous execution path in torch
backend
57fe259773 is described below
commit 57fe25977353bdfb4c2baa4d018538a73fbe3a19
Author: stevxiao <[email protected]>
AuthorDate: Thu Feb 5 11:34:07 2026 -0500
Commit: Guo Yejun <[email protected]>
CommitDate: Thu Feb 12 20:30:53 2026 +0800
avfilter/dnn: add synchronous execution path in torch backend
When using `dnn_processing` filter with torch backend, FFmpeg hangs
indefinitely because no inference is actually performed.
Resolve this problem by add "else" branch for synchronous execution path.
Usage:
ffmpeg -i input.mp4 -vf
scale=224:224,format=rgb24,dnn_processing=dnn_backend=torch:model=sr_model_torch.pt:device=cpu
output.mp4
---
libavfilter/dnn/dnn_backend_torch.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavfilter/dnn/dnn_backend_torch.cpp
b/libavfilter/dnn/dnn_backend_torch.cpp
index 33809bf983..56fbe372d1 100644
--- a/libavfilter/dnn/dnn_backend_torch.cpp
+++ b/libavfilter/dnn/dnn_backend_torch.cpp
@@ -424,6 +424,14 @@ static int execute_model_th(THRequestItem *request, Queue
*lltask_queue)
}
th_model->cond->notify_one();
return 0;
+ } else {
+ // Synchronous execution path
+ ret = th_start_inference((void *)(request));
+ if (ret != 0) {
+ goto err;
+ }
+ infer_completion_callback(request);
+ return (task->inference_done == task->inference_todo) ? 0 :
DNN_GENERIC_ERROR;
}
err:
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]