Commit Graph
394 Commits
Author SHA1 Message Date
Jedrzej Kosinski 4664081a2a version bump 2024-08-07 16:46:07 -05:00
Jedrzej Kosinski 8b9df52180 Merge branch 'main' into node_documentation 2024-08-07 16:45:26 -05:00
Austin Mroz e4d7c30ac3 Merge minor outstanding changes 2024-08-07 14:58:30 -05:00
Austin Mroz 013473335a Fix clobbering of OnDrawForeground
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
2024-08-07 14:49:46 -05:00
Austin Mroz 5aa08cb61b Remove when hovering in the documentation window
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
2024-08-07 13:32:14 -05:00
Austin Mroz 0e0bcc72f8 Add simple description formatting if plaintext.
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.
2024-08-07 13:23:51 -05:00
Austin Mroz e667990015 Add toggles for muting video previews
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.
2024-08-06 21:46:15 -05:00
Austin Mroz 8e774e44ce Add image function for documenation, fix path api
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.
2024-08-06 21:30:24 -05:00
Jedrzej Kosinski 9e841a5b88 version bump 2024-08-06 17:35:47 -05:00
Jedrzej Kosinski bd077e42b6 Merge pull request #262 from ComfyNodePRs/licence-update
Update PyProject Toml - License
2024-08-06 17:21:38 -05:00
Austin Mroz 12b9f8d00f Formatting, minor fixes
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
2024-08-05 15:19:23 -05:00
Austin Mroz 8a564019ef After load, use human readable description.
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.
2024-08-05 14:50:21 -05:00
Austin Mroz 3dc15c4507 Refactor for code sharing
Wrap computeSize so that the question mark doesn't overlap with the
node title
2024-08-04 04:01:20 -05:00
Austin Mroz 3489bccd20 Fix text reflow, collapse size, scrollbar
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
2024-08-04 02:23:00 -05:00
Austin Mroz bb7186aae4 Fixes to Meta Batch counts
The logic for determining how many subexecutions would be performed by a
Meta Batch was insufficient for all but the most narrow of cases and has
been reworked

As part of these changes, a progress bar is now displayed for Load Video
even when frame_load_cap is unset
2024-08-03 14:18:20 -05:00
snomiao b253112553 chore(licence-update): Update PyProject Toml - License 2024-08-02 23:03:35 +00:00
Austin Mroz 8f8df32db1 Add additional format options for transparency
Updated ProRes to allow transparent output when set to Profile 4. As
part of this change, pix_fmt is no longer explicitly set for ProRes, but
the expected format is automatically applied from for each profile.

Added rgba as an output pix_fmt for the nvenc formats. These have not
been tested and may not function.

Fix incorrect escape in Advanced Preview code.
2024-07-31 02:19:27 -05:00
Austin Mroz fc328d88ce Additional fix for loading API workflows 2024-07-30 14:36:52 -05:00
Austin Mroz 7c313fd9fb Merge ytdl_support, audio QOL 2024-07-30 02:36:13 -05:00
Austin Mroz 9405e803c2 Forcibly restore input type, test audio exists
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
2024-07-30 02:17:27 -05:00
Austin Mroz 990e6e2448 Fix loading of API workflows 2024-07-30 01:40:39 -05:00
Austin Mroz 3a906cfe8f Close help if the node is removed 2024-07-26 19:31:50 -05:00
Austin Mroz a0f616cbef Implement collapsing
Adjust offset when selecting inputs
2024-07-26 16:12:18 -05:00
Austin Mroz 1e9f7e7257 POC node documentation implementation.
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.
2024-07-26 01:30:34 -05:00
Austin Mroz d6ac0b999b After upload, use name provided by upload endpoint
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.
2024-07-18 03:12:55 -05:00
Austin Mroz e1c4e939ec Workaround for DeepFuze overriding onExecuted
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
2024-07-15 14:58:45 -05:00
Jedrzej Kosinski 70faa9bcef Merge PR #251 from Kosinkadink/batch-operations
Select Nodes for Latent/Images/Masks
2024-07-11 22:08:51 -05:00
Jedrzej Kosinski 7b934a81c7 version bump 2024-07-11 22:00:48 -05:00
Jedrzej Kosinski 623a603ed3 Modified almost all other latent nodes besides Merge Latents to handle other tensor properties on latents dict besides just "samples"; Merge Latents will require some work to do properly for other props that may not exist on all latents that are passed in 2024-07-11 21:59:49 -05:00
Jedrzej Kosinski 3b7492d023 Added Select Latents/Images/Masks nodes, renamed some nodes to remove Batch from names, renamed Duplicate nodes to Repeat 2024-07-11 21:34:53 -05:00
Austin Mroz d6cf89c501 Clean up get_audio try/catch
The prior implementation made a best effort to continue in the event of
an error, but immediately threw an error afterwards since there was no
output from the subprocess.

