Skip to content

Commit 51d23fe

Browse files
committed
Add documentation for Select Latest, prune timeout
The code for querying video information is an async function. Rather than adding a setTimeout call, the function is simply called, but never awaited. Remove experimental from unbatch description
1 parent 07575bb commit 51d23fe

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

videohelpersuite/documentation.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def format_type(desc, lower, lowers=None, upper=None, uppers=None, cap=None):
552552
#"VHS_SelectLatents": None,
553553
#"VHS_SelectImages": None,
554554
#"VHS_SelectMasks": None,
555-
"VHS_Unbatch": ['Unbatch 🎥🅥🅗🅢', short_desc('Experimental node to unbatch a list of items into a single concatenated item'),
555+
"VHS_Unbatch": ['Unbatch 🎥🅥🅗🅢', short_desc('Unbatch a list of items into a single concatenated item'),
556556
"Useful for when you want a single video output from a complex workflow",
557557
"Has no relation to the Meta Batch system of VHS",
558558
{'Inputs': {
@@ -562,6 +562,16 @@ def format_type(desc, lower, lowers=None, upper=None, uppers=None, cap=None):
562562
'unbatched': 'A single output element. Torch tensors are concatenated across dim 0, all other types are added which functions as concatenation for strings and arrays, but may give undesired results for other types',
563563
},
564564
}],
565+
"VHS_SelectLatest": ['Select Latest 🎥🅥🅗🅢', short_desc('Experimental virtual node to select the most recently modified file from a given folder'),
566+
"Assists in the creation of workflows where outputs from one execution are used elsewhere in subsequent executions.",
567+
{'Inputs': {
568+
'filename_prefix': 'A path which can consist of a combination of folders and a prefix which candidate files must match',
569+
'filename_postfix': 'A string which chich the selected file must end with. Useful for limiting to a target extension.',
570+
},
571+
'Outputs': {
572+
'Filename': 'A string representing a file path to the most recently modified file.',
573+
},
574+
}],
565575
}
566576

567577
def as_html(entry, depth=0):

web/js/VHS.core.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ function addVideoPreview(nodeType, isInput=true) {
917917
this.imgEl.hidden = false;
918918
}
919919
delete previewNode.video_query
920-
setTimeout(async () => {
920+
const doQuery = async () => {
921921
if (!previewWidget?.value?.params?.filename) {
922922
return
923923
}
@@ -930,7 +930,8 @@ function addVideoPreview(nodeType, isInput=true) {
930930
return
931931
}
932932
previewNode.video_query = query
933-
}, 100)
933+
}
934+
doQuery()
934935
}
935936
previewWidget.callback = previewWidget.updateSource
936937
previewWidget.parentEl.appendChild(previewWidget.videoEl)

0 commit comments

Comments
 (0)