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 <noreply@anthropic.com>
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user