Commit Graph

122 Commits

Author SHA1 Message Date
pythongosssss cdaf65ceb1 remove log 2023-08-20 20:01:25 +01:00
pythongosssss 9b1d5a587c Allow loading js extensions without copying to /web folder 2023-08-20 19:55:48 +01:00
pythongosssss 0bbd9dd4d9 add system info to stats endpoint 2023-08-04 08:29:25 +01:00
comfyanonymous ccb6b70de1 Move image encoding outside of sampling loop for better preview perf. 2023-07-19 18:06:58 -04:00
comfyanonymous 876dadca84 Highlight nodes with errors in red even when workflow works fine. 2023-07-13 10:07:50 -04:00
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>
2023-06-24 03:45:41 -04:00
comfyanonymous 6253ec4aef Fix server crashing because of terminated websocket connection. 2023-06-15 11:01:56 -04:00
comfyanonymous af91df85c2 Add a /history/{prompt_id} endpoint. 2023-06-12 14:34:30 -04:00
space-nuko b4f434ee66 Preview sampled images with TAESD 2023-06-05 09:20:17 -05:00
comfyanonymous 2ec980bb9f Limit preview to webp and RGB jpeg. 2023-06-05 01:50:14 -04:00
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>
2023-06-05 01:49:43 -04:00
comfyanonymous 67892b5ac5 Refactor and improve model_management code related to free memory. 2023-06-02 15:21:33 -04:00
space-nuko b5dd15c67a System stats endpoint 2023-06-01 23:26:23 -05:00
space-nuko 1bbd3f7fe1 Send back prompt number from prompt/ endpoint 2023-06-01 22:15:06 -05:00
comfyanonymous b9818eb910 Add route to get safetensors metadata:
/view_metadata/loras?filename=lora.safetensors
2023-05-29 02:48:50 -04:00
comfyanonymous db27b0405a object_info now returns if node is an output_node or not. 2023-05-22 13:25:50 -04:00
comfyanonymous ffc56c53c9 Add a node_errors to the /prompt error json response.
"node_errors" contains a dict keyed by node ids. The contents are a message
and a list of dependent outputs.
2023-05-22 13:22:38 -04:00
comfyanonymous 3c76f43057 Cleaner code. 2023-05-20 23:06:33 -04:00
comfyanonymous b9daf4e30f Add a /object_info/{node_class} route to get only the info of one node. 2023-05-19 22:40:28 -04:00
comfyanonymous e7b9d2c02c /prompt endpoint error is now in json format. 2023-05-14 01:30:58 -04:00
comfyanonymous b0505eb7ab Return right type when none specified in upload route.
Switch time.time to time.perf_counter for custom node import times.
2023-05-13 15:31:22 -04:00
comfyanonymous 153f7ee152 Merge branch 'serve-static-symlinks' of https://github.com/pythongosssss/ComfyUI 2023-05-13 11:33:56 -04:00
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
2023-05-13 11:15:45 -04:00
comfyanonymous 997dd1b131 Fix queue delete. 2023-05-13 02:07:49 -04:00
pythongosssss 8a4ff5e34c allow static files to be symlinks 2023-05-12 20:58:29 +01:00
comfyanonymous 8ea165dd1e Add a way to overwrite images when uploading. 2023-05-11 14:15:13 -04:00
comfyanonymous 974958ff81 Make the prompt_id a uuid and return it when queueing the prompt. 2023-05-10 16:41:43 -04:00
comfyanonymous 8e3d1cbf3b Fix bug when uploading image with the same name. 2023-05-10 01:45:27 -04:00
comfyanonymous d6dee8af1d Only validate each input once. 2023-05-10 00:29:31 -04:00
comfyanonymous a8705dbfe2 Speed up the mask save and fix refresh replacing copied image. 2023-05-08 17:05:28 -04:00
comfyanonymous 850daf0416 Masked editor changes.
Add a way to upload to subfolders.

Clean up code.

Fix some issues.
2023-05-08 14:37:51 -04:00
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
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
comfyanonymous 60ac983238 Merge branch 'master' of https://github.com/city96/ComfyUI 2023-04-08 15:50:26 -04:00
comfyanonymous f84f2508cc Rename the cors parameter to something more verbose. 2023-04-06 15:24:55 -04:00
EllangoK 48efae1608 makes cors a cli parameter 2023-04-06 15:06:22 -04:00
EllangoK 7d62d89f93 add cors middleware 2023-04-06 14:04:53 -04:00
comfyanonymous f816964847 Add a way to set output directory with --output-directory 2023-04-05 14:29:30 -04:00
pythongosssss 313f1f83a6 Tweak server/custom node load order
- Load custom nodes after creating server
 - Add routes after loading custom nodes
