The ComfyUI frontend serializes a STRING widget with empty default
as the literal string "undefined" when left untouched (a known
long-running quirk). Without defensive normalization, an untouched
output_directory was treated as a real directory name and prepended
to the user's path:
filename_prefix = "E:/renders/clip_v003" (typed by user)
output_directory = "undefined" (frontend default, not typed)
_compose_prefix(...) -> "undefined/clip_v003" (relative)
_resolve_abs_target -> None (not absolute)
super().combine_video -> writes to <output>/undefined/clip_v003_*
The QuickTime ended up at <ComfyUI>/output/undefined/<name>.mov
with a spurious `undefined/` subfolder, instead of at the absolute
path the user actually specified.
Fix: a `_normalize_text_input()` helper coerces the literal strings
"undefined" / "null" / "None" (case-insensitive, post-strip) to "".
Applied to both filename_prefix and output_directory at the top of
combine_video() before any path composition. 4 new tests cover the
sentinels and a regression test for the exact path-composition
behavior that produced the bug.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>