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 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-03 21:20:23 +00:00
parent 3116a70c3e
commit 6e0ee65e40

View File

@@ -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)