Commit Graph

86 Commits

Author SHA1 Message Date
Dr.Lt.Data ae08fdb999
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 9bd33b6bd4 Merge branch 'progress-shape-fix' of https://github.com/pythongosssss/ComfyUI 2023-05-05 13:14:55 -04:00
pythongosssss de4623a8a4 actually fix card 2023-05-05 10:34:09 +01:00
pythongosssss f31e31ee0a Fix box shape
Match card to litegraph selection
2023-05-05 10:12:06 +01:00
pythongosssss 7e51bbd07f automatic calculation of image pos from widgets 2023-05-04 19:42:07 +01:00
comfyanonymous b04e16ef5a Make default workflow use an existing checkpoint if no SD1.5 checkpoint. 2023-04-30 18:19:03 -04:00
comfyanonymous ccad603b2e Add a way for nodes to validate their own inputs. 2023-04-23 16:03:26 -04:00
ltdrdata f7a8218814
Add clipspace feature. (#541)
* 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.

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

* robust patch & refactoring folder_paths about annotated_filepath

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

* instant refresh on paste

force triggering 'changed' on paste action

* subfolder fix on paste logic

attach subfolder if subfolder isn't empty

---------

Co-authored-by: Lt.Dr.Data <lt.dr.data@gmail.com>
2023-04-23 15:58:55 -04:00
Karun bc16b70bde
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
pythongosssss 2dd28d4d20 style 2023-04-15 21:41:21 +01:00
pythongosssss eb4035c8bd Adds jsdoc for better dev experience 2023-04-15 21:40:39 +01:00
comfyanonymous 501f200d86 Fix widgets not getting converted correctly in workflows. 2023-04-13 10:38:41 -04:00
FizzleDorf 3f52e7cbb1
Seed controls added to Ksamplers (#296)
Co-authored-by: flyingshutter <flyingshutter@users.noreply.github.com>
2023-04-12 20:57:13 -04:00
pythongosssss d6a3c0d424 Add support for dropping images from urls 2023-04-12 13:49:32 +01:00
comfyanonymous c982c937a7 Merge branch 'catch-configure-errors' of https://github.com/pythongosssss/ComfyUI 2023-04-08 18:37:47 -04:00
comfyanonymous b0edcfdc8e Merge branch 'missing-node-warning' of https://github.com/pythongosssss/ComfyUI 2023-04-08 18:37:27 -04:00
comfyanonymous 60ac983238 Merge branch 'master' of https://github.com/city96/ComfyUI 2023-04-08 15:50:26 -04:00
pythongosssss 92e912c065 Fix multiple missing 2023-04-08 16:55:09 +01:00
pythongosssss b78ebfcf9d Improve error UI 2023-04-08 16:37:09 +01:00
pythongosssss 12f9bfe895 Better filename check 2023-04-08 16:31:10 +01:00
pythongosssss 79ff7d67a5 Add error handling around initial load of workflow 2023-04-08 16:23:57 +01:00
pythongosssss aad71add69 const 2023-04-08 14:52:24 +01:00
pythongosssss cceb530395 Adds warning when loading graph with nodes you dont have 2023-04-08 14:50:57 +01:00
comfyanonymous 0bb5f93b92 Merge branch 'image-node-keybindings' of https://github.com/ALSchwalm/ComfyUI 2023-04-06 03:27:42 -04:00
Adam Schwalm bf7dbe4702 Add left/right/escape hotkeys for image nodes 2023-04-04 21:02:40 -05:00
comfyanonymous 72f9235a49 Merge branch 'snap-to-grid' of https://github.com/pythongosssss/ComfyUI 2023-04-02 14:13:55 -04:00
pythongosssss 519890a5cc Adds middle click for default node creation
Enable two useful properties
2023-04-02 15:57:12 +01:00
pythongosssss 26dc8e3056 formatting 2023-04-02 15:36:27 +01:00
pythongosssss d027ff121c Snap to grid 2023-04-02 15:33:34 +01:00
pythongosssss 178fc76363 Added a queue for the queue action 2023-04-01 18:46:05 +01:00
pythongosssss 06c2c19b5a Clone default graph before using 2023-03-31 20:35:26 +01:00
City e6e30ee7cb Fallback for node title 2023-03-31 00:54:35 +02:00
City 5bcbc007dd Add human-readable names for nodes 2023-03-30 23:13:58 +02:00
pythongosssss 00c1ec498f Fix crash if node is removed mid run 2023-03-29 19:03:38 +01:00
pythongosssss 6f72c4c6ff Allows nodes to return ui data and output data
Fire executed event on node when message received
2023-03-29 18:53:24 +01:00
Jairo Correa d5bf2314b3 Mute nodes and shortcuts in README 2023-03-29 05:04:06 -03:00
Farid Safi 40a377775e move clean to handleFile and loadGraphData functions 2023-03-28 20:22:49 +02:00
Farid Safi 393084877c clean state when loading another workflow 2023-03-28 19:45:17 +02:00
Jairo Correa 4b9e11053c Color palette setting 2023-03-27 23:36:53 -03:00
ltdrdata d3a375c8fb
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
Silversith bb1503ed63
Bugfix/include optional node inputs (#271)
* Minor changes and extra nodes

* Added Preview Image for Nodes

* Add a delete images button on main floating menu

* Add a confirmation dialog

* Remove DeleteAll, Remove Custom KSampler, Remove Image List

* Remove Image and Custom Json Load

* Remove Custom Nodes

* remove patch.diff
2023-03-27 01:16:22 -04:00
comfyanonymous 479ef4b38f Merge branch 'group-header' of https://github.com/jn-jairo/ComfyUI 2023-03-27 00:46:30 -04:00
Jairo Correa 63525ee83c Move group by header 2023-03-26 22:53:49 -03:00
Jairo Correa 967bfce0f3 Optional RETURN_NAMES to set the output name 2023-03-26 21:40:36 -03:00
mezzo-anon 980379bab2 change colors to a more consistent and pleasing palette 2023-03-26 04:11:53 +02:00
Jairo Correa 070b5749b3 Slot colors by type 2023-03-25 06:28:09 -03:00
pythongosssss bb00176731 Remove debugger 2023-03-23 21:43:51 +00:00
pythongosssss 7a7e3288ee Added support for converting widgets to inputs (and back) 2023-03-23 21:37:19 +00:00
xss eb67d05540 add canvas tab index so it recieves keydown events 2023-03-21 13:31:47 -05:00
pythongosssss 0b6ba21f52 Added save image menu item 2023-03-21 08:00:13 +00:00