From ab8e1e5b7b53bac783e5873f06f3ab3fc8f5f12a Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sat, 4 Apr 2026 16:27:49 +0200 Subject: [PATCH] feat: SelvaFeatureExtractor outputs prompt as STRING Users can now wire the prompt output directly to SelvaSampler's prompt input, making the data flow explicit instead of relying on the implicit features fallback. Co-Authored-By: Claude Sonnet 4.6 --- nodes/selva_feature_extractor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nodes/selva_feature_extractor.py b/nodes/selva_feature_extractor.py index c802026..995adf9 100644 --- a/nodes/selva_feature_extractor.py +++ b/nodes/selva_feature_extractor.py @@ -65,8 +65,8 @@ class SelvaFeatureExtractor: }, } - RETURN_TYPES = ("SELVA_FEATURES", "FLOAT") - RETURN_NAMES = ("features", "fps") + RETURN_TYPES = ("SELVA_FEATURES", "FLOAT", "STRING") + RETURN_NAMES = ("features", "fps", "prompt") FUNCTION = "extract_features" CATEGORY = PRISMAUDIO_CATEGORY @@ -92,7 +92,8 @@ class SelvaFeatureExtractor: if os.path.exists(cached_path): print(f"[SelVA] Using cached features: {cached_path}", flush=True) - return (_load_cached(cached_path), float(fps)) + cached = _load_cached(cached_path) + return (cached, float(fps), cached.get("prompt", prompt)) device = get_device() dtype = model["dtype"] @@ -159,7 +160,7 @@ class SelvaFeatureExtractor: "sync_features": sync_features.cpu(), "duration": float(duration), "prompt": prompt, - }, float(fps)) + }, float(fps), prompt) def _load_cached(path):