As get_audio isn't called until the audio connection from a Load Video
is used, it's safe to raise an exception here and properly expose the
error message from ffmpeg as is done elsewhere.

See #250
2024-07-11 11:03:32 -05:00
Austin Mroz bd5381ec8f Add safety check to VHS_AUDIO link check
Add safety check that the connected node has a nodeDef.
See #249
2024-07-10 13:04:40 -05:00
Austin Mroz b5d907bade WIP preview synchronization 2024-07-10 12:57:06 -05:00
Austin Mroz 8c50452255 Skip download attempt when yt-dl unavailable 2024-07-09 17:07:00 -05:00
Austin Mroz 48edad3aea Fix missing is_url imports 2024-07-09 13:30:39 -05:00
Austin Mroz 4838634372 Add support for downloading urls with yd-dl
Executable preference is
VHS_YTDL environment variable > yt-dlp > youtube-dl

Downloaded videos are cached in temp so they are not preserved between
reboots

Both Load Video (Path) and Load Audio (Path) are supported
2024-07-09 13:10:56 -05:00
Austin Mroz ce5d0a7548 Fix dragging and scrolling on previews 2024-07-09 11:35:03 -05:00
Austin Mroz 29fae7510f Fix Audio to VHS_Audio, add VHS_Audio to Audio 2024-07-06 11:27:00 -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 e23ec8befd Unmute video on mouseover
Video previews unmute when moused over.

Advanced previews now have audio included when encoded.

Fixed yet another bug with custom_size on Load Video
2024-07-05 18:28:57 -05:00
Austin Mroz c7b1dc7328 Log current meta batch step to terminal
I was mistaken. This is actually quite easy and provides decent qol
2024-07-02 01:15:55 -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 3258f3cac5 Add temporary workaround for cg-use-everywhereo
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.
2024-06-30 01:10:25 -05:00
Austin Mroz 0be3bc0597 Additional fixes for unreadable memory_limit
The safety code to ignore the memory limit when it could not be
calculated was incorrectly applied after adding the vae changes.

They have been reapplied. See #240
2024-06-30 01:10:08 -05:00
Austin Mroz ad3b48fe89 Warn user of nodes using legacy VHS_AUDIO
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.
2024-06-29 12:55:37 -05:00
Austin Mroz d37b823faa Parse channels and sample rate from source audio 2024-06-29 04:01:50 -05:00
Austin Mroz 6bc099aad8 Add node to convert to Legacy VHS_AUDIO 2024-06-29 03:42:00 -05:00
Austin Mroz a19a4abe3a Migrate Audio from VHS_AUDIO to comfy's AUDIO
Known issues:
- need legacy node to convert from AUDIO to VHS_AUDIO
 - add js to automate adding said node to workflows?
- need to parse number of channels when loading audio
2024-06-29 03:07:48 -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 7649d51505 Add fallback when vae and images is received
Under unknown circumstances, the VAE input may be non-None even though
there is not actually a wire connected. In this circumstance, images are
still received as input and would throw an error when converted from a
dict to tensor. To resolve this, an extra check is added to make sure
images is a dict and, if not, the VAE input is overridden to None

Resolves #238
2024-06-28 00:23:52 -05:00