Commit Graph
144 Commits
Author SHA1 Message Date
Austin Mroz d51cb7c7a9 Fix preview on node-add, consistent naming
When a Load Video node is added, the default video selection is now
properly displayed with a preview.

Context menu options now consistently use preview instead of video as
the actions apply to animated images as well.
2023-10-28 15:24:59 -05:00
Austin Mroz 68b66e7e3e Add missing formatDate code
Disable code for non-existent VHS_SaveImageSequence
2023-10-28 15:13:13 -05:00
Austin Mroz 633351c64f Fix file uploads 2023-10-28 14:46:26 -05:00
Austin Mroz 4db66a807d Properly clear previews of nodes moved off screen.
With the preview element no longer named as inputEl, the pertinent code
that would hide the element when off screen no longer applied.

This is fixed and has the added benefit of preventing dangling
video elements even when a multiline widget has not yet injected it's
own fix.
2023-10-26 20:01:06 -05:00
Austin Mroz b8d629248e Add migratory code to prevent need for remove/add
While the new KV state storage should prevent the need for this in the
future and there's a degree of error checking, it would be particularly
poor optics for the system to break all existing workflows on release.

This adds a couple of migratory functions that carefully check and
manage the transitions for the two nodes that break.
2023-10-26 19:29:59 -05:00
Austin Mroz 3a6b9fb5c7 Fix node removal cleanup, hide unsupported preview
The onRemoved code for the preview widget wasn't actually firing, so the
callback has been moved to the node.onRemoved.

The file-input's created for nodes that support uploading were never
removed and have been corrected by the same method.

When a video is generated that can not be displayed in browser
(those using the h265 codec), the preview is now hidden

The 'video' field of Load Video (Upload) is now properly initialized
2023-10-26 18:20:48 -05:00
Austin Mroz f80d6a2dde Preview options at top, comfy error dialogs
Context menu options for video previews have been moved to the top of
the list.

When a node fails to load the nicer comfy error dialog is used.
Errors on file upload still use alert, but this is equivalent to the
native comfy code.

Video previews are muted.

The image preview element is hidden by default.
2023-10-25 15:24:08 -05:00
Austin Mroz 121da143c5 Merge branch 'main' into js_cleanup
Mostly trivial. Just a minor change to resolve the
selected video to a url in Load Video (Upload)
2023-10-24 17:09:10 -05:00
Austin Mroz 0b3b482d66 Add Open/Save Video, mark dirty on resize
Open and Save Video buttons have been added to the context menu.
This brings parity with the functionality of the Save Image node,
and restores functionality that was removed with passing through clicks
on the video preview element.

When a resize is done on a node, it is marked dirty.
This fixes a minor delay between preview content displaying
and the underlying node performing it's resize
2023-10-24 12:20:41 -05:00
Austin Mroz b609407849 Improved preview support
Implement animated image previews
add control options to context menu:
- Hide/Show
- Pause/Resume
- Sync
2023-10-23 23:19:07 -05:00
Austin Mroz 44674091e5 Reimplement video previews, kv state serialization
The reimplementation for video previews is functional and adds base
support for previews in load video (upload)

