355 Commits
Author SHA1 Message Date
Austin Mroz 9ba3fd0e0f Fix no-js warning, crash on duplicate install 2026-03-17 09:14:20 -07:00
silveroxides c67ff3ef37 Fix for improper metadata saving which caused errors during playback with video players lile mpc-hc 2026-01-10 15:26:37 -08:00
Austin Mroz 537f3a0226 Fix latent previews on older versions 2025-11-27 09:58:49 -08:00
Austin Mroz b9cc3f23aa Merge batch manager fix 2025-11-26 09:32:31 -08:00
Austin Mroz 2571e60a1c Hopefully fix flux2 latent previews 2025-11-26 09:20:57 -08:00
patientx ae85dc37e6 Enhance requeue functions for ComfyUI version compatibility
Updated requeue_workflow_unchecked and requeue_workflow functions to handle both old and new ComfyUI versions with 5 and 6 value tuples.
2025-11-25 01:15:40 +03:00
应元东 8923bd836b fix ffv1 color/alpha shift (#581)
* Add 'gbra' to alpha channel regex check

* Add input color depth 16bit option to ffv1-mkv.json

* use rgba64le by default in ffv1-mkv.json
2025-11-02 23:28:40 -08:00
ed lane 8550981384 Fix video duration calculation in ffmpeg_frame_generator
Changed hours-to-seconds multiplier from 360 to 3600 when parsing
Duration timestamp. This fixes incorrect duration values for videos.
2025-10-27 08:59:46 -07:00
neflow 08e8df15db Pass frame_rate to gifski -r. 2025-09-28 22:06:44 -07:00
Austin Mroz 0edce8ef7c Add safety check for existance to server endpoints 2025-09-17 18:19:01 -07:00
Austin Mroz dabda5423a Add preview to LoadAudio nodes
Resolves #541
2025-09-07 20:11:47 -07:00
Austin Mroz 7e9bea5336 Fix unclosed file handle
The query video endpoint failed to container after completion. This has
been fixed.

Resolves #526
2025-08-07 08:51:49 -05:00
Austin Mroz c017071cc3 Wan22 vae rate info, frontend fixes
Added rate information for the Wan22 vae. This is only used for the 5b
model and the only change is a slight reduction in the preview rate.

Fixed being unable to quickly update multiple frontend widget values
with tab.

Fixed an incorrect default modulus for which forced inconvenient
dimensions for the Load Image node.
2025-08-07 08:40:00 -05:00
Austin Mroz 330bce6c3c Fix misplaced gifski audio workaround
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
2025-07-28 01:22:38 -05:00
Austin Mroz 9601d8792e Add bgra as known pixfmt with alpha
Quick workaround for improved compatibility with ffv1
2025-07-26 15:53:25 -05:00
Austin Mroz 97a57e38a8 Round tensors when converting to int
This has been long considered. Special thanks to Mel for providing
additional insight.
2025-07-26 15:49:56 -05:00
Austin Mroz 285568f530 Use libvpx-vp9 for main decode too
An extra pass was added to the ffmpeg_frame_generation code to properly
detect and handle alpha when loading vp9 videos. This early commit
allowed for correct detection, but then failed to apply the decoder to
the main pass, so no alpha was output. This has been fixed.
2025-07-26 15:38:20 -05:00
Austin Mroz be11f43838 Remove global vpx codec context
Since codec contexts have state, reusing them is dangerous.
2025-07-26 15:24:34 -05:00
Austin Mroz f01332d42c Fix animated latent previews
Resolves #516

This functions so long as multiple nodes aren't providing latent
previews at once. I will need to take time to consider if such
functionality would even be desirable.

Does not resolve subgraphs. Graph traversal functions don't appear to be
exposed, so I'll most likely need to re-implement myself, but I need to
take the time to exhaustively verify first.
2025-07-26 01:38:31 -05:00
Austin Mroz 3b2fb5f518 Fix incorrect time base in query video 2025-07-24 22:45:24 -05:00
Austin Mroz 8b62aa458d Ignore audio for gifski output format.
Gifs do not support audio. Rather than crashing, VHS will now ignore any
audio input when outputting to the gifski format. Thanks Mel.
2025-07-24 20:44:21 -05:00
Austin Mroz 7a50ec7ec8 Use PyAV for querrying videos, Round frame est
Prior ffmpeg implementation provided insufficient precision for frame
estimation and was heavier than desired. Regexes are no longer used

Round frame_rate annotation to at most 2 digits
2025-07-23 02:54:49 -05:00
Austin Mroz 266f27aeba Support loading transparent VP9
Resolves #502
2025-07-13 20:03:35 -05:00
Austin Mroz dc98c8be65 Fix hashing nonexistant files, widget rounding
Some nodes "hash" (actually just mtime) input files to determine if
re-execution is needed. A check has been added to not attempt this
hashing if no file exists.

Fix an incorrect bounds check in the newer frontend widget code.
2025-06-22 17:16:31 -05:00
Austin Mroz 66e443b583 Add duration output to LoadAudio nodes.
Resolves #488

Commit to bumping minor version with next update as this change
introduces a new output.
2025-06-12 12:08:36 -05:00
Austin Mroz d7c47abc5e Use 204 for most failed server requests
Previously, detailed response codes were used to indicate what went
wrong on a failed server request. However, this produces un catchable
error messages which are undesirable. Instead, these responses now use
204 to indicate that the request was successfully processed, but returned
no content.
2025-06-02 21:57:48 -05:00
Austin Mroz 2ab65b9c4c Cleanup timestamp widget conversion code 2025-05-21 16:15:56 -05:00
Austin Mroz c953e12408 Cleanup optional arguments on Load Audio nodes
duration, start_time, and the equivalent seek_seconds are now all marked
as optional inputs and properly set to have default values.
2025-05-21 15:39:08 -05:00
Austin Mroz 38fbe354b1 Update num_frames when pingpong is applied
Closes #467
2025-05-06 17:23:59 -05:00
Austin Mroz 001a508cb5 Allow drag drop on upload nodes.
Fix out of date IS_CHANGED methods for Load Audio nodes

fix incorrect parens in preview code. The string "0" is truthy.
2025-05-06 16:43:14 -05:00
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 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 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
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
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
Kaur Kuut b34d3ba46b Add color space metadata to ffmpeg input. 2025-04-01 16:02:32 +03:00
Austin Mroz bbac2480f7 Add lossless toggle to image/webp output format
Resolves #425
2025-03-19 08:56:26 -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 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
niboshi 2cf03c6ac0 Fix color degradation in ffmpeg frame generator 2025-03-14 04:40:28 +09: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
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