Commit Graph

58 Commits

Author SHA1 Message Date
comfyanonymous
ebf6e2c421 Add route to get safetensors metadata:
/view_metadata/loras?filename=lora.safetensors
2023-05-29 02:48:50 -04:00
comfyanonymous
6e09cf02cc object_info now returns if node is an output_node or not. 2023-05-22 13:25:50 -04:00
comfyanonymous
5ee1ea3988 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
b25f0e0257 Cleaner code. 2023-05-20 23:06:33 -04:00
comfyanonymous
af999d4bfa Add a /object_info/{node_class} route to get only the info of one node. 2023-05-19 22:40:28 -04:00
comfyanonymous
efa48a3426 /prompt endpoint error is now in json format. 2023-05-14 01:30:58 -04:00
comfyanonymous
155842fc29 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
b296e5edb7 Merge branch 'serve-static-symlinks' of https://github.com/pythongosssss/ComfyUI 2023-05-13 11:33:56 -04:00
BlenderNeko
dd1be4e992 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
0186fc5a65 Fix queue delete. 2023-05-13 02:07:49 -04:00
pythongosssss
9e752e45aa allow static files to be symlinks 2023-05-12 20:58:29 +01:00
comfyanonymous
8ddb0dbe62 Add a way to overwrite images when uploading. 2023-05-11 14:15:13 -04:00
comfyanonymous
de9ea48018 Make the prompt_id a uuid and return it when queueing the prompt. 2023-05-10 16:41:43 -04:00
comfyanonymous
e5dc1bb62f Fix bug when uploading image with the same name. 2023-05-10 01:45:27 -04:00
comfyanonymous
d8edfe1f07 Only validate each input once. 2023-05-10 00:29:31 -04:00
comfyanonymous
1c31924215 Speed up the mask save and fix refresh replacing copied image. 2023-05-08 17:05:28 -04:00
comfyanonymous
7e151778a3 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
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
ltdrdata
73ff5c5278 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
25edb68351 Merge branch 'master' of https://github.com/city96/ComfyUI 2023-04-08 15:50:26 -04:00
comfyanonymous
f2ca0a15ee Rename the cors parameter to something more verbose. 2023-04-06 15:24:55 -04:00
EllangoK
405685ce89 makes cors a cli parameter 2023-04-06 15:06:22 -04:00
EllangoK
c3c354a092 add cors middleware 2023-04-06 14:04:53 -04:00
comfyanonymous
4ee5acc3a7 Add a way to set output directory with --output-directory 2023-04-05 14:29:30 -04:00
pythongosssss
86f7d35883 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
dd438a9d3b Add human-readable names for nodes 2023-03-30 23:13:58 +02:00
Jairo Correa
a82620b088 Optional RETURN_NAMES to set the output name 2023-03-26 21:40:36 -03:00
comfyanonymous
200431f6ef Style. 2023-03-26 15:17:53 -04:00
pythongosssss
8ad05bcf91 Merge branch 'comfyanonymous:master' into custom-node-socket 2023-03-26 10:12:39 +01:00
pythongosssss
ac41dda86c adds simple access to server from custom nodes 2023-03-24 11:39:09 +00:00
Jairo Correa
875e280bb3 Allow output folder to be a symbolic link 2023-03-23 21:25:21 -03:00
pythongosssss
c3efd5f578 Add content disposition header so images have name 2023-03-22 17:32:01 +00:00
comfyanonymous
8cdef9e8a1 Merge branch 'save-images' of https://github.com/m957ymj75urz/ComfyUI 2023-03-20 14:29:45 -04:00
comfyanonymous
a0c7c16702 Fix /embeddings route being broken. 2023-03-19 11:29:03 -04:00
m957ymj75urz
0581bd923f rework payload from server 2023-03-19 12:54:29 +01:00
pythongosssss
bd5315f3a9 Merge remote-tracking branch 'origin/master' into a1111-meta-v2 2023-03-16 21:30:23 +00:00
m957ymj75urz
ccf24a189e Merge branch 'master' into save-images 2023-03-15 10:48:15 +00:00
m957ymj75urz
36ac9c77de fix path traversal for /view 2023-03-14 09:27:17 +01:00
pythongosssss
0c128cb91d Added ability to save images to temp dir 2023-03-13 19:34:05 +00:00
pythongosssss
7a0cd33d8e 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
7c95e1a03b 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
dff33fe111 can specify a subfolder in the SaveImage node 2023-03-12 19:51:39 +01:00
pythongosssss
dd473d51ce Changed to use etag cache for js and css 2023-03-09 19:38:43 +00:00
pythongosssss
9ee1eb8dc5 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
1fcec7070e Added UploadImage+Mask nodes 2023-03-08 22:07:44 +00:00
pythongosssss
e69202b33e Updated to reuse session id if available 2023-03-07 13:24:15 +00:00
comfyanonymous
f1c9300224 Style. 2023-03-06 14:09:23 -05:00
pythongosssss
f61df5faf2 Added dynamic loading of extensions 2023-03-03 19:05:39 +00:00
pythongosssss
4a48e65f1e More work on UI 2023-03-03 15:20:49 +00:00
pythongosssss
10bdb6bcda Add mime type for js files 2023-03-02 19:58:59 +00:00