summaryrefslogtreecommitdiff
path: root/tools/seq_compiler.py
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-03-22 12:53:13 +0100
committerskal <pascal.massimino@gmail.com>2026-03-22 12:53:13 +0100
commit581c67b75aa3c089c86f764b67e6de7476a13993 (patch)
tree38c1bc78c8e688b6c75eedd140c5a49bc48a4404 /tools/seq_compiler.py
parent16cbcb6d9461d8d40eb69cdafef6b35368654b66 (diff)
feat(cnn_v3): wire trained weights into CNNv3Effect + add timeline test sequence
- CNNv3Effect constructor loads ASSET_WEIGHTS_CNN_V3 via GetAsset on startup - seq_compiler.py: CLASS_TO_HEADER supports full #include paths for cnn_v3/ classes - timeline.seq: add cnn_v3_test sequence at 48s (GBufferEffect → CNNv3Effect) - test_cnn_v3_parity: zero_weights test now explicitly uploads zeros to override asset handoff(Gemini): CNNv3Effect ready; export weights to workspaces/main/weights/ and seek to 48s to test
Diffstat (limited to 'tools/seq_compiler.py')
-rwxr-xr-xtools/seq_compiler.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/seq_compiler.py b/tools/seq_compiler.py
index dfd2ea4..fbd5c0d 100755
--- a/tools/seq_compiler.py
+++ b/tools/seq_compiler.py
@@ -391,14 +391,21 @@ def generate_cpp(seq: SequenceDecl, sorted_effects: List[EffectDecl],
class_name += f'_{seq_index}_Sequence'
# Generate includes
- # Map class names that share a header file
+ # Map class names to header stems (default path: effects/<stem>_effect.h)
+ # Use a full #include string to override the path entirely.
CLASS_TO_HEADER = {
- 'NtscYiq': 'ntsc',
+ 'NtscYiq': 'ntsc',
+ 'GBufferEffect': '#include "../../cnn_v3/src/gbuffer_effect.h"',
+ 'CNNv3Effect': '#include "../../cnn_v3/src/cnn_v3_effect.h"',
}
includes = set()
for effect in seq.effects:
if effect.class_name in CLASS_TO_HEADER:
- header = CLASS_TO_HEADER[effect.class_name]
+ val = CLASS_TO_HEADER[effect.class_name]
+ if val.startswith('#include'):
+ includes.add(val)
+ continue
+ header = val
else:
# Convert ClassName to snake_case header
header = re.sub('([A-Z])', r'_\1', effect.class_name).lower().lstrip('_')