Custom nodes can now add routes via PromptServer.instance
2023-04-01 12:44:29 +01:00
City 5bcbc007dd Add human-readable names for nodes 2023-03-30 23:13:58 +02:00
Jairo Correa 967bfce0f3 Optional RETURN_NAMES to set the output name 2023-03-26 21:40:36 -03:00
comfyanonymous 48efadeccf Style. 2023-03-26 15:17:53 -04:00
pythongosssss a49b5659bc
Merge branch 'comfyanonymous:master' into custom-node-socket 2023-03-26 10:12:39 +01:00
pythongosssss 8d0a142321 adds simple access to server from custom nodes 2023-03-24 11:39:09 +00:00
Jairo Correa 4f24e6a13b Allow output folder to be a symbolic link 2023-03-23 21:25:21 -03:00
pythongosssss 3c25f5dc0f Add content disposition header so images have name 2023-03-22 17:32:01 +00:00
comfyanonymous 0abe001edd Merge branch 'save-images' of https://github.com/m957ymj75urz/ComfyUI 2023-03-20 14:29:45 -04:00
comfyanonymous 3ff4c155c9 Fix /embeddings route being broken. 2023-03-19 11:29:03 -04:00
m957ymj75urz d1138e8ba0 rework payload from server 2023-03-19 12:54:29 +01:00
pythongosssss ba4a754a53 Merge remote-tracking branch 'origin/master' into a1111-meta-v2 2023-03-16 21:30:23 +00:00
m957ymj75urz 3d2f60b315
Merge branch 'master' into save-images 2023-03-15 10:48:15 +00:00
m957ymj75urz b1294fa49f fix path traversal for /view 2023-03-14 09:27:17 +01:00
pythongosssss 6db777b348 Added ability to save images to temp dir 2023-03-13 19:34:05 +00:00
pythongosssss 85989c74e5 Updated a1111 pnginfo importer, supports:
- model name, other basic settings
 - clip skip
 - hr upscale
 - loras
 - embeddings
2023-03-12 21:36:42 +00:00
comfyanonymous 0f3ba7482f Xformers is now properly disabled when --cpu used.
Added --windows-standalone-build option, currently it only opens
makes the code open up comfyui in the browser.
2023-03-12 15:44:16 -04:00
m957ymj75urz 195d7aec9f can specify a subfolder in the SaveImage node 2023-03-12 19:51:39 +01:00
pythongosssss d0b195c7d0 Changed to use etag cache for js and css 2023-03-09 19:38:43 +00:00
pythongosssss 99abc0eb2e Changed to upload to input dir
Fixed jpg
Added dupe support
Changed to use existing nodes
2023-03-09 17:57:59 +00:00
pythongosssss 4a326a2548 Added UploadImage+Mask nodes 2023-03-08 22:07:44 +00:00
pythongosssss 5c55c93367 Updated to reuse session id if available 2023-03-07 13:24:15 +00:00
comfyanonymous 235ba852d9 Style. 2023-03-06 14:09:23 -05:00
pythongosssss 592b377ac4 Added dynamic loading of extensions 2023-03-03 19:05:39 +00:00
pythongosssss a5c5c97ded More work on UI 2023-03-03 15:20:49 +00:00
pythongosssss 3637e19eff
Add mime type for js files 2023-03-02 19:58:59 +00:00
comfyanonymous 69cc75fbf8 Add a way to interrupt current processing in the backend. 2023-03-02 14:42:03 -05:00
comfyanonymous 49d2e5bb5a Move some stuff from main.py to execution.py 2023-02-27 19:44:58 -05:00
comfyanonymous c0fb0c848f Update colab notebook. 2023-02-25 22:49:22 -05:00
comfyanonymous 6de6246dd4 Fix some potential issues related to threads. 2023-02-25 18:36:29 -05:00
pythongosssss e053184a54
Changed line endings to LF 2023-02-25 20:57:40 +00:00
pythongosssss 70b3311478
Removed socketio 2023-02-25 12:31:16 +00:00
pythongosssss 9bd7bfa648
Added workflow history
Moved socket output updates to all node executions
Made image rendering on nodes more generic
2023-02-23 20:12:57 +00:00
pythongosssss a52aa9f4b5
Moved api out to server
Reworked sockets to use socketio
Added progress to nodes
Added highlight to active node
Added preview to saveimage node
2023-02-21 19:29:49 +00:00