Commit Graph
47 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 136fc6abde Merge nvenc-av1, pixfmt, prepass fixes 2025-04-08 01:05:27 -05: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 2fb06b1634 Merge explicit Metadata, gifski fixes. 2025-04-03 01:45:21 -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 eeb794ab0d Merge colorspace, NVENC fixes. 2025-04-02 00:29:14 -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
Austin Mroz 546359d436 Add additional null check to audio link migration 2025-03-23 22:32:20 -05:00
Austin Mroz c338a1e572 Display frame rate annotation when force_rate is 0 2025-03-19 16:00:12 -05:00
Austin Mroz e44b3565c7 Allow dragging node from VHS preview widgets
See #414
2025-03-14 02:28:49 -05:00
Austin Mroz 28eb44c13c Pass mouse events for animated latent previews
Resolves #414
2025-03-11 14:45:59 -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 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 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 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 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 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
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 701f7e7c59 Prioritize builtin video_formats:
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
2025-02-07 01:08:20 -06:00
Austin Mroz 5d98b154a8 Restore the initial callback for Load Video
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.
2025-01-29 16:09:59 -06:00
Austin Mroz 48e7f70418 Add Input Only option for previews as new default
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.
2025-01-15 16:06:42 -06:00
Austin Mroz 17f25aec65 Merge fix_load_image_path
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
2025-01-03 14:31:34 -06:00
Austin Mroz cad87a17a3 Prevent error on load
See #347
2024-12-25 13:29:04 -06:00
Austin Mroz 9951b2447d Merge onto main, bump version 2024-12-21 12:44:37 -06:00
Austin Mroz 6953fa2144 Fixes to trimming, add to formats
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
2024-12-12 11:47:44 -06:00
Austin Mroz 82229859fe Initial support for converted format widgets
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.
2024-12-01 00:05:27 -06:00
Austin Mroz 9d608e7a6a Add tests, bump version
Add tests and the code to run them. This code is not run by default and
requires some manual installation.
2024-10-30 16:06:37 -05:00
Austin Mroz 0376e57744 Fix removal of Video Info output
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
2024-08-25 11:33:34 -05:00
Austin Mroz 0cdc93273e version bump, grammar, set experimental flag 2024-08-22 17:29:41 -05:00
Jedrzej Kosinski 5c7455a1c8 version bump 2024-08-11 23:47:35 -05:00
Austin Mroz 8140415680 Fix mistaken ffmpeg path.
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
2024-08-08 01:42:11 -05:00
Jedrzej Kosinski 4664081a2a version bump 2024-08-07 16:46:07 -05:00
Jedrzej Kosinski 9e841a5b88 version bump 2024-08-06 17:35:47 -05:00
snomiao b253112553 chore(licence-update): Update PyProject Toml - License 2024-08-02 23:03:35 +00:00
Austin Mroz 7c313fd9fb Merge ytdl_support, audio QOL 2024-07-30 02:36:13 -05:00
Jedrzej Kosinski 7b934a81c7 version bump 2024-07-11 22:00:48 -05:00
Austin Mroz 962e8e86ef Migrate from VHS_AUDIO to built-in AUDIO
Merge branch 'audio_format'
2024-07-05 18:38:53 -05:00
Austin Mroz 0037f49aee Add check for null in cg-use-everywhere workaround
Resolves #241
2024-06-30 23:02:54 -05:00
Austin Mroz 23d822c423 Add timestamps to image requests to prevent caching
Bump version
2024-06-29 03:02:13 -05:00
Austin Mroz aab731d702 Merge #220
The nodes are more Kosinkadink's area, but the changes are good and I
don't foresee them causing any issues

Bump version
2024-06-18 16:27:08 -05:00
Austin Mroz b70a173d5e Reduce console spam, ffmpeg_gif split filter
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.
2024-06-07 00:38:34 -05:00
Austin Mroz aad82e9cfe Revert in_place exif_transpose, f16 loads
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
2024-06-06 11:59:53 -05:00
Austin Mroz 1ab2027165 Merge branch 'develop'
Also bump version
2024-06-05 23:47:41 -05:00
Austin Mroz acbf789291 Workaround for audio with ffmpeg 7.0
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
2024-05-23 14:44:32 -05:00
Robin Huang 1c08dac5b7 Added publisher id. 2024-05-16 21:39:12 -07:00
Robin Huang 26381e923e Add pyproject.toml for Custom Node Registry. 2024-05-16 21:22:26 -07:00