Commit Graph
598 Commits
Author SHA1 Message Date
Austin Mroz 0c0288f9b5 Add duration option to Load Audio (Path)
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.
2025-04-14 02:32:54 -05:00
Austin Mroz e49fed4585 Variable length format arguements. ProRes fixes
Co-authored-by: Kaur Kuut <strom@nevermore.ee>

A single item list is now mapped as a template string later flattened to a
variable number of arguments. This handles the case of both no and
multiple arguments

Apply required ProRes fixes from xStrom. While the delays were
unfortunate, these changes should handle any future edge cases and
retains support for older workflows using the numbered ProRes profiles

Closes #451
2025-04-13 02:26:26 -05:00
Austin Mroz 053e2beb1d Rework and expand video_format capabilities
Introduces two new dynamic arguments which do not generate new widgets
- ["string"]: string is evaluated as template string with kwargs for
  values. This allows an argument to reference multiple widgets and
  allows multiple arguments to reference a widget
- ["kwarg_key", {}]: This allows for verbose translating of a limited
  set of values.
  - Multiple dicts can be nested and reference different kwargs

Adds an extra_widgets field to video_formats for widgets do nothing
unless referenced by one of the two new argument types.

Pass has_alpha as a kwarg for reference with the new argument types
2025-04-10 00:58:39 -05:00
Austin Mroz 87f73c7dbb Fix misplaced parens
Resolves #460
2025-04-09 13:03:24 -05:00
Austin Mroz 136fc6abde Merge nvenc-av1, pixfmt, prepass fixes 2025-04-08 01:05:27 -05:00
Austin Mroz 82f62dcbf4 Support audio in unbatch node 2025-04-06 11:15:25 -05:00
Kaur Kuut a11bcf4a08 Use correct p010le pixel format with NVENC. 2025-04-06 15:49:15 +03:00
Kaur Kuut 17ad06aa25 Add NVENC AV1 format. 2025-04-06 15:25:09 +03:00
Kaur Kuut 4980590ac1 Fix pre_pass and inputs_main_pass args index. 2025-04-06 14:41:41 +03:00
Austin Mroz df55f01d1d Float rounding fixes
Backend preview code will now accept floats and convert or truncate as
needed.

Fix updateParameter callbacks using out of date, unbounded values
2025-04-05 04:11:07 -05:00
AustinMroz 7236c5dff0 Merge 1.5.17 2025-04-03 01:46:54 -05:00
Austin Mroz 2fb06b1634 Merge explicit Metadata, gifski fixes. 2025-04-03 01:45:21 -05:00
Kaur Kuut d1733bb518 Add explicit color space metadata for FFmpeg 4.2 output. 2025-04-03 00:30:23 +03:00
Kaur Kuut a0312ec4c2 Increase the quality of the YUV4MPEG2 pipe stream to Gifski. 2025-04-02 23:47:45 +03:00
Austin Mroz b9366c11bc Swap color range from full to pc, formats
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.
2025-04-02 14:32:08 -05:00
AustinMroz ab96cf2608 Merge version 1.5.15 2025-04-02 11:47:31 -05:00
Austin Mroz f837d6ffdd Force gifski outputs to display as 'image/gif'
When preview data is sent to the fronted, a format field is sent back
to determine how it is displayed. Gifski and ffmpeg-gif formats use
video for the first term since they use the video_formats subsystem, but
this currently results in them being displayed in a <video> tag on the
frontend.

For now, any format using the gifski route has it's format hard coded to
be corrected to gif, but I'm considering a more thorough update in the
future which will use the video_formats subsystem for images as well and
provides a means for formats to them self specify output type.
2025-04-02 11:37:06 -05:00
Austin Mroz 20c4c5a40d Merge gifski resolution fix 2025-04-02 11:00:03 -05:00
Kaur Kuut ccbaf837ad Add support for high resolution gifski encodes. 2025-04-02 16:04:31 +03:00
Austin Mroz eeb794ab0d Merge colorspace, NVENC fixes. 2025-04-02 00:29:14 -05:00
Kaur Kuut d18ff47633 Remove broken rgba support from NVENC formats. 2025-04-02 00:46:12 +03:00
Kaur Kuut b34d3ba46b Add color space metadata to ffmpeg input. 2025-04-01 16:02:32 +03:00
Austin Mroz 972c87da57 Fix incorrect preview logic for gifs
Gifs were incorrectly being loaded by a video tag when advanced previews
was set to "Input Only" (the default). The logic for when advanced
previews are used as been clarified.

Resolves #435

Parameters that determine the output quality when advanced previews are
displayed have been moved to only be set when the request if for an
advanced preview. These were ignored when the request was made to the
default /view endpoint, but created undesirable clutter
2025-03-28 11:32:11 -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