From 6e0ee65e403f8427ffb4c11ea47083c805249cad Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 3 Feb 2026 21:20:23 +0000 Subject: [PATCH] Fix streaming_gpu.py to include CPU primitives streaming_gpu.py was being loaded on GPU nodes but had no PRIMITIVES dict, causing audio-beat, audio-energy etc. to be missing. Now imports and includes all primitives from the CPU streaming.py module. Co-Authored-By: Claude Opus 4.5 --- sexp_effects/primitive_libs/streaming_gpu.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sexp_effects/primitive_libs/streaming_gpu.py b/sexp_effects/primitive_libs/streaming_gpu.py index f36a82e..fbd38cb 100644 --- a/sexp_effects/primitive_libs/streaming_gpu.py +++ b/sexp_effects/primitive_libs/streaming_gpu.py @@ -499,4 +499,18 @@ __all__ = [ 'gpu_composite', 'get_primitives', 'check_hwdec_available', + 'PRIMITIVES', ] + + +# Import CPU primitives from streaming.py and include them in PRIMITIVES +# This ensures audio analysis primitives are available when streaming_gpu is loaded +def _get_cpu_primitives(): + from sexp_effects.primitive_libs import streaming + return streaming.PRIMITIVES + + +PRIMITIVES = _get_cpu_primitives().copy() + +# Add GPU-specific primitives +# (The GPU video source will be added by create_cid_primitives in the task)