Bizarrely, setting the prototype for onDrawForeground was resulting in
the onDrawForeground function getting clobbered if another extension
(such as Jovimetrix) adds a function to onDrawForeground, even if
the standard wrapping procedures was done. This patch fixes both this
incompatibility, and the callback being applied multiple times for each
node created
Previously, the title attribute was used to link a selected widget to
the correct spot in the documentation, but this had the side effect of
causing a tooltip to appear when the documentation itself was moused
over. Since this tooltip would block the documentation text itself and
provide no useful information to the user, this lookup information is
now stored as vhs_title attribute
If the description doesn't have any children elements when interpreted
as html, it is assumed to be plaintext and has some basic formatting
applied. New lines are replaced with a <br> tag so they function as
expected and the first line is used as a short description for the node,
which shows when the title is moused over, or when selecting the node in
the search box.
If desired, this could be expanded to apply simple markdown formatting
such as lists or titles.
To better facilitate working with audio, videos previews were changed to
unmute when moused over, but it has been requested multiple times that
an option be added to have the previews remain muted. This is now added
in two forms: A UI setting like Advanced Previews to have new previews
default to muted on creation, and a Right Click option to toggle the
mute state on individual previews.
A helper function has been added to assist in adding images to
documentation
A preceding forward slash is required when using the new ComfyUI
frontend. Since this was missing from the call to fetch files for path
widgets, they weer not functioning as expected.
Add check for null when pulling short description
Split the test description into multiple lines to clean up diffs
Stop decreasing size after an arbitrary depth
Include example of documenting widget values
In the new frontend, the DESCRIPTION field is being used for
standardized basic documentation. To keep the more advanced features
of this branch, a short human readable description can now be
derived from the full description. After initial load, the description
field is replaced from this shorter description.
Rather than adjusting font size, a transformation is applied to the div
itself, preventing reflow on zoom
The expand/collapse button is now only clickable on the text itself
Basic styling has been applied to the scrollbar when needed
When loading a workflow from before when VHS_AUDIO was swapped for
AUDIO, the input type of VideoCombine nodes would be set to VHS_AUDIO
despite this being invalid. This has now been fixed.
See #254
With the change to AUDIO, an error is now raised when audio doesn't
exist but an audio connection is used. This is necessary to ensure
correct error handling with nodes outside VHS. However, this
inconveniences those who always connect the audio input directly to
video combine. To resolve this, Video Combine now catches the thrown
error and skips embedding audio if needed.
Resolves#258
Nodes with a DESCRIPTION variable have that variable displayed as raw
html. A documentation file has been added to assist in
mocking documentation in a standardized format.
Logic to allow connecting node interaction to equivalent documentation
is partial. Currently, the hovered item is highlighted, but the intent
is to either automatically scroll to the selected region, or collapse
other regions.
By default, If an uploaded file has the same name as an already existing
file, a number is appended to the end and the new name is returned by
the endpoint. When this occurs, modified filename is now properly added
to the filelist and swapped to.
DeepFuze overrides onExecuted on every node, doesn't chain existing
callbacks, and raises an exception if the node doesn't have the expected
audio variables.
In order to prevent loading order shenanigans. This has been by fixed by
wrapping the function to not apply on VHS namespaced nodes.
See #242
cg-use-everywhere automatically creates links when when a graph is
executed. This is generally nice utility, but conflicts with the
paradigm of the new VAE inputs and is particularly problematic for Load
Video (where it can not be solved on the python side).
As a workaround, a wrapper is added around the graphToPrompt call that
cg-use-everywhere wraps which deletes any links from LoadVideo nodes
that do not actually exist.
Some external nodes have adopted the usage of VHS_AUDIO for user
convenience. If these nodes do not update, then a AudiotoVHSAudio node
must be added to perform the conversion. The code to check pulls up the
nodeDef and will not warn on old workflows if the target node has been
updated.
The conversion node is not automatically added. While this may be
feasible, I feel it would be overly destructive, error prone, and would
require logic for where to fit the conversion node into a workflow
visually. A gentle warning seems the safer option.
When an old workflow is loaded with converted widgets, those converted
widgets can take the vae slot and convert the image input to a latent
input. An explicit check is added to make sure the slot that is
connected has type VAE to fix these converted workflows.
Frame rate is now passed so image_sequqnces play back at proper rate.
Context menu options on an image sequence (open preview, save) now
operate on the first frame instead of throwing an error.
ComfyUI does type validation that I by stoke of luck, completely missed
while working on implementation. As a work around, load video and video
combine have an extra input/outpu of the latent type that is hidden and
links are modified to point use those on serialization.
The logic for when links should be maintained has been improved.
latent links seem to always be broken on reload, likely because the link
type is incorrect at link creation time. Further investigation needed
Adds an optional vae input to Load Video and Video Combine. When this is
connected, the node is dynamically updated such that Load Video instead
has a latent output and Video combine instead has a latent input.
When loading graph data, the "name" field on inputs is overwritten to
the name data saved in the workflow. As old workflows utilizing these
meta batches have the old batch_manager name, the input is loaded to
it's old name which would cause an error on execution.
Instead, quick javascript code has been added to manually force the
update of these inputs.
stdin is always flushed before yeilding. While this loses some potential
speedup by processing video output on cpu while the gpu is processing
the next batch of frames, it is likely incompatible with errors related
to metadata which could not be replicated. For now, stdin is flushed to
reduce the likelihood of regression.
Fixed a mistaken ordering in the batch_manager node causing the
unique_id to be overwritten.
Re-add the dummy count value to the batch manager node in js. Without
it, an error during the first batch step will result in teh batch
manager node not being marked as stale. Since the batch_manager node
exists only as an optional input, IS_CHANGED will never be called and
there must be some external change to ensure it is still marked stale
Processing video can have prohibitively high memory requirements.
This commit introduces a system for dividing the processing of a video
input into multiple workflow executions.
To accomplish this, the reference to the cv2 video_capture instance, and
the ffmpeg subprocess are kept open and the workflow is automatically
re-executed for each partial step.
Previously, Load Video (Upload) and Load Images (Upload) would swap to
the new file or folder, but would not update the preview. They have both
been fixed.
In switching to video previews to use DOMWidgets, the performance
optimization to hide elements when zoomed out was left enabled by
default. This hiding has been disabled to restore prior functionality.
Load Video and Load Audio both function with inputs not officially
listed as supported. Load Video can be used to load image files as a
substitute for Load Image and Load Audio can be passed video files.
While users have always had the option to manually type the path to a
filetype not ostensibly supported, this can be inconvenient.
A hotkey (Ctrl+g) has been added to temporarily disable the extension
filtering.
Migrates preview widgets to use the ComfyUI DOMWidgets implementation.
This resolves a number of issues with flickering, adds support for DOM
element clipping, and should have better compatibility with future
updates.
resolves#128
Fixes to logic for determining when the aspect ratio of a video preview
has changed.
Previously, any change to force_size, custom_width, or custom_height
would cause the video preview to reload. This has been changed to only
reload the preview if a change of values has occurred that could change
the aspect ratio.
Before, custom_width and custom_height widgets were virtual widgets that
were used to generate an equivalent force_size value on serialization.
This logic has been moved to the python side, but is largely unchanged
for simplicity.
This allows for custom_width and custom_height to be converted to an
input and set by output from python code which is not known before
execution.
resolves#119
After substantial rewriting, paths are declared as strings in the python
code, and converted to path widgets in the webui if they include an
option for vhs_path_extensions. resolves#104
VALIDATE_INPUT and IS_CHANGED for path nodes were rewritten and largely
consolidated in utils to accommodate validation of inputs not known before
execution.
Known issue: VALIDATE_INPUT is never called for load_audio which results
in error messages that aren't very helpful if a bad path is provided
An error is no longer immediately raised if ffmpeg is not found
Internal paths are now absolute for load images advanced previews