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
Several nodes, like Load Video FFmpeg and Load Audio have a widgets that
take a time in seconds.
These are now handled by an updated widget that will display times as
hour:minutes:seconds and allow entry by hour:minutes:seconds
Having dicts that lie about contents has been officially sanctioned as
the supported way of allowing dynamic inputs, but VHS already had
functioning and well tested code for parsing PROMPT directly.
Since there are issues with Video Combine being used inside dynamic
prompts, it is better to swap to the intentionally supported method.
Resolves#424
SetWidgetConfig is usable on widget options despite the type mismatch.
This provides a cleaner solution than a blind
Object.getOwnPropertySymbols call.
PIL output formats were already passed iterators for improved memory
management over pre-collected lists. Adding a progress bar on top of
this is simple QOL.
The image/webp output is now set to always be lossless. This is
potentially owrht exposing in the future, but I assume lossless will be
preferable the overwhelming majority of the time.
Resolves#405
The prior code of parsing width traces all the way back to f63a0f78
I no longer recall the purpose of the slice, but parsing element
information to determine sizing is inherently flawed. An element width
will not exist until a preview has loaded. Instead, the element size is
back calculated from the node size.
The prior fix to respect rendering threshold had a number of mistakes.
Foremost, a typo in naming prevented it from applying at all. Path
widgets perform rendering separately and need an independent fix. The
comparison has additionally been changed to greater than or equals. This
is most noticeable when low_quality_zoom_threshold is set to 1.0
See #412
About a year and a half ago, ComfyUI changed it's input validation to
allow for specifying which inputs should be validated, but removing the
undesired inputs would cause errors for users who had not updated
ComfyUI to recieve this update. As a result, input validation emthods
were modified to accept an additional kwargs input to allow
compatibility with both the new and old versions. Around the time
execution inversion landed, this was again changed so that a kwargs
input could be used for validation with dynamic inputs. From this point,
the kwargs argument also served to prevent input validation.
Supporting extremely old (>1 year) ComfyUI versions is not currently a
major priority, so these kwargs inputs can be removed to restore input
validation
Resolves#413
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
ComfyUI has added native latent factors for wan, so the ad hoc and
particularly unhelpful factors I made can be pruned.
Fix a missed scoping when checking that meta batch is compatible with a
selected load format. Special thanks to tonirv68.
This is still a bit clunkier than I would like and will likely see
future updates.
Resolves#409
Core has staged a more robust implementation for parsing video metadata.
Once this been rolled out, it should be used instead of the `good
enough` implementation used by VHS.
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
Query video isn't denounced and winds up being checked frequently. This
can produce heavy console spam when source information is frequently
updated. More cleanup will be done, but for now, an empty response is
returned instead of an error to prevent the console from getting
spammed.
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.
video_query data is deleted when a new preview is loaded. This ensures
old query information doesn't persist on failed load.
Call onRemove on removed output format widgets. This doesn't matter for
any existing formats, but swapping to app.widgets allows for arbitrary
widgets to be included in formats which may require it.
Remove the app argument from the VHSFLOAT and VHSINT widget
constructors. These constructors aren't actually used, but this change
brings there functionality closer in line with the upstream sentiment.
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.
When a widget is clicked on a dialogue pops up to allow a value to be
typed. For numeric inputs on VHS nodes, pushing tab will now finalize
the input and create a new prompt for the next widget on the node.
Fix incorrect indentation.
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.
injectHidden was previously used to hide the custom width and custom
height widgets when they had been disabled by force_size.
As this functionality has been removed, this is dead code and can be
removed as well.
Since formats no longer has funky item renaming to transfer format
widgets, the builtin validation no longer needs to be disabled and the
VALIDATE_INPUTS method can be removed
Calls to INPUT_TYPES are frequent, which results in many disk reads. The
output of INPUT_TYPES is now cached for the last 5 seconds. This should
fill a nice middle ground between video formats being updated for
changes on disk and the current state of requiring 30+ disk reads on
prompt queue.
Now that passing of information has been simplified, it's handling can
also be cleaned up. The new code should have no functional difference
but is vastly shorter.
Because the functionality has not changed, this still does not require a
reload.
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