Commit Graph
219 Commits
Author SHA1 Message Date
FizzleDorf 909219134f added missing line 2023-11-02 00:16:32 -04:00
Austin Mroz 08ab4d371e Attempt to unclobber widget state during migration 2023-11-01 16:31:45 -05:00
Austin Mroz 7aa6d195e1 Improved node state migration code 2023-11-01 15:12:44 -05:00
FizzleDorf b668935c45 exposed crf value for user input 2023-10-31 21:55:35 -04:00
kijai 1ed87206f4 Update nodes.py 2023-10-31 20:08:06 +02:00
Austin Mroz fd646a3594 Account for browser zoom in preview elements 2023-10-31 12:18:23 -05:00
Austin Mroz 3c27b297c7 Prevent display of null preview 2023-10-31 10:36:14 -05:00
kijai 3b51d43ad8 Update nodes.py 2023-10-31 09:59:44 +02:00
Jedrzej Kosinski 6ca861ac98 Merge pull request #46 from Kosinkadink/js_cleanup
JS rewrite (round 2)
2023-10-30 18:25:48 -05:00
Austin Mroz df8fae06dd Dedicated state migration code for Load Images 2023-10-30 16:30:49 -05:00
Austin Mroz d4eb68dd56 Discard legacy preview information
The old preview method stored the url instead of the params.
This makes it non trivial to parse whether it was to an image or video.
For safety, this information is instead discarded.
2023-10-30 15:36:14 -05:00
Austin Mroz 12f3471d0d Fxi no preview on old Video Combine node 2023-10-30 14:22:46 -05:00
Austin Mroz 3802889372 ReMerge branch 'js_cleanup' with fixes 2023-10-30 12:37:59 -05:00
Austin Mroz d87f1ab473 Show correct output preview on history load
Minor fix to not try and load a non-existent preview

Reduce obtrusiveness of likely resolved error path
2023-10-30 12:24:08 -05:00
kijai 3a997bef0d seems necessary with PIL for counter to work...?
dunno why, ffmpeg saving with counter works without underscore
2023-10-30 16:59:38 +02:00
kijai 44e5d13fc6 Update nodes.py 2023-10-30 16:14:12 +02:00
Austin Mroz 5bcf3ee3b3 computeSize fix, improve pause/hide state.
computeSize now calculates directly from the nodes width instead of
saving the width from the last draw operation. This fixes a race
condition when a video loads before the draw frame occurs.

the paused and hidden state of a preview widget are now serialized as
part of the vlaue. This means they survive reload or restoring a
workflow. Addionally, videos are paused before being hidden to improve
performance on some browsers.
2023-10-29 23:17:48 -05:00
Austin Mroz 0447a5a9b0 Fix mouse stuck down on file upload
A frustrating amount of digging with an awfully simple solution.
The current selected widget for mouse events is held in
app.canvas.node_widget.and clearing it prevents the continued
propagation of move events to parent widgets.

Also provides a minor fix for canceled file uploads
2023-10-29 21:55:58 -05:00
Austin Mroz 553167e86b Ensure height is always a number greater than 0 2023-10-29 15:40:27 -05:00
Jedrzej Kosinski 009ccfc4b4 Merge pull request #44 from Kosinkadink/revert-36-js_cleanup
Revert "JS rewrite" until workflow bug is fixed
2023-10-29 14:46:49 -05:00
Jedrzej Kosinski 89677ae3d9 Revert "JS rewrite" 2023-10-29 14:46:00 -05:00
Jedrzej Kosinski 0a43770fab Merge pull request #36 from Kosinkadink/js_cleanup (JS rewrite by AustinMroz)
JS rewrite
2023-10-29 14:04:27 -05:00
Austin Mroz a99173e545 Fix attempts to serialize nodes with no widgets 2023-10-28 16:23:25 -05:00
Austin Mroz bc1e70d3b2 Store preview params in value
This allows for previews to be restored for Video Combine on reload
setPreviewsrc is left as a convenience function
2023-10-28 15:49:19 -05:00
Austin Mroz 2fb3787cc3 Fix migration when preview exists on Video Combine 2023-10-28 15:37:00 -05:00
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