160 Commits

Author SHA1 Message Date
bilt
bb9d1b626d channel rgba 2025-07-25 18:09:10 +08:00
bilt
d0550820f9 check video 2025-07-07 12:33:11 +08:00
bilt
bd616430c1 print(f"*** channel: {channel}") 2025-07-07 11:15:30 +08:00
bilt
4febf4e493 or channel == 'rgba' 2025-07-06 07:18:51 +08:00
bilt
f98bfe47b7 or channel == 'rgba': 2025-07-06 06:58:39 +08:00
bilt
f843b344af logg 2025-07-05 23:41:16 +08:00
bilt
9e52c45eaa global _password 2025-07-05 23:09:57 +08:00
SD
840abc6e7e Sub call to deprecated pillow API Image.ANTIALIAS (#8415)
ANTIALIAS was removed in Pillow 10.0.0
2025-06-04 09:03:42 -04:00
comfyanonymous
14913f5989 Style fix. (#8390) 2025-06-02 07:22:02 -04:00
Jesse Gonyou
17d979c98a Update fix for potential XSS on /view (#8384)
* Update fix for potential XSS on /view

This commit uses mimetypes to add more restricted filetypes to prevent from being served, since mimetypes are what browsers use to determine how to serve files.

* Fix typo

Fixed a typo that prevented the program from running
2025-06-02 06:52:44 -04:00
Benjamin Lu
0199c7a594 Add Help Menu in NodeLibrarySidebarTab (#8179) 2025-06-01 04:32:32 -04:00
Michael Abrahams
85064ded58 Improve performance with large number of queued prompts (#8176)
* get_current_queue_volatile

* restore get_current_queue method

* remove extra import
2025-05-21 05:14:17 -04:00
编程界的小学生
123a3488be Code Optimization and Issues Fixes in ComfyUI server (#8196)
* Update server.py

* Update server.py
2025-05-21 04:59:42 -04:00
Christian Byrne
97f502c35a Add method to stream text to node UI (#8018)
* show text progress preview

* include node id in message
2025-05-10 20:40:02 -04:00
Robin Huang
5025cdb151 [API nodes] Add backbone for supporting api nodes in ComfyUI (#7745)
* Add Ideogram generate node.

* Add staging api.

* COMFY_API_NODE_NAME node property

* switch to boolean flag and use original node name for id

* add optional to type

* Add API_NODE and common error for missing auth token (#5)

* Add Minimax Video Generation + Async Task queue polling example (#6)

* [Minimax] Show video preview and embed workflow in ouput (#7)

* [API Nodes] Send empty request body instead of empty dictionary. (#8)

* Fixed: removed function from rebase.

* Add pydantic.

* Remove uv.lock

* Remove polling operations.

* Update stubs workflow.

* Remove polling comments.

* Update stubs.

* Use pydantic v2.

* Use pydantic v2.

* Add basic OpenAITextToImage node

* Add.

* convert image to tensor.

* Improve types.

* Ruff.

* Push tests.

* Handle multi-form data.

- Don't set content-type for multi-part/form
- Use data field instead of JSON

* Change to api.comfy.org

* Handle error code 409.

* Remove nodes.

---------

Co-authored-by: bymyself <cbyrne@comfy.org>
Co-authored-by: Yoland Y <4950057+yoland68@users.noreply.github.com>
2025-04-23 02:18:08 -04:00
Christian Byrne
019d2cb0c6 Update frontend to 1.16 (Install templates as pip package) (#7623)
* install templates as pip package

* Update requirements.txt

* bump templates version to include hidream

---------

Co-authored-by: Chenlei Hu <hcl@comfy.org>
2025-04-17 14:25:33 -04:00
Christian Byrne
f7ac3c0129 dont cache templates index (#7569) 2025-04-11 06:06:53 -04:00
Chenlei Hu
b0ce279e67 Align /prompt response schema (#7423) 2025-04-09 09:10:36 -04:00
bananasss00
cf1e84b9a4 Fix incorrect Content-Type for WebP images (#6752) 2025-02-11 04:48:35 -05:00
comfyanonymous
6865c73a03 Don't compress http response by default.
Remove argument to disable it.

Add new --enable-compress-response-body argument to enable it.
2025-02-07 03:29:21 -05:00
KarryCharon
e12555bdbf add disable-compres-response-body cli args; add compress middleware; (#6672) 2025-02-02 09:24:55 -05:00
catboxanon
06ad126a81 PromptServer: Return 400 for empty filename param (#6504) 2025-01-18 17:47:33 -05:00
Chenlei Hu
63e5b7a9da Add pyproject.toml (#6386)
* Add pyproject.toml

* doc

* Static version file

* Add github action to sync version.py

* Change trigger to PR

* Fix commit

* Grant pr write permission

* nit

* nit

* Don't run on fork PRs

* Rename version.py to comfyui_version.py
2025-01-11 03:09:25 -05:00
Alexander Piskun
b9ec5d7f94 fixed "verbose" argument (#6289)
Signed-off-by: bigcat88 <bigcat88@icloud.com>
2024-12-31 03:27:09 -05:00
Zoltán Dócs
4cd9253ae3 serve workflow templates from custom_nodes (#6193)
* add GET /workflow_templates

* serve workflow templates from custom_nodes

* refactor into custom_node_manager, add test

* remove unused import

* revert changes in folder_paths

* Remove trailing whitespace.

* account for multiple custom_nodes paths
2024-12-28 05:30:04 -05:00
comfyanonymous
772c265991 Add ruff rule for empty line with trailing whitespace. 2024-12-28 05:23:08 -05:00
Chenlei Hu
21e330a8d8 Use raw dir name to serve static web content (#6107) 2024-12-23 03:29:42 -05:00
Chenlei Hu
a43da32f45 [Security] Fix potential XSS on /view (#6034) 2024-12-13 04:56:43 -05:00
Chenlei Hu
a1dd5bc59c Enforce all pyflake lint rules (#6033)
* Enforce F821 undefined-name

* Enforce all pyflake lint rules
2024-12-12 19:29:37 -05:00
Chenlei Hu
efca88cfb3 Lint all unused variables (#5989)
* Enable F841

* Autofix

* Remove all unused variable assignment
2024-12-12 17:59:16 -05:00
Hayden
00e6b8cac6 Optimize model library (#5841)
* Move model manager routes

* Add experiment model manager api

* Fix cache causing returns to be empty

* Fix unable to compare sub-dir caches

* Skip non-existent folders

* Add model preview

* Revert 'Move model manager routes'

* move model_filemanager.py to app/

* Update model_manager.py

3.8 compatibility

---------
2024-12-11 18:12:04 -05:00
Chenlei Hu
2f7ea6598d Remove internal model download endpoint (#5432) 2024-11-28 04:57:06 -05:00
pythongosssss
1a4cef9312 Live terminal output (#5396)
* Add /logs/raw and /logs/subscribe for getting logs on frontend
Hijacks stderr/stdout to send all output data to the client on flush

* Use existing send sync method

* Fix get_logs should return string

* Fix bug

* pass no server

* fix tests

* Fix output flush on linux
2024-11-08 19:13:34 -05:00
Xiaodong Xie
ab895a6b97 Ignore more network related errors during websocket communication. (#5269)
Intermittent network issues during websocket communication should not crash ComfyUi process.

Co-authored-by: Xiaodong Xie <xie.xiaodong@frever.com>
2024-10-17 18:31:45 -04:00
comfyanonymous
23707de74a Add a note that the experimental model downloader api will be removed. 2024-09-26 03:17:52 -04:00
Alex "mcmonkey" Goodwin
dfdb4fdb7c Internal download API: Add proper validated directory input (#4981)
* add internal /folder_paths route

returns a json maps of folder paths

* (minor) format download_models.py

* initial folder path input on download api

* actually, require folder_path and clean up some code

* partial tests update

* fix & logging

* also download to a tmp file not the live file

to avoid compounding errors from network failure

* update tests again

* test tweaks

* workaround the first tests blocker

* fix file handling in tests

* rewrite test for create_model_path

* minor doc fix

* avoid 'mock_directory'

use temp dir to avoid accidental fs pollution from tests
2024-09-24 03:50:45 -04:00
comfyanonymous
65e107564d Support listening on multiple addresses. 2024-09-23 04:36:59 -04:00
comfyanonymous
d06bfd0a31 Add total and free ram to /system_stats. 2024-09-22 03:42:11 -04:00
Alex "mcmonkey" Goodwin
1836428f3d very simple strong-cache on model list (#4969)
* very simple strong-cache on model list

* store the cache after validation too

* only cache object_info for now

* use a 'with' context
2024-09-19 04:40:14 -04:00
Tom
90f6dfaadf Add route to list model types (#4846)
* Add list models route

* Better readable model types list
2024-09-17 04:22:05 -04:00
comfyanonymous
204e6f1146 Limit origin check to when host is loopback.
This should still prevent the exploit without breaking things for people
who use reverse proxies.
2024-09-11 01:06:37 -04:00
comfyanonymous
fccd6f9c73 If host does not contain a port only compare the hostnames. 2024-09-09 16:28:23 -04:00
comfyanonymous
8b74363200 Fix issue where sometimes origin doesn't contain the port. 2024-09-09 03:18:17 -04:00
comfyanonymous
087e4956b0 Ignore origin domain when it's empty. 2024-09-09 01:04:56 -04:00
comfyanonymous
6f002ae21a Fix issue with last commit. 2024-09-08 19:35:23 -04:00
comfyanonymous
d9cb93d46a By default only accept requests where origin header matches the host.
Browsers are dumb and let any website do requests to localhost this should
prevent this without breaking things. CORS prevents the javascript from
reading the response but they can still write it.

At the moment this is only enabled when the --enable-cors-header argument
is not used.
2024-09-08 18:17:29 -04:00
comfyanonymous
19cdff6796 Cleanup. 2024-08-30 12:53:59 -04:00
Chenlei Hu
2ff5eb9c72 Get logs endpoint & system_stats additions (#4690)
* Add route for getting output logs

* Include ComfyUI version

* Move to own function

* Changed to memory logger

* Unify logger setup logic

* Fix get version git fallback

---------

Co-authored-by: pythongosssss <125205205+pythongosssss@users.noreply.github.com>
2024-08-30 12:46:37 -04:00
Robin Huang
2f382e6c0f Add relative file path to the progress report. (#4621) 2024-08-27 02:06:12 -04:00
Alex "mcmonkey" Goodwin
b5173d39d6 add a get models list api route (#4519)
* get models list api route

* remove copypasta
2024-08-21 02:04:42 -04:00