State serialization for nodes (what's used when a workflow is loaded or
the webpage is refreshed) now uses a map with widget names as keys for
all VHS nodes.
2023-10-23 00:04:19 -05:00
Jedrzej Kosinski e802e226ba Merge pull request #33 from Kosinkadink/develop
Reverted changes from one of the PRs, will slowly add back piece by piece
2023-10-21 12:25:40 -05:00
Jedrzej Kosinski 639b6ea247 Fixed git_preview.js to use 4 spaces instead of 2 in code 2023-10-21 12:24:48 -05:00
Jedrzej Kosinski e66a5b0a36 Add back code that got reverted erroneously, thank you git 2023-10-21 12:14:46 -05:00
Jedrzej Kosinski ba09ebafc3 More revert merge conflicts fixed
I think this leaves the gif sync fix in? Will double check after full revert complete
2023-10-21 12:04:39 -05:00
Jedrzej Kosinski 6965182f5d Reversion (had merge conflict) 2023-10-21 11:46:40 -05:00
Jedrzej Kosinski 44cd01673c Revert "Merge pull request #21 from kijai/main"
This reverts commit b2c4b4a5ac, reversing
changes made to f032b046af.
2023-10-21 11:39:32 -05:00
Jedrzej Kosinski 0046f478e8 Revert "Reordered nodes, updated names, added temp workaround for get_ffmpeg_exe bug, clarified Video Info outputs"
This reverts commit 72340a31d2.
2023-10-21 11:39:30 -05:00
Jedrzej Kosinski 91c8176a05 Revert "Fix video autoplay..."
This reverts commit 18f15ef6ca.
2023-10-21 11:39:27 -05:00
Jedrzej Kosinski dfc32c979a Revert "Update gif_preview.js"
This reverts commit f705532da5.
2023-10-21 11:39:24 -05:00
Jedrzej Kosinski 25d948b431 Revert "Merge pull request #28 from kijai/main"
This reverts commit a5c5556f8d, reversing
changes made to 72340a31d2.
2023-10-21 11:39:21 -05:00
Jedrzej Kosinski 8215e97955 Revert "Fixed ID of Load Video (Upload) node getting screwed up in PR"
This reverts commit 9e834b4f58.
2023-10-21 11:39:18 -05:00
Jedrzej Kosinski 8bf54f25fa Revert "fixed Load Video (Upload) ID mismatch for name"
This reverts commit fb1879aca6.
2023-10-21 11:39:15 -05:00
Jedrzej Kosinski 23c66488d1 Revert "fixed ID referenced in videoupload.js for VHS_LoadVideo"
This reverts commit ec297dc512.
2023-10-21 11:39:11 -05:00
Jedrzej Kosinski 9d88077c81 Revert "fixed frame_count outputs (broken by PR)"
This reverts commit 2d56167912.
2023-10-21 11:39:05 -05:00
Jedrzej Kosinski 3f983ef970 Revert "fixed Load Video (Upload)"
This reverts commit 11ad341025.
2023-10-21 11:38:59 -05:00
Jedrzej Kosinski 50c4866c12 Revert "Merge pull request #30 from kijai/main"
This reverts commit d38405807c, reversing
changes made to 11ad341025.
2023-10-21 11:38:45 -05:00
Jedrzej Kosinski 0c6af481eb Revert "Fixed dragging upload always putting file into subdirectory, rearranged (and temporarily removed) pil fallback"
This reverts commit 15f545efe2.
2023-10-21 11:38:25 -05:00
Jedrzej Kosinski 15f545efe2 Fixed dragging upload always putting file into subdirectory, rearranged (and temporarily removed) pil fallback 2023-10-20 23:26:37 -05:00
Austin Mroz c3ae8f2ec9 Work in progress rewrite of JS code
Includes code for uploads, customsize, dateformatting,
forcing timestamps, and hiding the useless GIF output of the combine
video node, but lacks the video preview code and testing.
2023-10-20 12:50:32 -05:00
Jedrzej Kosinski d38405807c Merge pull request #30 from kijai/main
Update gif_preview.js
2023-10-20 10:54:47 -05:00
kijai c61bcaf2a4 Update gif_preview.js
This prevented autoplay from working now...
2023-10-20 18:40:12 +03:00
Jedrzej Kosinski 11ad341025 fixed Load Video (Upload) 2023-10-20 10:34:11 -05:00
Jedrzej Kosinski 2d56167912 fixed frame_count outputs (broken by PR) 2023-10-20 10:02:54 -05:00
Jedrzej Kosinski ec297dc512 fixed ID referenced in videoupload.js for VHS_LoadVideo 2023-10-20 09:31:07 -05:00
Jedrzej Kosinski fb1879aca6 fixed Load Video (Upload) ID mismatch for name 2023-10-20 09:21:09 -05:00
Jedrzej Kosinski 9e834b4f58 Fixed ID of Load Video (Upload) node getting screwed up in PR 2023-10-20 09:16:17 -05:00
Jedrzej Kosinski a5c5556f8d Merge pull request #28 from kijai/main
Fix video autoplay...
2023-10-20 07:38:42 -05:00
kijai f705532da5 Update gif_preview.js 2023-10-20 15:38:33 +03:00
kijai 18f15ef6ca Fix video autoplay...
Video element never calls the onload function, I didn't figure out why... so just moved it out of it to restore functionality.
2023-10-20 15:30:04 +03:00
Jedrzej Kosinski 72340a31d2 Reordered nodes, updated names, added temp workaround for get_ffmpeg_exe bug, clarified Video Info outputs 2023-10-20 04:57:25 -05:00
Jedrzej Kosinski b2c4b4a5ac Merge pull request #21 from kijai/main
Sync gifs too
2023-10-20 04:53:16 -05:00
kijai fda9ffd0df Merge remote-tracking branch 'upstream/main' 2023-10-20 12:50:44 +03:00
Jedrzej Kosinski f032b046af Merge pull request #25 from JaredTherriault/main
UploadVideo, gif preview autoplay fix, VideoInfo out from LoadVideo, …
2023-10-20 04:35:02 -05:00
JaredTherriault 9306e62e0a Restore VHS_LoadVideoPath and VHS_LoadVideoUpload, update to parity with VHS_UploadVideo
-Restore original name of 'VHS_LoadVideo' to 'VHS_LoadVideoPath'
-Restore LoadVideoUpload and bring its features up to parity with LoadVideoPath and UploadVideo
-Rename 'input' and 'effective' variables to 'original' and 'actual'
-Add guard clause for undefined video widget value
2023-10-17 19:49:01 -07:00
JaredTherriault ba7bc35390 UploadVideo, gif preview autoplay fix, VideoInfo out from LoadVideo, support webp, apng, mjpeg
-Add PIL fallback to LoadVideo to support video types not supported by opencv2, such as webp, apng, and mjpeg. Changing frame rate is not supported in this mode. The output log will inform you of this when the fallback is used.
-Removed VHS_LoadVideoUpload node
-Renamed VHS_LoadVideoPath to just VHS_LoadVideo
-Added a video_info output to LoadVideo which includes more information, such as the frame count, fps, duration and frame time for the input video and the output frames
-Added a new node UploadVideo which includes the functionality of LoadVideoUpload insofar as copying a video to the input folder but also allows the user to upload to temp instead for testing so as not to clutter the input folder. Uploaded videos now go to a subfolder, 'VHS_upload'.
-Added gif preview to UploadVideo so uploaded videos can be viewed on the node when selected.
-Fixed autoplay for gif preview on VideoCombine, still not working for videos on UploadVideo node.
-Added drag and drop for videos on UploadVideo node.
-Changed 'force_frame_rate' to 'desired_frame_rate' because it cannot be forced in PIL fallback, this is an effort to communicate this to the user
2023-10-16 21:31:32 -07:00
kijai 05cd93de4e Update gif_preview.js
make it select by id instead to not affect possible other elements
2023-10-12 19:18:10 +03:00
kijai a8470de02e Sync gifs too
gif elemenets weren't being reset with the sync button, made it reload all gifs for same effect
2023-10-12 19:02:31 +03:00
Jedrzej Kosinski 8f10981d32 Merge pull request #15 from kijai/main
Add preview video playback syncing
2023-10-12 05:41:11 -05:00
Jedrzej Kosinski 8cb7a57a95 Merge pull request #18 from Kosinkadink/develop
Merge multiple PRs (+ edits) into master
2023-10-12 05:39:32 -05:00