183 Commits (38ed2da2ddc463a84acc08dbd2bbd5785190d487)

Author SHA1 Message Date
Chris 0782ac2a96 defaultInput 1 year ago
Michael Poutre bc1f6e2185
fix(ui/widgets): Only set widget forceInput option if a widget is added 1 year ago
comfyanonymous f368e5ac7d Don't paste nodes when target is a textarea or a text box. 1 year ago
comfyanonymous 2d9d3ca38b Merge branch 'master' of https://github.com/miabrahams/ComfyUI 1 year ago
Michael Abrahams 6f70227b8c Add support for pasting images into the graph
It can be useful to paste images from the clipboard directly into the node graph.
This commit modifies copy and paste handling to support this.

When an image file is found in the clipboard, we check whether an image node is selected.
If so, paste the image into that node. Otherwise, a new node is created.
If no image data are found in the clipboard, we call the original Litegraph paste.
To ensure that onCopy and onPaste events are fired, we override Litegraph's ctrl+c and ctrl+v handling.

Try to detect whether the pasted image is a real file on disk, or just pixel data copied from e.g. Photoshop.
Pasted pixel data will be called 'image.png' and have a creation time of now.
If it is simply pasted data, we store it in the subfolder /input/clipboard/.

This also adds support for the subfolder property in the IMAGEUPLOAD widget.
1 year ago
Chris dfd6489c96 onExecutionStart 2 years ago
Michael Poutre 69c5e6de85
fix(widgets): Add options object if not present when forceInput: true 2 years ago
Michael Poutre 9a7a52f8b5
refactor/fix: Treat forceInput widgets as standard widgets 2 years ago
ncpt 81ccacaa7c
Make the extensions loads in parallel instead of waiting one by one 2 years ago
comfyanonymous 7567c4ac8f Add bypass to readme and add a Bypass menu option to the nodes. 2 years ago
comfyanonymous 0cb14a33f6 Fix issue with logging missing nodes. 2 years ago
comfyanonymous cb25b88329 Merge branch 'logging' of https://github.com/pythongosssss/ComfyUI 2 years ago
comfyanonymous 3d614dde49 Fix bug with reroutes and bypass. 2 years ago
pythongosssss b2ea0cbd5c add logging 2 years ago
comfyanonymous 077617e8c9 Fix bypassed nodes with no inputs. 2 years ago
comfyanonymous 19fbab6ce3 Fix reroute nodes not working with bypassed nodes. 2 years ago
comfyanonymous 05321fd947 Add an experimental CTRL-B shortcut to bypass nodes. 2 years ago
comfyanonymous 907c9fbf0d Refactor to make it easier to set the api path. 2 years ago
comfyanonymous 30ea187160 Merge branch 'use-relative-paths' of https://github.com/mcmonkey4eva/ComfyUI 2 years ago
comfyanonymous 876dadca84 Highlight nodes with errors in red even when workflow works fine. 2 years ago
comfyanonymous 2b2a1474f7 Move to litegraph. 2 years ago
Huang-Huang Bao 05e6eac7b3
Scale graph canvas based on DPI factor
Similar to fixes in litegraph.js editor demo:
3ef215cf11/editor/js/code.js (L19-L28)

Also workarounds to address viewpoint problem of lightgrapgh.js in DPI scaling scenario.

Fixes #161
2 years ago
Alex "mcmonkey" Goodwin 5797ff89b0 use relative paths for all web connections
This enables local reverse-proxies to host ComfyUI on a path, eg "http://example.com/ComfyUI/" in such a way that at least everything I tested works. Without this patch, proxying ComfyUI in this way will yield errors.
2 years ago
Dr.Lt.Data d43cff2105 bugfix: image widget's was mis-aligned when node has multiline widget 2 years ago
comfyanonymous 9b93b920be Add CheckpointSave node to save checkpoints.
The created checkpoints contain workflow metadata that can be loaded by
dragging them on top of the UI or loading them with the "Load" button.

Checkpoints will be saved in fp16 or fp32 depending on the format ComfyUI
is using for inference on your hardware. To force fp32 use: --force-fp32

Anything that patches the model weights like merging or loras will be
saved.

