Commit Graph
576 Commits
Author SHA1 Message Date
Austin Mroz 32ed87b46e Add execution blocker node
Adds new experimental node to block execution if input has changed since
the previous execution.
2025-03-26 15:55:22 -05:00
Austin Mroz 0a3b1eb433 Improve cloneType disconnection logic
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
2025-03-26 12:09:00 -05:00
AustinMroz c9dcc3a229 Merge 1.5.13 2025-03-23 22:38:31 -05:00
Austin Mroz d3e3c2e6b4 Merge removal of native metadata parsing 2025-03-23 22:33:10 -05:00
Austin Mroz 546359d436 Add additional null check to audio link migration 2025-03-23 22:32:20 -05:00
Austin Mroz 0d5870a4ce Fix padding of seconds term 2025-03-23 22:32:00 -05:00
AustinMroz 5e61bcf218 Merge version 1.5.12 2025-03-19 16:16:33 -05:00
Austin Mroz c338a1e572 Display frame rate annotation when force_rate is 0 2025-03-19 16:00:12 -05:00
Austin Mroz bbac2480f7 Add lossless toggle to image/webp output format
Resolves #425
2025-03-19 08:56:26 -05:00
Austin Mroz 2fbbd53e62 Fix incorrect seconds padding, remove callback 2025-03-18 17:42:51 -05:00
Austin Mroz 93ae745f22 Add timestamp widget
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
2025-03-18 17:25:40 -05:00
Austin Mroz e661ee7f3f Set start_time step to be single frame.
This is simple and low cost to implement since video information is
already being queried.
2025-03-18 12:59:01 -05:00
Austin Mroz 63ac6727c9 Accept all inputs instead of passing prompt
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
2025-03-17 15:59:20 -05:00
Austin Mroz 718af34bc2 Use setWidgetConfig on options
SetWidgetConfig is usable on widget options despite the type mismatch.
This provides a cleaner solution than a blind
Object.getOwnPropertySymbols call.
2025-03-17 15:57:57 -05:00
AustinMroz 0a75c7958f Merge 1.5.11 2025-03-14 10:45:31 -05:00
Austin Mroz 3b36daba92 Image format progress bar, lossless webp output
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
2025-03-14 02:28:56 -05:00
Austin Mroz 53c406679d Use node size to calculate target preview width
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.
2025-03-14 02:28:53 -05:00
Austin Mroz e44b3565c7 Allow dragging node from VHS preview widgets
See #414
2025-03-14 02:28:49 -05:00
niboshi 2cf03c6ac0 Fix color degradation in ffmpeg frame generator 2025-03-14 04:40:28 +09:00
Austin Mroz 73418575ca Fix low quality rendering threshold
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
2025-03-11 16:44:15 -05:00
Tommie ea525bfbd6 Fix input mime type for Matroska files
Fixes .mkv files not showing in the file upload window
2025-03-11 16:24:04 -05:00
Austin Mroz 28eb44c13c Pass mouse events for animated latent previews
Resolves #414
2025-03-11 14:45:59 -05:00
Austin Mroz 1ad84c1a11 Restore input validation for load_video_nodes
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
2025-03-11 14:45:59 -05:00
Austin Mroz 25c31ca79e Respect low quality rendering threshold
Resolves #412
2025-03-11 14:45:59 -05:00
Kaur Kuut 031c4ae301 Fix query_video always raising an exception for WebP. 2025-03-09 21:35:39 -05:00
Austin Mroz 3a96e87951 Suggest a frames_per_batch on format mismatch
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
2025-03-06 11:04:27 -06:00
Austin Mroz 7e3eb2a62e Fix meta batch with format, remove wan factors
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
2025-03-06 11:04:27 -06:00
Austin Mroz 626cb249d1 Remove parsing of native video metadata
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.
2025-02-28 17:23:01 -06:00
Austin Mroz 4c7858ddd5 Check for existance of Wan21 format first
I was a little over eager with injecting latent factors for Wan. If an
older version of comfy is used, it will no longer cause VHS to fail to
import.
2025-02-25 18:19:59 -06:00
Austin Mroz 51aa43368d 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
2025-02-25 17:26:46 -06:00
Austin Mroz b601e8cf61 Add format information for wan
Latent factors have minimal testing and are probably bad.
2025-02-25 17:26:46 -06:00
Austin Mroz 8343122234 Reduce web console spam
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.
2025-02-25 12:24:12 -06:00
Austin Mroz 532de499f6 Select Latest poc
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.
2025-02-25 12:24:12 -06:00
Austin Mroz 23ebe28091 Fix persisting output previews across reloads
Preview updates on message. This nonsense of wrapping outputs is not
useful.
2025-02-25 12:24:12 -06:00
Austin Mroz 2c25b8b538 Minor cleanup
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.
2025-02-24 12:06:27 -06:00
Austin Mroz 514de7fe2e Add video source information to context menu
Inspired by the change to core image preview nodes. Information for a
video source is now displayed in the context menu for nodes with a
preview.
2025-02-24 12:06:27 -06:00
Austin Mroz f2c905aaed Make numeric format widgets annotated, tab safety
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.
2025-02-24 12:06:27 -06:00
Austin Mroz 127b3646fa Allow sequential widget updates with tab
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.
2025-02-24 12:06:27 -06:00
Austin Mroz 9e0590cfdb Minor missed changes to comments 2025-02-24 12:06:27 -06:00
Austin Mroz 124c913ccd Fix loading of mp4 metadata
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
2025-02-21 12:33:02 -06:00
Austin Mroz 8262bb941d Support Core format for video metadata
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.
2025-02-21 07:49:54 -06:00
AustinMroz c36626c602 Merge version 1.5.2
video_format migration and input caching
2025-02-16 11:58:00 -06:00
Austin Mroz c81556ac3c Lazy load documentation images. 2025-02-15 23:05:43 -06:00
Austin Mroz 24566553a5 Remove injectHidden
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.
2025-02-15 17:04:23 -06:00
Austin Mroz 082b2007f0 Remove VALIDATE_INPUTS from Video Combine
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
2025-02-13 17:55:03 -06:00
Austin Mroz 8ffcde28b2 Cache video formats
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.
2025-02-13 17:38:00 -06:00
Austin Mroz e8ad2a851d Cleanup Format Widget js
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.
2025-02-13 16:36:43 -06:00
Austin Mroz 0963fa917f Part 2 of format migration
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
2025-02-13 16:02:09 -06:00
Austin Mroz 8629188458 folder_paths fixes
Fix misnamed variable for external formats.

Properly set extension when extra model paths are specified.

Don't append extension name.

See #379
2025-02-08 02:09:16 -06:00
Austin Mroz 3bfbd99ffc Fix options lookup when extra_pnginfo is None
Resolves #377
2025-02-07 03:02:50 -06:00