Commit Graph

43 Commits

Author SHA1 Message Date
comfyanonymous
0cba25cd20 Load workflow from latent file. 2023-05-18 02:41:21 -04:00
Dr.Lt.Data
4c259c71e5 Clipspace Menu and MaskEditor application. (#548)
* Add clipspace feature.
* feat: copy content to clipspace
* feat: paste content from clipspace

Extend validation to allow for validating annotated_path in addition to other parameters.

Add support for annotated_filepath in folder_paths function.

Generalize the '/upload/image' API to allow for uploading images to the 'input', 'temp', or 'output' directories.

* rename contentClipboard -> clipspace

* Do deep copy for imgs on copy to clipspace.

* mask painting on clipspace

* add original_imgs into clipspace
* Preserve the original image when 'imgs' are modified

* robust patch & refactoring folder_paths about annotated_filepath

* wip

* Only show the Paste menu if the ComfyApp.clipspace is not empty

* clipspace feature added
maskeditor feature added

* instant refresh on paste

force triggering 'changed' on paste action

* enhance mask painting

smooth drawing
add brush_size +/- button

* robust patch

use mouseup event

* robust patch

again...

* subfolder fix on paste logic

attach subfolder if subfolder isn't empty

* event listener patch

add ], [ key event for brush size
remove listener on close

* Fix button positioning issue related to window height.
Change brush size from button to slider.

* clean commit

* clean code

* various bug fixes

* paste action
- prevent opening upload popup
- ensure rendering after widget_value update

* view api update
- support annotated_filepath

* maskeditor layout
- prevent covering button by hidden div

* remove dbg message

* Add cursor functionality to display brush size

* refactor: Replace brush preview feature with missionfloyd implementation

* missionfloyd implementation
* hiding brush preview off the canvas
* change brush size on wheel event

* keyup -> keydown event

* Update web/extensions/core/maskeditor.js

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>

* Add support for channel-specific image data retrieval in /view API to fix alpha mask loading issue

When loading an image with an alpha mask in JavaScript canvas, there is an issue where the alpha and RGB channels are premultiplied. To avoid reliance on JavaScript canvas, I added support for channel-specific image data retrieval in the "/view" API. This allows us to retrieve data for each channel separately and fix the alpha mask loading issue. The changes have been committed to the repository.

* Enable brush preview for key and slider events

* optimize

* preview fix

* robust patch

* fix copy (clipspace) action
imgs[0] copy -> whole imgs copy

* support batch images on clipspace, maskeditor

* copy/paste bug fixes for batch images
enhance selector preview on clipspace menu
add img_paste_mode option into clipspace menu

* crash fix

* print message if clipspace content cannot editable

* Update web/extensions/core/maskeditor.js

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>

* make default img_paste_mode to 'selected'

refactor space -> tab

* save clipspace files to input/clipspace instead of temp

* show "clipspace/filename.png" instead of 'filename.png [clipspace]' in LoadImage/LoadImageMask

* refresh fix related to FILE_COMBO

* Update web/extensions/core/maskeditor.js

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>

* Update web/extensions/core/maskeditor.js

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>

* adjust margin based on missionfloyd impelements

* mouse event -> pointer event

* pen, touch, mouse drawing patched and tested

* Update web/extensions/core/maskeditor.js

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>

* add comment about touch event.

---------

Co-authored-by: Lt.Dr.Data <lt.dr.data@gmail.com>
Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>
2023-05-08 14:37:36 -04:00
comfyanonymous
922a327ca9 Merge branch 'settings-slider' of https://github.com/missionfloyd/ComfyUI 2023-04-17 22:45:46 -04:00
Karun
80512e598a Adds several keybinds that interact with ComfyUI (#491)
* adds keybinds that interact w/ comfy menu

* adds remaining keybinds

* adds keybinds to readme and converts to table

* ctrl s and o save and open workflow

* moves keybinds to sep file, update readme

* remap load default, support keycodes

* update keybinds table, prepends comfy to ids

* escape exits out of modals

* modifier keys also use map

* adds setting for filename prompt

* better handle filename prompt

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>
2023-04-16 01:25:11 -04:00
missionfloyd
51d5668f14 Fix indentation 2023-04-12 21:15:21 -06:00
missionfloyd
52cd245d21 Add slider setting type 2023-04-12 19:36:35 -06:00
pythongosssss
e2d6ba9fd1 Support dataset when creating elements
Allow dialog to show element and override buttons
2023-04-08 14:38:45 +01:00
comfyanonymous
01f9d8268d Merge branch 'menu-drag' of https://github.com/missionfloyd/ComfyUI 2023-04-06 03:19:20 -04:00
missionfloyd
e10577366b Style modals to match rest of UI 2023-04-05 15:56:41 -06:00
missionfloyd
d56ef7e753 Put drag icon back 2023-04-05 08:57:44 -06:00
missionfloyd
1a6f38afe0 Remove menu drag handle 2023-04-04 22:03:22 -06:00
missionfloyd
5885832d11 Make the default true 2023-04-04 21:53:02 -06:00
missionfloyd
b49a528720 Add confirmation for clearing canvas 2023-04-04 21:20:49 -06:00
City
850028f65c Ask for confirmation before clearing nodes 2023-04-04 18:16:23 +02:00
pythongosssss
be0a94d11a Support numeric settings, tooltip, extra attrs 2023-04-02 15:16:08 +01:00
comfyanonymous
c27b187035 Merge branch 'menu-save-and-anchor' of https://github.com/pythongosssss/ComfyUI 2023-04-02 01:56:12 -04:00
pythongosssss
6bfdc94d88 Swap order to prevent being cleared 2023-03-31 18:04:53 +01:00
pythongosssss
aed4296b1a Formatting 2023-03-30 20:15:48 +01:00
pythongosssss
a05660983d Formatting 2023-03-30 20:15:12 +01:00
pythongosssss
9b1f7f94bf Remove bottom anchor 2023-03-30 20:14:01 +01:00
pythongosssss
82c8dde741 Merge remote-tracking branch 'origin/master' into menu-save-and-anchor 2023-03-29 14:40:45 +01:00
Farid Safi
00eb172489 move clean to handleFile and loadGraphData functions 2023-03-28 20:22:49 +02:00
Farid Safi
cefd69197a clean state when loading another workflow 2023-03-28 19:45:17 +02:00
pythongosssss
9ff42b2c77 Merge remote-tracking branch 'origin/master' into menu-save-and-anchor 2023-03-28 09:53:55 +01:00
Jairo Correa
9980ddb9d4 Color palette setting 2023-03-27 23:36:53 -03:00
pythongosssss
31d45191c2 Merge remote-tracking branch 'origin/master' into menu-save-and-anchor 2023-03-27 20:20:08 +01:00
ltdrdata
a1c58758e5 Add support for file list refresh feature in node (#192)
* Added file reload feature to widgets.

* Modify feature name 'reload' to 'refresh' and fixed ignoring button name.

* refresh widget bugfix

* crash patch for "widget" input by type mismatch

* compensate offset on showimage
* adding widget caused misaligned offset

* patch refresh feature for general method

* clean up patch and following upstream

* make more clean code for refresh feature

* move refresh button position

* robust patch for refresh feature

* patch for refreh feature
* avoid specify REFRESH_LIST for each node
* prevent updating selected value unless removed item
* update all combo list for 'required input' in node

---------

Co-authored-by: Lt.Dr.Data <lt.dr.data@gmail.com>
2023-03-27 13:27:09 -04:00
pythongosssss
8b3b6f7c6d Add manual flag when restoring pos 2023-03-26 15:10:38 +01:00
pythongosssss
6b3becdad8 Remove log 2023-03-26 15:03:57 +01:00
pythongosssss
65ddea50c5 Add setting to save menu position
Add anchoring to side when resizing
Fix losing menu when resizing
2023-03-26 15:01:34 +01:00
Jairo Correa
e72d9d7cf8 Prevent draggable menu to get outside of window 2023-03-25 23:06:00 -03:00
Jairo Correa
aeee02939c Draggable menu 2023-03-25 20:23:46 -03:00
comfyanonymous
7f47540236 Make saved json more pretty. 2023-03-20 02:23:47 -04:00
comfyanonymous
827e045dc5 Add an auto queue checkbox.
This will auto queue the current prompt when the queue hits zero.
2023-03-19 00:03:18 -04:00
comfyanonymous
680bf0bb9e I think it looks a bit better like this. 2023-03-15 14:32:52 -04:00
m957ymj75urz
6b33c39fa8 ignore/restore custom batch count when extra options is unchecked 2023-03-15 11:44:49 +01:00
m957ymj75urz
b91f00a1ff toggle extra options 2023-03-14 08:16:48 +01:00
m957ymj75urz
114e8ca4ed added a range input 2023-03-10 10:38:35 +01:00
m957ymj75urz
0300e7a678 add batch count to the menu 2023-03-09 18:02:03 +01:00
pythongosssss
c9f8d6b641 Added simple settings dialog
Updated to use css vars for colors
2023-03-08 20:03:37 +00:00
pythongosssss
31e72ecdae Readded loading file 2023-03-03 15:27:08 +00:00
pythongosssss
4a48e65f1e More work on UI 2023-03-03 15:20:49 +00:00
pythongosssss
739fb214e0 Added handling of sockets
Started rework of UI elements
Added pnginfo handling
2023-03-02 21:34:29 +00:00