The output directory is currently set to: output/checkpoints but that might
change in the future.
2 years ago
Dr.Lt.Data c9f5d5b2e1
optimize: support preview mode for mask editor. (#755)
* support preview mode for mask editor.
* use original file reference instead of loaded frontend blob

bugfix:
* prevent file open dialog when save to load image

* bugfix: cannot clear previous mask painted image's alpha

* bugfix

* bugfix

---------

Co-authored-by: Lt.Dr.Data <lt.dr.data@gmail.com>
2 years ago
Dr.Lt.Data 28677342c1 robust paste for image 2 years ago
Dr.Lt.Data 70e02b443f robust patch on pasteFromClipspace 2 years ago
Dr.Lt.Data 422163c2ba bugfix: Fixing the calculation issue when an image widget is added to the size calculation of the text widget. 2 years ago
space-nuko 48f7ec750c Make previews into cli option 2 years ago
space-nuko b4f434ee66 Preview sampled images with TAESD 2 years ago
Dr.Lt.Data 9f3a19b728
improve: lightweight preview to reduce network traffic (#733)
* To reduce bandwidth traffic in a remote environment, a lossy compression-based preview mode is provided for displaying simple visualizations in node-based widgets.

* Added 'preview=[image format]' option to the '/view' API.
* Updated node to use preview for displaying images as widgets.
* Excluded preview usage in the open image, save image, mask editor where the original data is required.

* Made preview_format parameterizable for extensibility.

* default preview format changed: jpeg -> webp

* Support advanced preview_format option.
- grayscale option for visual debugging
- quality option for aggressive reducing

L?;format;quality?

ex)
jpeg => rgb, jpeg, quality 90
L;webp;80 => grayscale, webp, quality 80
L;png => grayscale, png, quality 90
webp;50 => rgb, webp, quality 50

* move comment

* * add settings for preview_format
* default value is ''(= don't reencode)

---------

Co-authored-by: Lt.Dr.Data <lt.dr.data@gmail.com>
2 years ago
ltdrdata 8e8d6070f2 race condition patch 2 years ago
ltdrdata 1f34bf08f0 To support dynamic custom loading, separate the node registration
process based on the defs in the registerNodes function.
2 years ago
Lt.Dr.Data 08abd838b8 HOTFIX: Patched the conflict issue between the Combo Refresh feature and PrimitiveNodes. 2 years ago
Dr.Lt.Data 23ffafeb5d typo fix: field name in error message 2 years ago
space-nuko 6b2a8a3845 Show message in the frontend if prompt execution raises an exception 2 years ago
space-nuko cc4d3435d3 Highlight failing nodes/inputs in frontend 2 years ago
comfyanonymous 4796e615dd Revert DPI fix since it caused more issues than it solved. 2 years ago
malern e6e1999f96 Render UI at a higher resolution when viewing with a higher pixel ratio 2 years ago
comfyanonymous 62a371e12b Load workflow from latent file. 2 years ago
ltdrdata 7ada9e7d85 allows touch drag 2 years ago
Dr.Lt.Data d926f65f56
Feature/maskeditor context menu (#649)
* add "Open in MaskEditor" to context menu

* change save button name to 'Save to node' if open in node.
clear clipspace_return_node after auto paste

* * leak patch: prevent infinite duplication of MaskEditorDialog instance on every dialog open
* prevent conflict of multiple opening of MaskEditorDialog
* name of save button fix

* patch: brushPreview hiding by dialog

* consider close by 'esc' key on maskeditor.

* bugfix about last patch

* patch: invalid close detection

* 'enter' key as save action

* * batch support enhance
  - pick index based on imageIndex on copy action
* paste fix on batch image node

* typo

---------

Co-authored-by: Lt.Dr.Data <lt.dr.data@gmail.com>
2 years ago
comfyanonymous e7b9d2c02c /prompt endpoint error is now in json format. 2 years ago
BlenderNeko 1201d2eae5
Make nodes map over input lists (#579)
* allow nodes to map over lists

* make work with IS_CHANGED and VALIDATE_INPUTS

* give list outputs distinct socket shape

* add rebatch node

* add batch index logic

* add repeat latent batch

* deal with noise mask edge cases in latentfrombatch
2 years ago
comfyanonymous a8705dbfe2 Speed up the mask save and fix refresh replacing copied image. 2 years ago
comfyanonymous 850daf0416 Masked editor changes.
Add a way to upload to subfolders.

Clean up code.

Fix some issues.
2 years ago
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>
2 years ago
comfyanonymous 9bd33b6bd4 Merge branch 'progress-shape-fix' of https://github.com/pythongosssss/ComfyUI 2 years ago
pythongosssss de4623a8a4 actually fix card 2 years ago
pythongosssss f31e31ee0a Fix box shape
Match card to litegraph selection
2 years ago
pythongosssss 7e51bbd07f automatic calculation of image pos from widgets 2 years ago
comfyanonymous b04e16ef5a Make default workflow use an existing checkpoint if no SD1.5 checkpoint. 2 years ago
comfyanonymous ccad603b2e Add a way for nodes to validate their own inputs. 2 years ago
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>
2 years ago
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>
2 years ago
pythongosssss 2dd28d4d20 style 2 years ago
pythongosssss eb4035c8bd Adds jsdoc for better dev experience 2 years ago
comfyanonymous 501f200d86 Fix widgets not getting converted correctly in workflows. 2 years ago
FizzleDorf 3f52e7cbb1
Seed controls added to Ksamplers (#296)
Co-authored-by: flyingshutter <flyingshutter@users.noreply.github.com>
2 years ago
pythongosssss d6a3c0d424 Add support for dropping images from urls 2 years ago
comfyanonymous c982c937a7 Merge branch 'catch-configure-errors' of https://github.com/pythongosssss/ComfyUI 2 years ago
comfyanonymous b0edcfdc8e Merge branch 'missing-node-warning' of https://github.com/pythongosssss/ComfyUI 2 years ago
comfyanonymous 60ac983238 Merge branch 'master' of https://github.com/city96/ComfyUI 2 years ago
pythongosssss 92e912c065 Fix multiple missing 2 years ago
pythongosssss b78ebfcf9d Improve error UI 2 years ago
pythongosssss 12f9bfe895 Better filename check 2 years ago
pythongosssss 79ff7d67a5 Add error handling around initial load of workflow 2 years ago
pythongosssss aad71add69 const 2 years ago
pythongosssss cceb530395 Adds warning when loading graph with nodes you dont have 2 years ago
comfyanonymous 0bb5f93b92 Merge branch 'image-node-keybindings' of https://github.com/ALSchwalm/ComfyUI 2 years ago
Adam Schwalm bf7dbe4702 Add left/right/escape hotkeys for image nodes 2 years ago
comfyanonymous 72f9235a49 Merge branch 'snap-to-grid' of https://github.com/pythongosssss/ComfyUI 2 years ago
pythongosssss 519890a5cc Adds middle click for default node creation
Enable two useful properties
2 years ago
pythongosssss 26dc8e3056 formatting 2 years ago
pythongosssss d027ff121c Snap to grid 2 years ago
pythongosssss 178fc76363 Added a queue for the queue action 2 years ago
pythongosssss 06c2c19b5a Clone default graph before using 2 years ago
City e6e30ee7cb Fallback for node title 2 years ago
City 5bcbc007dd Add human-readable names for nodes 2 years ago
pythongosssss 00c1ec498f Fix crash if node is removed mid run 2 years ago
pythongosssss 6f72c4c6ff Allows nodes to return ui data and output data
Fire executed event on node when message received
2 years ago
Jairo Correa d5bf2314b3 Mute nodes and shortcuts in README 2 years ago
Farid Safi 40a377775e move clean to handleFile and loadGraphData functions 2 years ago
Farid Safi 393084877c clean state when loading another workflow 2 years ago
Jairo Correa 4b9e11053c Color palette setting 2 years ago
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>
2 years ago
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
2 years ago
comfyanonymous 479ef4b38f Merge branch 'group-header' of https://github.com/jn-jairo/ComfyUI 2 years ago
Jairo Correa 63525ee83c Move group by header 2 years ago
Jairo Correa 967bfce0f3 Optional RETURN_NAMES to set the output name 2 years ago
mezzo-anon 980379bab2 change colors to a more consistent and pleasing palette 2 years ago
Jairo Correa 070b5749b3 Slot colors by type 2 years ago
pythongosssss bb00176731 Remove debugger 2 years ago
pythongosssss 7a7e3288ee Added support for converting widgets to inputs (and back) 2 years ago
xss eb67d05540 add canvas tab index so it recieves keydown events 2 years ago
pythongosssss 0b6ba21f52 Added save image menu item 2 years ago
comfyanonymous e85fcb822b Small fix. 2 years ago
comfyanonymous 0abe001edd Merge branch 'save-images' of https://github.com/m957ymj75urz/ComfyUI 2 years ago
m957ymj75urz d1138e8ba0 rework payload from server 2 years ago