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
There were still intermittent errors and console spam from a transcoded
advanced preview being interrupted before it could finish.Connection
errors are also caught now.
ffmpeg does not appear to handle transparency as expected for gif
creation. Transparent areas will show the previous frame, or a portion
of it. A deep dive into trying to find configuration options to fix this
did not result in solutions that functioned on my machine, but did
introduce me to the ffmpeg split filter.
Split allows for a single ffmpeg execution to generate a palette and
utilize the palette for creating the output gif without requiring a temp
file. However, the video data must be buffered in memory by ffmpeg.
Quick testing seems to show that ffmpeg uses 4 bytes per pixel
of buffered frame data.
The ramifications for memory usage are nuanced, but wind up preferable.
The increased memory per pixel of ffmpeg's buffering only results in
(approximated) 3% memory increase over the whole workflow, but remove
the need for a tempfile, a second subprocess call, and allow for
imperfect Meta Batch support which can only extend the total frame count
by 5-6x. It's a reduction in moving parts for underwhelming memory
characteristics in both the best and worst case. Additionally, it likely
actually addresses the issue the original requester saw in #160
The actual code for allowing pre-passes is left in for now and will
likely be re-evaluated for other uses or pruned at a later time.
Actually bump version.
in_place requires a fairly recent version of pillow and performing the
performance benefit of it is minimal.
Loading as float16 does break other nodes so the change is getting
reverted.
Resolves#226
ffmpeg 7.0 seems to introduce a regression where shortest doesn't apply
until the entire audio stream has been processed. When combined with
apad, this means audio transcoding never completes.
As a workaround, a maximum duration for the audio with pad has been
added as well as framework to track the total number of frames written
across multiple meta batches.
See #213