Code gets a little messy, but this should handle also handle a
hypothetical future with animated previews for concurrent execution,
while still properly cleaning up after itself once a workflow ceases
execution.
Swapping workflows still causes previews to cease display. I don't know
a clean solution for this.
The audio input was changed to be discarded when outputting to the
gifski format since gifs do not support audio and other non-audio
supporting formats will silently ignore audio when it cannot be embedded.
This fix was mistakenly added outside the appropriate conditional block
and instead discarded all audio. This was not intended
Resolves#521
Functionality already exists in Upload variant and backing util
function, so the change is negligible.
Also commit to minor version bump. Other concommitant changes also break
forwards compatibility, so it's a chance to roll multiple together even
if this bump doesn't accompany anything big or flashy.
Older ffmpeg versions don't include the full option for color_range.
Documentation indicates that pc resolves to the same value and has been
swapped to.
Resolves#445
The format fix for gifski was improperly applied to all outputs. It has
now been properly restricted.
The prior disconnection logic would eagerly disconnect if the type has
changed at all. In addition to providing awful quality of life, this
was also causing issue with workflows that contain an unbatch node being
saved at all.
The code for type cloning has undergone a substantial rewrite to
properly check link validity and to propogate link events
Resolves#432
Supporting formats on Meta Batches brings back an ugly problem of
expecting users to do math. Restricting selections on the Meta Batch
node would be an onerous amount of work, but as a simple solution, the
closest valid frame is suggested when an error occurs
Adds a new node to select the most recently modified file of a target
folder. This can be used to automate using the output of one execution
as the input for another. In order to allow frontend values to properly
update, this is implemented as a virtual node, skeleton node def is
included due to difficulty with setting up the node as fully virtual.
This will likely be revisited in the future.
Add an optional length argument to path trimming. The original 30
character length estimate seems to no longer be accurate which results
in text overlapping. A more thorough investigation and fix will come
later.
Update experimental designation on nodes.
Format widgets which are numbers are now converted to be annotated
widgets. This ensures they have full access to VHS QoL in the future
even though none can make use of this functionality at present.
Sequential widget prompting with now check that the subsequent widget
has a mouse function before blindly calling, but is also lmited to only
annotated numbers for now. The distinction makes no difference for
existing nodes, but adds an additional layer of safety.
mp4 files are parsed separately from webm files. The prior commit
changed the parsing to directly pass the workflow content, but failed to
make an equivalent change in the mp4 parsing code.
As a fix, the full dict containing metadata information is now returned
as before and native videos are simply wrapped.
Resolves#393
Core has added experimental support for outputting video, but does not
support loading it yet. VHS currently swallows any video files it can
not find metadata in. Once ComfyUI adds support for loading it's own
video files, this will result in an awkward period where VHS breaks
loading of core ComfyUI video files.
Instead, I've just implemented support for loading workflows from videos
output by ComfyUI.
Format widgets are now stored in the options of format widget instead of
the name.
This code has been prepped to execute without requiring a webpage reload
unless a user has not updated in the week prior to this commit.
A minor js change is made to allow for a change in format to function
without recreated nodes, but this will be phased out immeidately now
that the code for format selection can be simplified
See ffbc27304
Several other custom nodes have blindly copied VHS code and overwrite
the registered location for video formats. To solve this, the builtin
video_formats folder is checked separately and given priority over
folder_paths formats.
See #375
Bump version
Nodes that are added, rather than being restored do not have configure
called and thus do not have their callbacks triggered. The addLoadCommon
method used to initialize the Load Video nodes will now explicitly
trigger the callback on every non video widget at the end to ensure it's
done in a unified singular spot.
Use new format to define settings as part of the extension
Update calls to get setting value to no longer provide a default value,
This was once required, but is now deprecated and produces console spam.
Introduce a skip encode parameter which returns the file itself. This
allows the preview endpoint to be used to reference video files by full
path, without requiring re-encoding
Add a minimum width setting.
Scrunch matching for video info back to a single pass.
The default used when fps is not found is kept at the suggested 1, but
the preview endpoint uses a default of 30 fps. These should probably be
made equal at some point in the future.
Bump version
The js code to add format widgets incorrectly checked for truthiness,
so trying to set false as a default value would leave a widget
uninitialized. This has been fixed.
The check for the actual state of trim_to_audio incorrectly assumed it
to still be a boolean and has been corrected.
The webm and h264 formats have had widgets added for trimming to audio
length. After further consideration, VHS already has code to ensure that
workflows won't brick if an option is removed in the future. A minor QoL
being sunset in the future is still better than that QoL feature never
existing.
Bump version
Format widgets were implemented by pulling information from the prompt,
but this is non functional when an input is resolved at runtime. By
adding a kwargs input to node function, only these converted inputs are
passed. As a quick solution, any passed kwarg value overwrites any
prompt provided kwarg value.
See #326
Update version, this had been missed the last couple merges.
Previously, link redirection was performed on Load Video and Video
Combine to facilitate loading or saving from latents. During this time,
extra inputs and outputs were added that were hidden. The extra output
was removed, but hiding code was not, which resulted in the next output,
video_info, being hidden instead.
Bump version
As a workaround to displaying transparent videos a to support correct
audio synchronization in advanced previews, a initial prepass is
performed to query information on the video file. This prepass
mistakenly used a hardcoded `ffmpeg` instead of the proper ffmpeg_path