Compare commits
423 Commits
tests/api-
...
reverted-m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d82e1f5d67 | ||
|
|
621de1ab99 | ||
|
|
7da00796e5 | ||
|
|
6086419cb6 | ||
|
|
5bc1f2f2c0 | ||
|
|
32a83b211e | ||
|
|
bead7b3a7f | ||
|
|
815d6d6572 | ||
|
|
95ce812992 | ||
|
|
9a36f4748c | ||
|
|
50b7849a35 | ||
|
|
6f1245b27c | ||
|
|
cc87ed3899 | ||
|
|
1d9037fefe | ||
|
|
03016e2d16 | ||
|
|
3d41617f4e | ||
|
|
35151ffdd1 | ||
|
|
4527d41a7a | ||
|
|
553cba12f3 | ||
|
|
116e068ac3 | ||
|
|
1010dd2d28 | ||
|
|
7354242906 | ||
|
|
e7d0b158e9 | ||
|
|
330c4657b1 | ||
|
|
72a109f109 | ||
|
|
cf45c51dfb | ||
|
|
0b013adb34 | ||
|
|
7457d91f64 | ||
|
|
7fe1159426 | ||
|
|
c2665e3677 | ||
|
|
d63de803a4 | ||
|
|
11aca3513c | ||
|
|
561c9f40e5 | ||
|
|
54ed13aadf | ||
|
|
109cc21337 | ||
|
|
7e46b30fa5 | ||
|
|
0ba112c2c7 | ||
|
|
fc15d94170 | ||
|
|
dcb37d9c55 | ||
|
|
755b9d6342 | ||
|
|
3d6151c94f | ||
|
|
590bd8c4b9 | ||
|
|
e99aafd876 | ||
|
|
1f0adf8bcf | ||
|
|
dbd5d5fb43 | ||
|
|
a8b0e3641b | ||
|
|
9efb350be9 | ||
|
|
8d9820b3fb | ||
|
|
103f89551a | ||
|
|
6030d961ad | ||
|
|
ee08c9e17f | ||
|
|
48dd9a3240 | ||
|
|
e122e206a6 | ||
|
|
398b905758 | ||
|
|
dc2ec08fe3 | ||
|
|
3bf5edf5c9 | ||
|
|
134bca526c | ||
|
|
3393e58b06 | ||
|
|
eab6cdeee4 | ||
|
|
e8ec1ce8e3 | ||
|
|
b3581564ed | ||
|
|
29e1bd95fd | ||
|
|
8bff401c14 | ||
|
|
41798e9255 | ||
|
|
9e4f0228d1 | ||
|
|
76ee93c98c | ||
|
|
fb1a89efb7 | ||
|
|
aface43554 | ||
|
|
a35f0157b2 | ||
|
|
9b32162906 | ||
|
|
21bba62572 | ||
|
|
302327d6b3 | ||
|
|
5667e8bcbb | ||
|
|
ae66bd0e31 | ||
|
|
48dfadc02d | ||
|
|
3df6272bb6 | ||
|
|
e7f9bcda01 | ||
|
|
205044ca66 | ||
|
|
d497eb1f00 | ||
|
|
4e6f970ee9 | ||
|
|
0b6cdda6f5 | ||
|
|
a896ded763 | ||
|
|
fb5dd9ebc2 | ||
|
|
c8b7db6c38 | ||
|
|
44a3191be3 | ||
|
|
b4f7cdc9e7 | ||
|
|
8da07018d5 | ||
|
|
0c19a27065 | ||
|
|
3296b0ecdf | ||
|
|
0a07261124 | ||
|
|
33106d0ecf | ||
|
|
5bb887206a | ||
|
|
b30b0e27cb | ||
|
|
363736489c | ||
|
|
8dbf5e87a0 | ||
|
|
0b30f2cb50 | ||
|
|
ba5265dac4 | ||
|
|
ecb9c65917 | ||
|
|
8a98474600 | ||
|
|
b072216e67 | ||
|
|
cfb3181716 | ||
|
|
ab684cdc99 | ||
|
|
facadc3a44 | ||
|
|
281319d2da | ||
|
|
5cb203685c | ||
|
|
01fa37900b | ||
|
|
edbe744e17 | ||
|
|
2a32a1a4a8 | ||
|
|
404bdb21e6 | ||
|
|
b260c9a512 | ||
|
|
4b941adb6a | ||
|
|
bd752550a8 | ||
|
|
b8b71bb961 | ||
|
|
5aaf7a4092 | ||
|
|
030e02ffb8 | ||
|
|
d962aa03f4 | ||
|
|
9e4a2aae43 | ||
|
|
ee6eb685e7 | ||
|
|
09a38a32ce | ||
|
|
d13b19d43d | ||
|
|
e730dca1ad | ||
|
|
8da30640bb | ||
|
|
6f4eb88e07 | ||
|
|
d9592b9dab | ||
|
|
b87ada72aa | ||
|
|
83363ba1f0 | ||
|
|
23ebe7f718 | ||
|
|
e04264cfa3 | ||
|
|
8d29e5037f | ||
|
|
6926ed45b0 | ||
|
|
736b85b8bb | ||
|
|
9e3361bc31 | ||
|
|
6e10381020 | ||
|
|
a1d37d379c | ||
|
|
07d87db7a2 | ||
|
|
4e556673d2 | ||
|
|
f421304fc1 | ||
|
|
c9271b1686 | ||
|
|
12eb6863da | ||
|
|
4834874091 | ||
|
|
8759ebf200 | ||
|
|
d4715aebef | ||
|
|
0fe2ade7bb | ||
|
|
0c71565535 | ||
|
|
6a637091a2 | ||
|
|
31eba60012 | ||
|
|
51e58e9078 | ||
|
|
4a1e76730a | ||
|
|
5599bb028b | ||
|
|
552c6da0cc | ||
|
|
cc6817a891 | ||
|
|
fb48d1b485 | ||
|
|
1c336dad6b | ||
|
|
a4940d46cd | ||
|
|
499b2f44c1 | ||
|
|
2b200c9281 | ||
|
|
36a900c98f | ||
|
|
5236b03f66 | ||
|
|
8be35e3621 | ||
|
|
509f00fe89 | ||
|
|
a98b87f148 | ||
|
|
ae9b2b3b72 | ||
|
|
02e1ec0ae3 | ||
|
|
daefb0f120 | ||
|
|
ff0604e3b6 | ||
|
|
20e41e22fa | ||
|
|
a0e3bdd594 | ||
|
|
6580aaf3ad | ||
|
|
0b46701b60 | ||
|
|
0bb4effede | ||
|
|
b07082a52d | ||
|
|
04f267f5a7 | ||
|
|
03ccce2804 | ||
|
|
e894bd9f24 | ||
|
|
10e6988273 | ||
|
|
905b61e5d8 | ||
|
|
ee69d393ae | ||
|
|
cab39973ae | ||
|
|
d93f5d07bb | ||
|
|
ba00ffe1ae | ||
|
|
6afaf5eaf5 | ||
|
|
d30459cc34 | ||
|
|
e92fbb7b1b | ||
|
|
42d464b532 | ||
|
|
c2e9e5c63a | ||
|
|
bc36726925 | ||
|
|
7abbff8c31 | ||
|
|
6236f4bcf4 | ||
|
|
3c3e80f77f | ||
|
|
4aae2fb289 | ||
|
|
66ff07752f | ||
|
|
5cf92f2742 | ||
|
|
6d3fddc474 | ||
|
|
66d4ad6174 | ||
|
|
2a366a1607 | ||
|
|
d87a0995b4 | ||
|
|
9a73a41e04 | ||
|
|
ba041b36bc | ||
|
|
f5f9de69b4 | ||
|
|
71e56c62e8 | ||
|
|
0f496619fd | ||
|
|
5fdd6a441a | ||
|
|
00f287bb63 | ||
|
|
785268efa6 | ||
|
|
2c976d9394 | ||
|
|
1e32582642 | ||
|
|
6f8f6d07f5 | ||
|
|
3958111e76 | ||
|
|
86fcc4af74 | ||
|
|
2fd26756df | ||
|
|
478f4b74d8 | ||
|
|
73d0d2a1bb | ||
|
|
546db08ec4 | ||
|
|
0dd41a8670 | ||
|
|
82c0c89f46 | ||
|
|
c3798bf4c2 | ||
|
|
ff80b6ccb0 | ||
|
|
e729217116 | ||
|
|
94c695daca | ||
|
|
9f189f0420 | ||
|
|
ad09e53f60 | ||
|
|
092a7a5f3f | ||
|
|
f45649bd25 | ||
|
|
2595cc5ed7 | ||
|
|
2f62190c6f | ||
|
|
577314984c | ||
|
|
f0346b955b | ||
|
|
70139ded4a | ||
|
|
bf379900e1 | ||
|
|
9bafc90f5e | ||
|
|
fce0d9e88e | ||
|
|
2b3b154989 | ||
|
|
948d2440a1 | ||
|
|
5adbe1ce7a | ||
|
|
8157d34ffa | ||
|
|
3ec8cb2204 | ||
|
|
0daa826543 | ||
|
|
a66028da58 | ||
|
|
807c9e6872 | ||
|
|
e71f3774ba | ||
|
|
dd7314bf10 | ||
|
|
f33bc127dc | ||
|
|
db92b87782 | ||
|
|
eba41c8693 | ||
|
|
c855308162 | ||
|
|
73d971bed8 | ||
|
|
bcfe0c2874 | ||
|
|
931ff666ae | ||
|
|
18b6d86cc4 | ||
|
|
3c5efa0662 | ||
|
|
9b739bcbbf | ||
|
|
db89076e48 | ||
|
|
19b341ef18 | ||
|
|
be3713b1a3 | ||
|
|
99c4415cfb | ||
|
|
7b311f2ccf | ||
|
|
4aeabfe0a7 | ||
|
|
431ed02194 | ||
|
|
07f587ed83 | ||
|
|
0408341d82 | ||
|
|
5b3c9432f3 | ||
|
|
4a197e63f9 | ||
|
|
0876a12fe9 | ||
|
|
c43c7ecc03 | ||
|
|
4a6dee3044 | ||
|
|
019acdd840 | ||
|
|
1c98512720 | ||
|
|
23a09ad546 | ||
|
|
0836e8fe7c | ||
|
|
90196af8f8 | ||
|
|
566fe05772 | ||
|
|
18772c6292 | ||
|
|
6278bddc9b | ||
|
|
f74bf71735 | ||
|
|
efe9ed68b2 | ||
|
|
7c1e75865d | ||
|
|
a0aee41f1a | ||
|
|
2049dd75f4 | ||
|
|
0864c35ba9 | ||
|
|
92c9f66671 | ||
|
|
815784e809 | ||
|
|
2795d00d1e | ||
|
|
86dd0b4963 | ||
|
|
77a4f4819f | ||
|
|
b63d603482 | ||
|
|
e569b4e613 | ||
|
|
8a70997546 | ||
|
|
80d0a0f882 | ||
|
|
70b3997874 | ||
|
|
e8e4311068 | ||
|
|
c58b93ff51 | ||
|
|
7d8ebfe91b | ||
|
|
810381eab2 | ||
|
|
61dc6cf2de | ||
|
|
0205ebad2a | ||
|
|
09a94133ac | ||
|
|
1eb3c3b219 | ||
|
|
457845bb51 | ||
|
|
0c11b46585 | ||
|
|
c35100d9e9 | ||
|
|
847031cb04 | ||
|
|
f8d87bb452 | ||
|
|
f60b3505e0 | ||
|
|
addefbc511 | ||
|
|
c4314b25a3 | ||
|
|
921bb86127 | ||
|
|
b3a7fb9c3e | ||
|
|
c143c81a7e | ||
|
|
dd389ba0f8 | ||
|
|
46b1649ab8 | ||
|
|
89710412e4 | ||
|
|
931973b632 | ||
|
|
60aaa838e3 | ||
|
|
1246538bbb | ||
|
|
80518abf9d | ||
|
|
fc1ae2a18e | ||
|
|
3fd8d2049c | ||
|
|
35a6bcf20c | ||
|
|
0d75fc331e | ||
|
|
0a23e793e3 | ||
|
|
2c1c03e063 | ||
|
|
64059d2949 | ||
|
|
648aa7c4d3 | ||
|
|
274bb81a08 | ||
|
|
e2c90b4681 | ||
|
|
fa0a98ac6e | ||
|
|
e6e7b42415 | ||
|
|
0b7ef2e1d4 | ||
|
|
2fac67a9f9 | ||
|
|
8b9892de2e | ||
|
|
b3290dc909 | ||
|
|
3e3176eddb | ||
|
|
b1ef84894a | ||
|
|
c6cffc92c4 | ||
|
|
efb9fd2712 | ||
|
|
94b294ff93 | ||
|
|
99a9e33648 | ||
|
|
055d94a919 | ||
|
|
0978005240 | ||
|
|
1f796581ec | ||
|
|
f3a1716dad | ||
|
|
a1c3a0db1f | ||
|
|
9f80cc8a6b | ||
|
|
133786846e | ||
|
|
bdf297a5c6 | ||
|
|
6767254eb0 | ||
|
|
691cebd479 | ||
|
|
f3932cbf29 | ||
|
|
3f73a97037 | ||
|
|
226f1f5be4 | ||
|
|
7e45c07660 | ||
|
|
0c815036b9 | ||
|
|
ae9fdd0255 | ||
|
|
b3874ee6fd | ||
|
|
62af4891f3 | ||
|
|
2176e0c0ad | ||
|
|
cac105b0d5 | ||
|
|
cd7c42cc23 | ||
|
|
a3fb847773 | ||
|
|
5c2f4f9e4b | ||
|
|
0a511d5b87 | ||
|
|
efe1aad5db | ||
|
|
eed4c53df0 | ||
|
|
9c08a6314b | ||
|
|
a6b2d2c722 | ||
|
|
3c6b5300e5 | ||
|
|
f084c30b20 | ||
|
|
206004fc1f | ||
|
|
d9641cbff8 | ||
|
|
13b272052a | ||
|
|
c79e0d26d8 | ||
|
|
ec4a4c2cfc | ||
|
|
9a9491bff9 | ||
|
|
5b5155819f | ||
|
|
1b941c6b29 | ||
|
|
9b9665d2e9 | ||
|
|
4cceb46641 | ||
|
|
19cf83cce6 | ||
|
|
bb60d399fc | ||
|
|
1a9f1dd0ae | ||
|
|
586c465aaa | ||
|
|
50ceb974d9 | ||
|
|
27cf40d392 | ||
|
|
bbb6005634 | ||
|
|
8dbd996558 | ||
|
|
8605345499 | ||
|
|
3671ddbd4b | ||
|
|
5bc1ceacb2 | ||
|
|
47b9fa3651 | ||
|
|
6062b87771 | ||
|
|
213152aa43 | ||
|
|
ea8047344f | ||
|
|
a7bc167d53 | ||
|
|
18e78ee2c2 | ||
|
|
754236e35b | ||
|
|
2645d62991 | ||
|
|
e55d9416dc | ||
|
|
24d35eec54 | ||
|
|
ee053f50b4 | ||
|
|
3593c9ed3e | ||
|
|
93f548696d | ||
|
|
cecb952add | ||
|
|
596571bb38 | ||
|
|
85a6fb75b8 | ||
|
|
7dea42433b | ||
|
|
ec5e4af6b7 | ||
|
|
0048754fe8 | ||
|
|
5c0bd0f79c | ||
|
|
669cdffe08 | ||
|
|
3cd553301b | ||
|
|
db7ef4f253 | ||
|
|
a09704567c | ||
|
|
21fe577a2e | ||
|
|
9f258f5c9c | ||
|
|
9cd088feb0 | ||
|
|
89e3828138 | ||
|
|
731c89dc27 | ||
|
|
3d920cab4d | ||
|
|
470b8c1fb8 | ||
|
|
dbf988fd5a | ||
|
|
0031743ad4 | ||
|
|
0f2c0ab65d | ||
|
|
53244b794f |
58
.github/workflows/publish-to-pypi.yml
vendored
Normal file
58
.github/workflows/publish-to-pypi.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Publish to PyPI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- draft-v4
|
||||
paths:
|
||||
- "pyproject.toml"
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository_owner == 'ltdrdata' || github.repository_owner == 'Comfy-Org' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install build twine
|
||||
|
||||
- name: Get current version
|
||||
id: current_version
|
||||
run: |
|
||||
CURRENT_VERSION=$(grep -oP 'version = "\K[^"]+' pyproject.toml)
|
||||
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Current version: $CURRENT_VERSION"
|
||||
|
||||
- name: Build package
|
||||
run: python -m build
|
||||
|
||||
- name: Create GitHub Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
files: dist/*
|
||||
tag_name: v${{ steps.current_version.outputs.version }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
generate_release_notes: true
|
||||
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_TOKEN }}
|
||||
skip-existing: true
|
||||
verbose: true
|
||||
@@ -8,7 +8,7 @@
|
||||
* V3.16: Support for `uv` has been added. Set `use_uv` in `config.ini`.
|
||||
* V3.10: `double-click feature` is removed
|
||||
* This feature has been moved to https://github.com/ltdrdata/comfyui-connection-helper
|
||||
* V3.3.2: Overhauled. Officially supports [https://comfyregistry.org/](https://comfyregistry.org/).
|
||||
* V3.3.2: Overhauled. Officially supports [https://registry.comfy.org/](https://registry.comfy.org/).
|
||||
* You can see whole nodes info on [ComfyUI Nodes Info](https://ltdrdata.github.io/) page.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -46,10 +46,7 @@ comfyui_manager_path = os.path.abspath(os.path.dirname(__file__))
|
||||
cm_global.pip_blacklist = {'torch', 'torchaudio', 'torchsde', 'torchvision'}
|
||||
cm_global.pip_downgrade_blacklist = ['torch', 'torchaudio', 'torchsde', 'torchvision', 'transformers', 'safetensors', 'kornia']
|
||||
|
||||
if sys.version_info < (3, 13):
|
||||
cm_global.pip_overrides = {'numpy': 'numpy<2'}
|
||||
else:
|
||||
cm_global.pip_overrides = {}
|
||||
cm_global.pip_overrides = {}
|
||||
|
||||
if os.path.exists(os.path.join(manager_util.comfyui_manager_path, "pip_overrides.json")):
|
||||
with open(os.path.join(manager_util.comfyui_manager_path, "pip_overrides.json"), 'r', encoding="UTF-8", errors="ignore") as json_file:
|
||||
@@ -152,9 +149,6 @@ class Ctx:
|
||||
with open(core.manager_pip_overrides_path, 'r', encoding="UTF-8", errors="ignore") as json_file:
|
||||
cm_global.pip_overrides = json.load(json_file)
|
||||
|
||||
if sys.version_info < (3, 13):
|
||||
cm_global.pip_overrides = {'numpy': 'numpy<2'}
|
||||
|
||||
if os.path.exists(core.manager_pip_blacklist_path):
|
||||
with open(core.manager_pip_blacklist_path, 'r', encoding="UTF-8", errors="ignore") as f:
|
||||
for x in f.readlines():
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
41
docs/README.md
Normal file
41
docs/README.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# ComfyUI-Manager: Documentation
|
||||
|
||||
This directory contains documentation for the ComfyUI-Manager, providing guides and tutorials for users in multiple languages.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
The documentation is organized into language-specific directories:
|
||||
|
||||
- **en/**: English documentation
|
||||
- **ko/**: Korean documentation
|
||||
|
||||
## Core Documentation Files
|
||||
|
||||
### Command-Line Interface
|
||||
|
||||
- **cm-cli.md**: Documentation for the ComfyUI-Manager Command Line Interface (CLI), which allows using manager functionality without the UI.
|
||||
|
||||
### Advanced Features
|
||||
|
||||
- **use_aria2.md**: Guide for using the aria2 download accelerator with ComfyUI-Manager for faster model downloads.
|
||||
|
||||
## Documentation Standards
|
||||
|
||||
The documentation follows these standards:
|
||||
|
||||
1. **Markdown Format**: All documentation is written in Markdown for easy rendering on GitHub and other platforms
|
||||
2. **Language-specific Directories**: Content is separated by language to facilitate localization
|
||||
3. **Feature-focused Documentation**: Each major feature has its own documentation file
|
||||
4. **Updated with Releases**: Documentation is kept in sync with software releases
|
||||
|
||||
## Contributing to Documentation
|
||||
|
||||
When contributing new documentation:
|
||||
|
||||
1. Place files in the appropriate language directory
|
||||
2. Use clear, concise language appropriate for the target audience
|
||||
3. Include examples where helpful
|
||||
4. Consider adding screenshots or diagrams for complex features
|
||||
5. Maintain consistent formatting with existing documentation
|
||||
|
||||
This documentation directory will continue to grow to support the expanding feature set of ComfyUI-Manager.
|
||||
10310
extension-node-map.json
10310
extension-node-map.json
File diff suppressed because it is too large
Load Diff
12272
github-stats.json
12272
github-stats.json
File diff suppressed because it is too large
Load Diff
53
glob/README.md
Normal file
53
glob/README.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# ComfyUI-Manager: Core Backend (glob)
|
||||
|
||||
This directory contains the Python backend modules that power ComfyUI-Manager, handling the core functionality of node management, downloading, security, and server operations.
|
||||
|
||||
## Core Modules
|
||||
|
||||
- **manager_core.py**: The central implementation of management functions, handling configuration, installation, updates, and node management.
|
||||
- **manager_server.py**: Implements server functionality and API endpoints for the web interface to interact with the backend.
|
||||
- **manager_downloader.py**: Handles downloading operations for models, extensions, and other resources.
|
||||
- **manager_util.py**: Provides utility functions used throughout the system.
|
||||
|
||||
## Specialized Modules
|
||||
|
||||
- **cm_global.py**: Maintains global variables and state management across the system.
|
||||
- **cnr_utils.py**: Helper utilities for interacting with the custom node registry (CNR).
|
||||
- **git_utils.py**: Git-specific utilities for repository operations.
|
||||
- **node_package.py**: Handles the packaging and installation of node extensions.
|
||||
- **security_check.py**: Implements the multi-level security system for installation safety.
|
||||
- **share_3rdparty.py**: Manages integration with third-party sharing platforms.
|
||||
|
||||
## Architecture
|
||||
|
||||
The backend follows a modular design pattern with clear separation of concerns:
|
||||
|
||||
1. **Core Layer**: Manager modules provide the primary API and business logic
|
||||
2. **Utility Layer**: Helper modules provide specialized functionality
|
||||
3. **Integration Layer**: Modules that connect to external systems
|
||||
|
||||
## Security Model
|
||||
|
||||
The system implements a comprehensive security framework with multiple levels:
|
||||
|
||||
- **Block**: Highest security - blocks most remote operations
|
||||
- **High**: Allows only specific trusted operations
|
||||
- **Middle**: Standard security for most users
|
||||
- **Normal-**: More permissive for advanced users
|
||||
- **Weak**: Lowest security for development environments
|
||||
|
||||
## Implementation Details
|
||||
|
||||
- The backend is designed to work seamlessly with ComfyUI
|
||||
- Asynchronous task queuing is implemented for background operations
|
||||
- The system supports multiple installation modes
|
||||
- Error handling and risk assessment are integrated throughout the codebase
|
||||
|
||||
## API Integration
|
||||
|
||||
The backend exposes a REST API via `manager_server.py` that enables:
|
||||
- Custom node management (install, update, disable, remove)
|
||||
- Model downloading and organization
|
||||
- System configuration
|
||||
- Snapshot management
|
||||
- Workflow component handling
|
||||
@@ -179,7 +179,7 @@ def install_node(node_id, version=None):
|
||||
else:
|
||||
url = f"{base_url}/nodes/{node_id}/install?version={version}"
|
||||
|
||||
response = requests.get(url)
|
||||
response = requests.get(url, verify=not manager_util.bypass_ssl)
|
||||
if response.status_code == 200:
|
||||
# Convert the API response to a NodeVersion object
|
||||
return map_node_version(response.json())
|
||||
@@ -190,7 +190,7 @@ def install_node(node_id, version=None):
|
||||
def all_versions_of_node(node_id):
|
||||
url = f"{base_url}/nodes/{node_id}/versions?statuses=NodeVersionStatusActive&statuses=NodeVersionStatusPending"
|
||||
|
||||
response = requests.get(url)
|
||||
response = requests.get(url, verify=not manager_util.bypass_ssl)
|
||||
if response.status_code == 200:
|
||||
return response.json()
|
||||
else:
|
||||
|
||||
@@ -46,6 +46,8 @@ def git_url(fullpath):
|
||||
|
||||
for k, v in config.items():
|
||||
if k.startswith('remote ') and 'url' in v:
|
||||
if 'Comfy-Org/ComfyUI-Manager' in v['url']:
|
||||
return "https://github.com/ltdrdata/ComfyUI-Manager"
|
||||
return v['url']
|
||||
|
||||
return None
|
||||
|
||||
@@ -43,7 +43,7 @@ import manager_downloader
|
||||
from node_package import InstalledNodePackage
|
||||
|
||||
|
||||
version_code = [3, 32, 3]
|
||||
version_code = [3, 36]
|
||||
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
|
||||
|
||||
|
||||
@@ -400,18 +400,86 @@ class ManagedResult:
|
||||
return self
|
||||
|
||||
|
||||
class NormalizedKeyDict:
|
||||
def __init__(self):
|
||||
self._store = {}
|
||||
self._key_map = {}
|
||||
|
||||
def _normalize_key(self, key):
|
||||
if isinstance(key, str):
|
||||
return key.strip().lower()
|
||||
return key
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
norm_key = self._normalize_key(key)
|
||||
self._key_map[norm_key] = key
|
||||
self._store[key] = value
|
||||
|
||||
def __getitem__(self, key):
|
||||
norm_key = self._normalize_key(key)
|
||||
original_key = self._key_map[norm_key]
|
||||
return self._store[original_key]
|
||||
|
||||
def __delitem__(self, key):
|
||||
norm_key = self._normalize_key(key)
|
||||
original_key = self._key_map.pop(norm_key)
|
||||
del self._store[original_key]
|
||||
|
||||
def __contains__(self, key):
|
||||
return self._normalize_key(key) in self._key_map
|
||||
|
||||
def get(self, key, default=None):
|
||||
return self[key] if key in self else default
|
||||
|
||||
def setdefault(self, key, default=None):
|
||||
if key in self:
|
||||
return self[key]
|
||||
self[key] = default
|
||||
return default
|
||||
|
||||
def pop(self, key, default=None):
|
||||
if key in self:
|
||||
val = self[key]
|
||||
del self[key]
|
||||
return val
|
||||
if default is not None:
|
||||
return default
|
||||
raise KeyError(key)
|
||||
|
||||
def keys(self):
|
||||
return self._store.keys()
|
||||
|
||||
def values(self):
|
||||
return self._store.values()
|
||||
|
||||
def items(self):
|
||||
return self._store.items()
|
||||
|
||||
def __iter__(self):
|
||||
return iter(self._store)
|
||||
|
||||
def __len__(self):
|
||||
return len(self._store)
|
||||
|
||||
def __repr__(self):
|
||||
return repr(self._store)
|
||||
|
||||
def to_dict(self):
|
||||
return dict(self._store)
|
||||
|
||||
|
||||
class UnifiedManager:
|
||||
def __init__(self):
|
||||
self.installed_node_packages: dict[str, InstalledNodePackage] = {}
|
||||
|
||||
self.cnr_inactive_nodes = {} # node_id -> node_version -> fullpath
|
||||
self.nightly_inactive_nodes = {} # node_id -> fullpath
|
||||
self.unknown_inactive_nodes = {} # node_id -> repo url * fullpath
|
||||
self.active_nodes = {} # node_id -> node_version * fullpath
|
||||
self.unknown_active_nodes = {} # node_id -> repo url * fullpath
|
||||
self.cnr_map = {} # node_id -> cnr info
|
||||
self.repo_cnr_map = {} # repo_url -> cnr info
|
||||
self.custom_node_map_cache = {} # (channel, mode) -> augmented custom node list json
|
||||
self.cnr_inactive_nodes = NormalizedKeyDict() # node_id -> node_version -> fullpath
|
||||
self.nightly_inactive_nodes = NormalizedKeyDict() # node_id -> fullpath
|
||||
self.unknown_inactive_nodes = {} # node_id -> repo url * fullpath
|
||||
self.active_nodes = NormalizedKeyDict() # node_id -> node_version * fullpath
|
||||
self.unknown_active_nodes = {} # node_id -> repo url * fullpath
|
||||
self.cnr_map = NormalizedKeyDict() # node_id -> cnr info
|
||||
self.repo_cnr_map = {} # repo_url -> cnr info
|
||||
self.custom_node_map_cache = {} # (channel, mode) -> augmented custom node list json
|
||||
self.processed_install = set()
|
||||
|
||||
def get_module_name(self, x):
|
||||
@@ -814,7 +882,7 @@ class UnifiedManager:
|
||||
channel = normalize_channel(channel)
|
||||
nodes = await self.load_nightly(channel, mode)
|
||||
|
||||
res = {}
|
||||
res = NormalizedKeyDict()
|
||||
added_cnr = set()
|
||||
for v in nodes.values():
|
||||
v = v[0]
|
||||
@@ -1643,11 +1711,13 @@ def read_config():
|
||||
config = configparser.ConfigParser(strict=False)
|
||||
config.read(manager_config_path)
|
||||
default_conf = config['default']
|
||||
manager_util.use_uv = default_conf['use_uv'].lower() == 'true' if 'use_uv' in default_conf else False
|
||||
|
||||
def get_bool(key, default_value):
|
||||
return default_conf[key].lower() == 'true' if key in default_conf else False
|
||||
|
||||
manager_util.use_uv = default_conf['use_uv'].lower() == 'true' if 'use_uv' in default_conf else False
|
||||
manager_util.bypass_ssl = get_bool('bypass_ssl', False)
|
||||
|
||||
return {
|
||||
'http_channel_enabled': get_bool('http_channel_enabled', False),
|
||||
'preview_method': default_conf.get('preview_method', manager_funcs.get_current_preview_method()).lower(),
|
||||
@@ -1670,16 +1740,20 @@ def read_config():
|
||||
}
|
||||
|
||||
except Exception:
|
||||
manager_util.use_uv = False
|
||||
import importlib.util
|
||||
# temporary disable `uv` on Windows by default (https://github.com/Comfy-Org/ComfyUI-Manager/issues/1969)
|
||||
manager_util.use_uv = importlib.util.find_spec("uv") is not None and platform.system() != "Windows"
|
||||
manager_util.bypass_ssl = False
|
||||
|
||||
return {
|
||||
'http_channel_enabled': False,
|
||||
'preview_method': manager_funcs.get_current_preview_method(),
|
||||
'git_exe': '',
|
||||
'use_uv': False,
|
||||
'use_uv': manager_util.use_uv,
|
||||
'channel_url': DEFAULT_CHANNEL,
|
||||
'default_cache_as_channel_url': False,
|
||||
'share_option': 'all',
|
||||
'bypass_ssl': False,
|
||||
'bypass_ssl': manager_util.bypass_ssl,
|
||||
'file_logging': True,
|
||||
'component_policy': 'workflow',
|
||||
'update_policy': 'stable-comfyui',
|
||||
@@ -2876,7 +2950,7 @@ async def get_unified_total_nodes(channel, mode, regsitry_cache_mode='cache'):
|
||||
|
||||
if cnr_id is not None:
|
||||
# cnr or nightly version
|
||||
cnr_ids.remove(cnr_id)
|
||||
cnr_ids.discard(cnr_id)
|
||||
updatable = False
|
||||
cnr = unified_manager.cnr_map[cnr_id]
|
||||
|
||||
@@ -3040,6 +3114,11 @@ async def restore_snapshot(snapshot_path, git_helper_extras=None):
|
||||
info = yaml.load(snapshot_file, Loader=yaml.SafeLoader)
|
||||
info = info['custom_nodes']
|
||||
|
||||
if 'pips' in info and info['pips']:
|
||||
pips = info['pips']
|
||||
else:
|
||||
pips = {}
|
||||
|
||||
# for cnr restore
|
||||
cnr_info = info.get('cnr_custom_nodes')
|
||||
if cnr_info is not None:
|
||||
@@ -3246,6 +3325,8 @@ async def restore_snapshot(snapshot_path, git_helper_extras=None):
|
||||
unified_manager.repo_install(repo_url, to_path, instant_execution=True, no_deps=False, return_postinstall=False)
|
||||
cloned_repos.append(repo_name)
|
||||
|
||||
manager_util.restore_pip_snapshot(pips, git_helper_extras)
|
||||
|
||||
# print summary
|
||||
for x in cloned_repos:
|
||||
print(f"[ INSTALLED ] {x}")
|
||||
|
||||
@@ -55,7 +55,11 @@ def download_url(model_url: str, model_dir: str, filename: str):
|
||||
return aria2_download_url(model_url, model_dir, filename)
|
||||
else:
|
||||
from torchvision.datasets.utils import download_url as torchvision_download_url
|
||||
return torchvision_download_url(model_url, model_dir, filename)
|
||||
try:
|
||||
return torchvision_download_url(model_url, model_dir, filename)
|
||||
except Exception as e:
|
||||
logging.error(f"[ComfyUI-Manager] Failed to download: {model_url} / {repr(e)}")
|
||||
raise
|
||||
|
||||
|
||||
def aria2_find_task(dir: str, filename: str):
|
||||
|
||||
@@ -181,7 +181,10 @@ def set_preview_method(method):
|
||||
core.get_config()['preview_method'] = method
|
||||
|
||||
|
||||
set_preview_method(core.get_config()['preview_method'])
|
||||
if args.preview_method == latent_preview.LatentPreviewMethod.NoPreviews:
|
||||
set_preview_method(core.get_config()['preview_method'])
|
||||
else:
|
||||
logging.warning("[ComfyUI-Manager] Since --preview-method is set, ComfyUI-Manager's preview method feature will be ignored.")
|
||||
|
||||
|
||||
def set_component_policy(mode):
|
||||
@@ -437,7 +440,10 @@ async def task_worker():
|
||||
|
||||
if res.ver == 'unknown':
|
||||
url = core.unified_manager.unknown_active_nodes[node_name][0]
|
||||
title = os.path.basename(url)
|
||||
try:
|
||||
title = os.path.basename(url)
|
||||
except Exception:
|
||||
title = node_name
|
||||
else:
|
||||
url = core.unified_manager.cnr_map[node_name].get('repository')
|
||||
title = core.unified_manager.cnr_map[node_name]['name']
|
||||
@@ -583,7 +589,7 @@ async def task_worker():
|
||||
return 'success'
|
||||
|
||||
except Exception as e:
|
||||
logging.error(f"[ComfyUI-Manager] ERROR: {e}", file=sys.stderr)
|
||||
logging.error(f"[ComfyUI-Manager] ERROR: {e}")
|
||||
|
||||
return f"Model installation error: {model_url}"
|
||||
|
||||
@@ -859,7 +865,7 @@ async def fetch_customnode_list(request):
|
||||
|
||||
channel = found
|
||||
|
||||
result = dict(channel=channel, node_packs=node_packs)
|
||||
result = dict(channel=channel, node_packs=node_packs.to_dict())
|
||||
|
||||
return web.json_response(result, content_type='application/json')
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import re
|
||||
import logging
|
||||
import platform
|
||||
import shlex
|
||||
import cm_global
|
||||
|
||||
|
||||
cache_lock = threading.Lock()
|
||||
@@ -24,7 +23,7 @@ comfyui_manager_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '
|
||||
cache_dir = os.path.join(comfyui_manager_path, '.cache') # This path is also updated together in **manager_core.update_user_directory**.
|
||||
|
||||
use_uv = False
|
||||
|
||||
bypass_ssl = False
|
||||
|
||||
def add_python_path_to_env():
|
||||
if platform.system() != "Windows":
|
||||
@@ -137,7 +136,7 @@ async def get_data(uri, silent=False):
|
||||
print(f"FETCH DATA from: {uri}", end="")
|
||||
|
||||
if uri.startswith("http"):
|
||||
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=False)) as session:
|
||||
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=not bypass_ssl)) as session:
|
||||
headers = {
|
||||
'Cache-Control': 'no-cache',
|
||||
'Pragma': 'no-cache',
|
||||
@@ -327,6 +326,32 @@ torch_torchvision_torchaudio_version_map = {
|
||||
}
|
||||
|
||||
|
||||
def torch_rollback(prev):
|
||||
spec = prev.split('+')
|
||||
if len(spec) > 1:
|
||||
platform = spec[1]
|
||||
else:
|
||||
cmd = make_pip_cmd(['install', '--force', 'torch', 'torchvision', 'torchaudio'])
|
||||
subprocess.check_output(cmd, universal_newlines=True)
|
||||
logging.error(cmd)
|
||||
return
|
||||
|
||||
torch_ver = StrictVersion(spec[0])
|
||||
torch_ver = f"{torch_ver.major}.{torch_ver.minor}.{torch_ver.patch}"
|
||||
torch_torchvision_torchaudio_ver = torch_torchvision_torchaudio_version_map.get(torch_ver)
|
||||
|
||||
if torch_torchvision_torchaudio_ver is None:
|
||||
cmd = make_pip_cmd(['install', '--pre', 'torch', 'torchvision', 'torchaudio',
|
||||
'--index-url', f"https://download.pytorch.org/whl/nightly/{platform}"])
|
||||
logging.info("[ComfyUI-Manager] restore PyTorch to nightly version")
|
||||
else:
|
||||
torchvision_ver, torchaudio_ver = torch_torchvision_torchaudio_ver
|
||||
cmd = make_pip_cmd(['install', f'torch=={torch_ver}', f'torchvision=={torchvision_ver}', f"torchaudio=={torchaudio_ver}",
|
||||
'--index-url', f"https://download.pytorch.org/whl/{platform}"])
|
||||
logging.info(f"[ComfyUI-Manager] restore PyTorch to {torch_ver}+{platform}")
|
||||
|
||||
subprocess.check_output(cmd, universal_newlines=True)
|
||||
|
||||
|
||||
class PIPFixer:
|
||||
def __init__(self, prev_pip_versions, comfyui_path, manager_files_path):
|
||||
@@ -334,32 +359,6 @@ class PIPFixer:
|
||||
self.comfyui_path = comfyui_path
|
||||
self.manager_files_path = manager_files_path
|
||||
|
||||
def torch_rollback(self):
|
||||
spec = self.prev_pip_versions['torch'].split('+')
|
||||
if len(spec) > 0:
|
||||
platform = spec[1]
|
||||
else:
|
||||
cmd = make_pip_cmd(['install', '--force', 'torch', 'torchvision', 'torchaudio'])
|
||||
subprocess.check_output(cmd, universal_newlines=True)
|
||||
logging.error(cmd)
|
||||
return
|
||||
|
||||
torch_ver = StrictVersion(spec[0])
|
||||
torch_ver = f"{torch_ver.major}.{torch_ver.minor}.{torch_ver.patch}"
|
||||
torch_torchvision_torchaudio_ver = torch_torchvision_torchaudio_version_map.get(torch_ver)
|
||||
|
||||
if torch_torchvision_torchaudio_ver is None:
|
||||
cmd = make_pip_cmd(['install', '--pre', 'torch', 'torchvision', 'torchaudio',
|
||||
'--index-url', f"https://download.pytorch.org/whl/nightly/{platform}"])
|
||||
logging.info("[ComfyUI-Manager] restore PyTorch to nightly version")
|
||||
else:
|
||||
torchvision_ver, torchaudio_ver = torch_torchvision_torchaudio_ver
|
||||
cmd = make_pip_cmd(['install', f'torch=={torch_ver}', f'torchvision=={torchvision_ver}', f"torchaudio=={torchaudio_ver}",
|
||||
'--index-url', f"https://download.pytorch.org/whl/{platform}"])
|
||||
logging.info(f"[ComfyUI-Manager] restore PyTorch to {torch_ver}+{platform}")
|
||||
|
||||
subprocess.check_output(cmd, universal_newlines=True)
|
||||
|
||||
def fix_broken(self):
|
||||
new_pip_versions = get_installed_packages(True)
|
||||
|
||||
@@ -381,7 +380,7 @@ class PIPFixer:
|
||||
elif self.prev_pip_versions['torch'] != new_pip_versions['torch'] \
|
||||
or self.prev_pip_versions['torchvision'] != new_pip_versions['torchvision'] \
|
||||
or self.prev_pip_versions['torchaudio'] != new_pip_versions['torchaudio']:
|
||||
self.torch_rollback()
|
||||
torch_rollback(self.prev_pip_versions['torch'])
|
||||
except Exception as e:
|
||||
logging.error("[ComfyUI-Manager] Failed to restore PyTorch")
|
||||
logging.error(e)
|
||||
@@ -412,32 +411,14 @@ class PIPFixer:
|
||||
|
||||
if len(targets) > 0:
|
||||
for x in targets:
|
||||
if sys.version_info < (3, 13):
|
||||
cmd = make_pip_cmd(['install', f"{x}=={versions[0].version_string}", "numpy<2"])
|
||||
subprocess.check_output(cmd, universal_newlines=True)
|
||||
cmd = make_pip_cmd(['install', f"{x}=={versions[0].version_string}"])
|
||||
subprocess.check_output(cmd, universal_newlines=True)
|
||||
|
||||
logging.info(f"[ComfyUI-Manager] 'opencv' dependencies were fixed: {targets}")
|
||||
except Exception as e:
|
||||
logging.error("[ComfyUI-Manager] Failed to restore opencv")
|
||||
logging.error(e)
|
||||
|
||||
# fix numpy
|
||||
if sys.version_info >= (3, 13):
|
||||
logging.info("[ComfyUI-Manager] In Python 3.13 and above, PIP Fixer does not downgrade `numpy` below version 2.0. If you need to force a downgrade of `numpy`, please use `pip_auto_fix.list`.")
|
||||
else:
|
||||
try:
|
||||
np = new_pip_versions.get('numpy')
|
||||
if cm_global.pip_overrides.get('numpy') == 'numpy<2':
|
||||
if np is not None:
|
||||
if StrictVersion(np) >= StrictVersion('2'):
|
||||
cmd = make_pip_cmd(['install', "numpy<2"])
|
||||
subprocess.check_output(cmd , universal_newlines=True)
|
||||
|
||||
logging.info("[ComfyUI-Manager] 'numpy' dependency were fixed")
|
||||
except Exception as e:
|
||||
logging.error("[ComfyUI-Manager] Failed to restore numpy")
|
||||
logging.error(e)
|
||||
|
||||
# fix missing frontend
|
||||
try:
|
||||
# NOTE: package name in requirements is 'comfyui-frontend-package'
|
||||
@@ -476,7 +457,7 @@ class PIPFixer:
|
||||
normalized_name = parsed['package'].lower().replace('-', '_')
|
||||
if normalized_name in new_pip_versions:
|
||||
if 'version' in parsed and 'operator' in parsed:
|
||||
cur = StrictVersion(new_pip_versions[parsed['package']])
|
||||
cur = StrictVersion(new_pip_versions[normalized_name])
|
||||
dest = parsed['version']
|
||||
op = parsed['operator']
|
||||
if cur == dest:
|
||||
@@ -537,3 +518,69 @@ def robust_readlines(fullpath):
|
||||
|
||||
print(f"[ComfyUI-Manager] Failed to recognize encoding for: {fullpath}")
|
||||
return []
|
||||
|
||||
|
||||
def restore_pip_snapshot(pips, options):
|
||||
non_url = []
|
||||
local_url = []
|
||||
non_local_url = []
|
||||
|
||||
for k, v in pips.items():
|
||||
# NOTE: skip torch related packages
|
||||
if k.startswith("torch==") or k.startswith("torchvision==") or k.startswith("torchaudio==") or k.startswith("nvidia-"):
|
||||
continue
|
||||
|
||||
if v == "":
|
||||
non_url.append(k)
|
||||
else:
|
||||
if v.startswith('file:'):
|
||||
local_url.append(v)
|
||||
else:
|
||||
non_local_url.append(v)
|
||||
|
||||
|
||||
# restore other pips
|
||||
failed = []
|
||||
if '--pip-non-url' in options:
|
||||
# try all at once
|
||||
res = 1
|
||||
try:
|
||||
res = subprocess.check_output(make_pip_cmd(['install'] + non_url))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# fallback
|
||||
if res != 0:
|
||||
for x in non_url:
|
||||
res = 1
|
||||
try:
|
||||
res = subprocess.check_output(make_pip_cmd(['install', '--no-deps', x]))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if res != 0:
|
||||
failed.append(x)
|
||||
|
||||
if '--pip-non-local-url' in options:
|
||||
for x in non_local_url:
|
||||
res = 1
|
||||
try:
|
||||
res = subprocess.check_output(make_pip_cmd(['install', '--no-deps', x]))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if res != 0:
|
||||
failed.append(x)
|
||||
|
||||
if '--pip-local-url' in options:
|
||||
for x in local_url:
|
||||
res = 1
|
||||
try:
|
||||
res = subprocess.check_output(make_pip_cmd(['install', '--no-deps', x]))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if res != 0:
|
||||
failed.append(x)
|
||||
|
||||
print(f"Installation failed for pip packages: {failed}")
|
||||
@@ -2,6 +2,8 @@ import sys
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
import manager_util
|
||||
|
||||
|
||||
def security_check():
|
||||
print("[START] Security scan")
|
||||
@@ -66,18 +68,23 @@ https://blog.comfy.org/comfyui-statement-on-the-ultralytics-crypto-miner-situati
|
||||
"lolMiner": [os.path.join(comfyui_path, 'lolMiner')]
|
||||
}
|
||||
|
||||
installed_pips = subprocess.check_output([sys.executable, '-m', "pip", "freeze"], text=True)
|
||||
installed_pips = subprocess.check_output(manager_util.make_pip_cmd(["freeze"]), text=True)
|
||||
|
||||
detected = set()
|
||||
try:
|
||||
anthropic_info = subprocess.check_output([sys.executable, '-m', "pip", "show", "anthropic"], text=True, stderr=subprocess.DEVNULL)
|
||||
anthropic_reqs = [x for x in anthropic_info.split('\n') if x.startswith("Requires")][0].split(': ')[1]
|
||||
if "pycrypto" in anthropic_reqs:
|
||||
location = [x for x in anthropic_info.split('\n') if x.startswith("Location")][0].split(': ')[1]
|
||||
for fi in os.listdir(location):
|
||||
if fi.startswith("anthropic"):
|
||||
guide["ComfyUI_LLMVISION"] = f"\n0.Remove {os.path.join(location, fi)}" + guide["ComfyUI_LLMVISION"]
|
||||
detected.add("ComfyUI_LLMVISION")
|
||||
anthropic_info = subprocess.check_output(manager_util.make_pip_cmd(["show", "anthropic"]), text=True, stderr=subprocess.DEVNULL)
|
||||
requires_lines = [x for x in anthropic_info.split('\n') if x.startswith("Requires")]
|
||||
if requires_lines:
|
||||
anthropic_reqs = requires_lines[0].split(": ", 1)[1]
|
||||
if "pycrypto" in anthropic_reqs:
|
||||
location_lines = [x for x in anthropic_info.split('\n') if x.startswith("Location")]
|
||||
if location_lines:
|
||||
location = location_lines[0].split(": ", 1)[1]
|
||||
for fi in os.listdir(location):
|
||||
if fi.startswith("anthropic"):
|
||||
guide["ComfyUI_LLMVISION"] = (f"\n0.Remove {os.path.join(location, fi)}" + guide["ComfyUI_LLMVISION"])
|
||||
detected.add("ComfyUI_LLMVISION")
|
||||
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
|
||||
50
js/README.md
Normal file
50
js/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# ComfyUI-Manager: Frontend (js)
|
||||
|
||||
This directory contains the JavaScript frontend implementation for ComfyUI-Manager, providing the user interface components that interact with the backend API.
|
||||
|
||||
## Core Components
|
||||
|
||||
- **comfyui-manager.js**: Main entry point that initializes the manager UI and integrates with ComfyUI.
|
||||
- **custom-nodes-manager.js**: Implements the UI for browsing, installing, and managing custom nodes.
|
||||
- **model-manager.js**: Handles the model management interface for downloading and organizing AI models.
|
||||
- **components-manager.js**: Manages reusable workflow components system.
|
||||
- **snapshot.js**: Implements the snapshot system for backing up and restoring installations.
|
||||
|
||||
## Sharing Components
|
||||
|
||||
- **comfyui-share-common.js**: Base functionality for workflow sharing features.
|
||||
- **comfyui-share-copus.js**: Integration with the ComfyUI Opus sharing platform.
|
||||
- **comfyui-share-openart.js**: Integration with the OpenArt sharing platform.
|
||||
- **comfyui-share-youml.js**: Integration with the YouML sharing platform.
|
||||
|
||||
## Utility Components
|
||||
|
||||
- **cm-api.js**: Client-side API wrapper for communication with the backend.
|
||||
- **common.js**: Shared utilities and helper functions used across the frontend.
|
||||
- **node_fixer.js**: Utilities for fixing disconnected links and repairing malformed nodes by recreating them while preserving connections.
|
||||
- **popover-helper.js**: UI component for popup tooltips and contextual information.
|
||||
- **turbogrid.esm.js**: Grid component library - https://github.com/cenfun/turbogrid
|
||||
- **workflow-metadata.js**: Handles workflow metadata parsing, validation and cross-repository compatibility including versioning, dependencies tracking, and resource management.
|
||||
|
||||
## Architecture
|
||||
|
||||
The frontend follows a modular component-based architecture:
|
||||
|
||||
1. **Integration Layer**: Connects with ComfyUI's existing UI system
|
||||
2. **Manager Components**: Individual functional UI components (node manager, model manager, etc.)
|
||||
3. **Sharing Components**: Platform-specific sharing implementations
|
||||
4. **Utility Layer**: Reusable UI components and helpers
|
||||
|
||||
## Implementation Details
|
||||
|
||||
- The frontend integrates directly with ComfyUI's UI system through `app.js`
|
||||
- Dialog-based UI for most manager functions to avoid cluttering the main interface
|
||||
- Asynchronous API calls to handle backend operations without blocking the UI
|
||||
|
||||
## Styling
|
||||
|
||||
CSS files are included for specific components:
|
||||
- **custom-nodes-manager.css**: Styling for the node management UI
|
||||
- **model-manager.css**: Styling for the model management UI
|
||||
|
||||
This frontend implementation provides a comprehensive yet user-friendly interface for managing the ComfyUI ecosystem.
|
||||
@@ -71,7 +71,7 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
this.allFiles = [];
|
||||
this.titleNum = 0;
|
||||
}
|
||||
|
||||
|
||||
createButtons() {
|
||||
const inputStyle = {
|
||||
display: "block",
|
||||
@@ -201,13 +201,15 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
});
|
||||
this.LockInput = $el("input", {
|
||||
type: "text",
|
||||
placeholder: "",
|
||||
style: {
|
||||
placeholder: "0",
|
||||
style: {
|
||||
width: "100px",
|
||||
padding: "7px",
|
||||
paddingLeft: "30px",
|
||||
borderRadius: "4px",
|
||||
border: "1px solid #ddd",
|
||||
boxSizing: "border-box",
|
||||
position: "relative",
|
||||
},
|
||||
oninput: (event) => {
|
||||
let input = event.target.value;
|
||||
@@ -301,7 +303,7 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
|
||||
const titleNumDom = $el(
|
||||
"label",
|
||||
{
|
||||
@@ -342,15 +344,11 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
["0/70"]
|
||||
);
|
||||
// Additional Inputs Section
|
||||
const additionalInputsSection = $el(
|
||||
"div",
|
||||
{ style: { ...sectionStyle, } },
|
||||
[
|
||||
$el("label", { style: labelStyle }, ["3️⃣ Title "]),
|
||||
this.TitleInput,
|
||||
titleNumDom,
|
||||
]
|
||||
);
|
||||
const additionalInputsSection = $el("div", { style: { ...sectionStyle } }, [
|
||||
$el("label", { style: labelStyle }, ["3️⃣ Title "]),
|
||||
this.TitleInput,
|
||||
titleNumDom,
|
||||
]);
|
||||
const SubtitleSection = $el("div", { style: sectionStyle }, [
|
||||
$el("label", { style: labelStyle }, ["4️⃣ Subtitle "]),
|
||||
this.SubTitleInput,
|
||||
@@ -379,7 +377,7 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
});
|
||||
|
||||
const blockChainSection_lock = $el("div", { style: sectionStyle }, [
|
||||
$el("label", { style: labelStyle }, ["6️⃣ Pay to download"]),
|
||||
$el("label", { style: labelStyle }, ["6️⃣ Download threshold"]),
|
||||
$el(
|
||||
"label",
|
||||
{
|
||||
@@ -392,11 +390,42 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
},
|
||||
[
|
||||
this.radioButtonsCheck_lock,
|
||||
$el("div", { style: { marginLeft: "5px" ,display:'flex',alignItems:'center'} }, [
|
||||
$el("span", { style: { marginLeft: "5px" } }, ["ON"]),
|
||||
$el("span", { style: { marginLeft: "20px",marginRight:'10px' ,color:'#fff'} }, ["Price US$"]),
|
||||
this.LockInput
|
||||
]),
|
||||
$el(
|
||||
"div",
|
||||
{
|
||||
style: {
|
||||
marginLeft: "5px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
position: "relative",
|
||||
},
|
||||
},
|
||||
[
|
||||
$el("span", { style: { marginLeft: "5px" } }, ["ON"]),
|
||||
$el(
|
||||
"span",
|
||||
{
|
||||
style: {
|
||||
marginLeft: "20px",
|
||||
marginRight: "10px",
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
["Unlock with"]
|
||||
),
|
||||
$el("img", {
|
||||
style: {
|
||||
width: "16px",
|
||||
height: "16px",
|
||||
position: "absolute",
|
||||
right: "75px",
|
||||
zIndex: "100",
|
||||
},
|
||||
src: "https://static.copus.io/images/admin/202507/prod/e2919a1d8f3c2d99d3b8fe27ff94b841.png",
|
||||
}),
|
||||
this.LockInput,
|
||||
]
|
||||
),
|
||||
]
|
||||
),
|
||||
$el(
|
||||
@@ -404,14 +433,25 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
{ style: { display: "flex", alignItems: "center", cursor: "pointer" } },
|
||||
[
|
||||
this.radioButtonsCheckOff_lock,
|
||||
$el("span", { style: { marginLeft: "5px" } }, ["OFF"]),
|
||||
$el(
|
||||
"div",
|
||||
{
|
||||
style: {
|
||||
marginLeft: "5px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
},
|
||||
},
|
||||
[$el("span", { style: { marginLeft: "5px" } }, ["OFF"])]
|
||||
),
|
||||
]
|
||||
),
|
||||
|
||||
|
||||
$el(
|
||||
"p",
|
||||
{ style: { fontSize: "16px", color: "#fff", margin: "10px 0 0 0" } },
|
||||
["Get paid from your workflow. You can change the price and withdraw your earnings on Copus."]
|
||||
[
|
||||
]
|
||||
),
|
||||
]);
|
||||
|
||||
@@ -432,7 +472,7 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
});
|
||||
|
||||
const blockChainSection = $el("div", { style: sectionStyle }, [
|
||||
$el("label", { style: labelStyle }, ["7️⃣ Store on blockchain "]),
|
||||
$el("label", { style: labelStyle }, ["8️⃣ Store on blockchain "]),
|
||||
$el(
|
||||
"label",
|
||||
{
|
||||
@@ -463,6 +503,139 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
),
|
||||
]);
|
||||
|
||||
this.ratingRadioButtonsCheck0 = $el("input", {
|
||||
type: "radio",
|
||||
name: "content_rating",
|
||||
value: "0",
|
||||
id: "content_rating0",
|
||||
});
|
||||
this.ratingRadioButtonsCheck1 = $el("input", {
|
||||
type: "radio",
|
||||
name: "content_rating",
|
||||
value: "1",
|
||||
id: "content_rating1",
|
||||
});
|
||||
this.ratingRadioButtonsCheck2 = $el("input", {
|
||||
type: "radio",
|
||||
name: "content_rating",
|
||||
value: "2",
|
||||
id: "content_rating2",
|
||||
});
|
||||
this.ratingRadioButtonsCheck_1 = $el("input", {
|
||||
type: "radio",
|
||||
name: "content_rating",
|
||||
value: "-1",
|
||||
id: "content_rating_1",
|
||||
checked: true,
|
||||
});
|
||||
|
||||
// content rating
|
||||
const contentRatingSection = $el("div", { style: sectionStyle }, [
|
||||
$el("label", { style: labelStyle }, ["7️⃣ Content rating "]),
|
||||
$el(
|
||||
"label",
|
||||
{
|
||||
style: {
|
||||
marginTop: "10px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
cursor: "pointer",
|
||||
},
|
||||
},
|
||||
[
|
||||
this.ratingRadioButtonsCheck0,
|
||||
$el("img", {
|
||||
style: {
|
||||
width: "12px",
|
||||
height: "12px",
|
||||
marginLeft: "5px",
|
||||
},
|
||||
src: "https://static.copus.io/images/client/202507/test/b9f17da83b054d53cd0cb4508c2c30dc.png",
|
||||
}),
|
||||
$el("span", { style: { marginLeft: "5px", color: "#fff" } }, [
|
||||
"All ages",
|
||||
]),
|
||||
]
|
||||
),
|
||||
$el(
|
||||
"p",
|
||||
{ style: { fontSize: "10px", color: "#fff", marginLeft: "20px" } },
|
||||
["Safe for all viewers; no profanity, violence, or mature themes."]
|
||||
),
|
||||
$el(
|
||||
"label",
|
||||
{ style: { display: "flex", alignItems: "center", cursor: "pointer" } },
|
||||
[
|
||||
this.ratingRadioButtonsCheck1,
|
||||
$el("img", {
|
||||
style: {
|
||||
width: "12px",
|
||||
height: "12px",
|
||||
marginLeft: "5px",
|
||||
},
|
||||
src: "https://static.copus.io/images/client/202507/test/7848bc0d3690671df21c7cf00c4cfc81.png",
|
||||
}),
|
||||
$el("span", { style: { marginLeft: "5px", color: "#fff" } }, [
|
||||
"13+ (Teen)",
|
||||
]),
|
||||
]
|
||||
),
|
||||
$el(
|
||||
"p",
|
||||
{ style: { fontSize: "10px", color: "#fff", marginLeft: "20px" } },
|
||||
[
|
||||
"Mild language, light themes, or cartoon violence; no explicit content. ",
|
||||
]
|
||||
),
|
||||
$el(
|
||||
"label",
|
||||
{ style: { display: "flex", alignItems: "center", cursor: "pointer" } },
|
||||
[
|
||||
this.ratingRadioButtonsCheck2,
|
||||
$el("img", {
|
||||
style: {
|
||||
width: "12px",
|
||||
height: "12px",
|
||||
marginLeft: "5px",
|
||||
},
|
||||
src: "https://static.copus.io/images/client/202507/test/bc51839c208d68d91173e43c23bff039.png",
|
||||
}),
|
||||
$el("span", { style: { marginLeft: "5px", color: "#fff" } }, [
|
||||
"18+ (Explicit)",
|
||||
]),
|
||||
]
|
||||
),
|
||||
$el(
|
||||
"p",
|
||||
{ style: { fontSize: "10px", color: "#fff", marginLeft: "20px" } },
|
||||
[
|
||||
"Explicit content, including sexual content, strong violence, or intense themes. ",
|
||||
]
|
||||
),
|
||||
$el(
|
||||
"label",
|
||||
{ style: { display: "flex", alignItems: "center", cursor: "pointer" } },
|
||||
[
|
||||
this.ratingRadioButtonsCheck_1,
|
||||
$el("img", {
|
||||
style: {
|
||||
width: "12px",
|
||||
height: "12px",
|
||||
marginLeft: "5px",
|
||||
},
|
||||
src: "https://static.copus.io/images/client/202507/test/5c802fdcaaea4e7bbed37393eec0d5ba.png",
|
||||
}),
|
||||
$el("span", { style: { marginLeft: "5px", color: "#fff" } }, [
|
||||
"Not Rated",
|
||||
]),
|
||||
]
|
||||
),
|
||||
$el(
|
||||
"p",
|
||||
{ style: { fontSize: "10px", color: "#fff", marginLeft: "20px" } },
|
||||
["No age rating provided."]
|
||||
),
|
||||
]);
|
||||
|
||||
// Message Section
|
||||
this.message = $el(
|
||||
@@ -526,6 +699,7 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
DescriptionSection,
|
||||
// contestSection,
|
||||
blockChainSection_lock,
|
||||
contentRatingSection,
|
||||
blockChainSection,
|
||||
this.message,
|
||||
buttonsSection,
|
||||
@@ -534,7 +708,7 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
return layout;
|
||||
}
|
||||
/**
|
||||
* api
|
||||
* api
|
||||
* @param {url} path
|
||||
* @param {params} options
|
||||
* @param {statusText} statusText
|
||||
@@ -587,7 +761,9 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
url: data,
|
||||
});
|
||||
} else {
|
||||
throw new Error("make sure your API key is correct and try again later");
|
||||
throw new Error(
|
||||
"make sure your API key is correct and try again later"
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
if (e?.response?.status === 413) {
|
||||
@@ -628,8 +804,15 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
subTitle: this.SubTitleInput.value,
|
||||
content: this.descriptionInput.value,
|
||||
storeOnChain: this.radioButtonsCheck.checked ? true : false,
|
||||
lockState:this.radioButtonsCheck_lock.checked ? 2 : 0,
|
||||
unlockPrice:this.LockInput.value,
|
||||
lockState: this.radioButtonsCheck_lock.checked ? 2 : 0,
|
||||
unlockPrice: this.LockInput.value,
|
||||
rating: this.ratingRadioButtonsCheck0.checked
|
||||
? 0
|
||||
: this.ratingRadioButtonsCheck1.checked
|
||||
? 1
|
||||
: this.ratingRadioButtonsCheck2.checked
|
||||
? 2
|
||||
: -1,
|
||||
};
|
||||
|
||||
if (!this.keyInput.value) {
|
||||
@@ -644,8 +827,8 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
throw new Error("Title is required");
|
||||
}
|
||||
|
||||
if(this.radioButtonsCheck_lock.checked){
|
||||
if (!this.LockInput.value){
|
||||
if (this.radioButtonsCheck_lock.checked) {
|
||||
if (!this.LockInput.value) {
|
||||
throw new Error("Price is required");
|
||||
}
|
||||
}
|
||||
@@ -695,23 +878,23 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
"Uploading workflow..."
|
||||
);
|
||||
|
||||
if (res.status && res.data.status && res.data) {
|
||||
localStorage.setItem("copus_token",this.keyInput.value);
|
||||
const { data } = res.data;
|
||||
if (data) {
|
||||
const url = `${DEFAULT_HOMEPAGE_URL}/work/${data}`;
|
||||
this.message.innerHTML = `Workflow has been shared successfully. <a href="${url}" target="_blank">Click here to view it.</a>`;
|
||||
this.previewImage.src = "";
|
||||
this.previewImage.style.display = "none";
|
||||
this.uploadedImages = [];
|
||||
this.allFilesImages = [];
|
||||
this.allFiles = [];
|
||||
this.TitleInput.value = "";
|
||||
this.SubTitleInput.value = "";
|
||||
this.descriptionInput.value = "";
|
||||
this.selectedFile = null;
|
||||
}
|
||||
}
|
||||
if (res.status && res.data.status && res.data) {
|
||||
localStorage.setItem("copus_token", this.keyInput.value);
|
||||
const { data } = res.data;
|
||||
if (data) {
|
||||
const url = `${DEFAULT_HOMEPAGE_URL}/work/${data}`;
|
||||
this.message.innerHTML = `Workflow has been shared successfully. <a href="${url}" target="_blank">Click here to view it.</a>`;
|
||||
this.previewImage.src = "";
|
||||
this.previewImage.style.display = "none";
|
||||
this.uploadedImages = [];
|
||||
this.allFilesImages = [];
|
||||
this.allFiles = [];
|
||||
this.TitleInput.value = "";
|
||||
this.SubTitleInput.value = "";
|
||||
this.descriptionInput.value = "";
|
||||
this.selectedFile = null;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error("Error sharing workflow: " + e.message);
|
||||
}
|
||||
@@ -757,7 +940,7 @@ export class CopusShareDialog extends ComfyDialog {
|
||||
this.element.style.display = "block";
|
||||
this.previewImage.src = "";
|
||||
this.previewImage.style.display = "none";
|
||||
this.keyInput.value = apiToken!=null?apiToken:"";
|
||||
this.keyInput.value = apiToken != null ? apiToken : "";
|
||||
this.uploadedImages = [];
|
||||
this.allFilesImages = [];
|
||||
this.allFiles = [];
|
||||
|
||||
@@ -714,6 +714,7 @@ export class CustomNodesManager {
|
||||
link.href = rowItem.reference;
|
||||
link.target = '_blank';
|
||||
link.innerHTML = `<b>${title}</b>`;
|
||||
link.title = rowItem.originalData.id;
|
||||
container.appendChild(link);
|
||||
|
||||
return container;
|
||||
@@ -1624,17 +1625,35 @@ export class CustomNodesManager {
|
||||
getNodesInWorkflow() {
|
||||
let usedGroupNodes = new Set();
|
||||
let allUsedNodes = {};
|
||||
const visitedGraphs = new Set();
|
||||
|
||||
for(let k in app.graph._nodes) {
|
||||
let node = app.graph._nodes[k];
|
||||
const visitGraph = (graph) => {
|
||||
if (!graph || visitedGraphs.has(graph)) return;
|
||||
visitedGraphs.add(graph);
|
||||
|
||||
if(node.type.startsWith('workflow>')) {
|
||||
usedGroupNodes.add(node.type.slice(9));
|
||||
continue;
|
||||
const nodes = graph._nodes || graph.nodes || [];
|
||||
for(let k in nodes) {
|
||||
let node = nodes[k];
|
||||
if (!node) continue;
|
||||
|
||||
// If it's a SubgraphNode, recurse into its graph and continue searching
|
||||
if (node.isSubgraphNode?.() && node.subgraph) {
|
||||
visitGraph(node.subgraph);
|
||||
}
|
||||
|
||||
if (!node.type) continue;
|
||||
|
||||
// Group nodes / components
|
||||
if(typeof node.type === 'string' && node.type.startsWith('workflow>')) {
|
||||
usedGroupNodes.add(node.type.slice(9));
|
||||
continue;
|
||||
}
|
||||
|
||||
allUsedNodes[node.type] = node;
|
||||
}
|
||||
};
|
||||
|
||||
allUsedNodes[node.type] = node;
|
||||
}
|
||||
visitGraph(app.graph);
|
||||
|
||||
for(let k of usedGroupNodes) {
|
||||
let subnodes = app.graph.extra.groupNodes[k]?.nodes;
|
||||
|
||||
@@ -153,6 +153,7 @@ app.registerExtension({
|
||||
app.canvas.graph.add(new_node, false);
|
||||
node_info_copy(this, new_node, true);
|
||||
app.canvas.graph.remove(this);
|
||||
requestAnimationFrame(() => app.canvas.setDirty(true, true))
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
303
model-list.json
303
model-list.json
@@ -1973,6 +1973,97 @@
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth",
|
||||
"size": "375.0MB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sam2.1_hiera_tiny.pt",
|
||||
"type": "sam2.1",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2.1 hiera model (tiny)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2.1_hiera_tiny.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_tiny.pt",
|
||||
"size": "149.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2.1_hiera_small.pt",
|
||||
"type": "sam2.1",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2.1 hiera model (small)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2.1_hiera_small.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_small.pt",
|
||||
"size": "176.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2.1_hiera_base_plus.pt",
|
||||
"type": "sam2.1",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2.1 hiera model (base+)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2.1_hiera_base_plus.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_base_plus.pt",
|
||||
"size": "309.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2.1_hiera_large.pt",
|
||||
"type": "sam2.1",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2.1 hiera model (large)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2.1_hiera_large.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_large.pt",
|
||||
"size": "857.0MB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sam2_hiera_tiny.pt",
|
||||
"type": "sam2",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2 hiera model (tiny)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2_hiera_tiny.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_tiny.pt",
|
||||
"size": "149.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2_hiera_small.pt",
|
||||
"type": "sam2",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2 hiera model (small)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2_hiera_small.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_small.pt",
|
||||
"size": "176.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2_hiera_base_plus.pt",
|
||||
"type": "sam2",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2 hiera model (base+)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2_hiera_base_plus.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_base_plus.pt",
|
||||
"size": "309.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2_hiera_large.pt",
|
||||
"type": "sam2",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2 hiera model (large)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2_hiera_large.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_large.pt",
|
||||
"size": "857.0MB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "seecoder v1.0",
|
||||
"type": "seecoder",
|
||||
@@ -4006,6 +4097,29 @@
|
||||
"size": "649MB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Comfy-Org/omnigen2_fp16.safetensors",
|
||||
"type": "diffusion_model",
|
||||
"base": "OmniGen2",
|
||||
"save_path": "default",
|
||||
"description": "OmniGen2 diffusion model. This is required for using OmniGen2.",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Omnigen2_ComfyUI_repackaged",
|
||||
"filename": "omnigen2_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Omnigen2_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/omnigen2_fp16.safetensors",
|
||||
"size": "7.93GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/qwen_2.5_vl_fp16.safetensors",
|
||||
"type": "clip",
|
||||
"base": "qwen-2.5",
|
||||
"save_path": "default",
|
||||
"description": "text encoder for OmniGen2",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Omnigen2_ComfyUI_repackaged",
|
||||
"filename": "qwen_2.5_vl_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Omnigen2_ComfyUI_repackaged/resolve/main/split_files/text_encoders/qwen_2.5_vl_fp16.safetensors",
|
||||
"size": "7.51GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "FLUX.1 [Schnell] Diffusion model",
|
||||
"type": "diffusion_model",
|
||||
@@ -4023,7 +4137,7 @@
|
||||
"type": "VAE",
|
||||
"base": "FLUX.1",
|
||||
"save_path": "vae/FLUX1",
|
||||
"description": "FLUX.1 VAE model",
|
||||
"description": "FLUX.1 VAE model\nNOTE: This VAE model can also be used for image generation with OmniGen2.",
|
||||
"reference": "https://huggingface.co/black-forest-labs/FLUX.1-schnell",
|
||||
"filename": "ae.safetensors",
|
||||
"url": "https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors",
|
||||
@@ -4931,6 +5045,105 @@
|
||||
"size": "1.26GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 i2v high noise 14B (fp16)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for i2v high noise 14B (fp16)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_i2v_high_noise_14B_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp16.safetensors",
|
||||
"size": "28.6GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 i2v high noise 14B (fp8_scaled)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for i2v high noise 14B (fp8_scaled)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors",
|
||||
"size": "14.3GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 i2v low noise 14B (fp16)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for i2v low noise 14B (fp16)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_i2v_low_noise_14B_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp16.safetensors",
|
||||
"size": "28.6GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 i2v low noise 14B (fp8_scaled)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for i2v low noise 14B (fp8_scaled)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors",
|
||||
"size": "14.3GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 t2v high noise 14B (fp16)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for t2v high noise 14B (fp16)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_t2v_high_noise_14B_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp16.safetensors",
|
||||
"size": "28.6GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 t2v high noise 14B (fp8_scaled)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for t2v high noise 14B (fp8_scaled)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
|
||||
"size": "14.3GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 t2v low noise 14B (fp16)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for t2v low noise 14B (fp16)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_t2v_low_noise_14B_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp16.safetensors",
|
||||
"size": "28.6GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 t2v low noise 14B (fp8_scaled)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for t2v low noise 14B (fp8_scaled)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
|
||||
"size": "14.3GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 ti2v 5B (fp16)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for ti2v 5B (fp16)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_ti2v_5B_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors",
|
||||
"size": "10.0GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Comfy-Org/umt5_xxl_fp16.safetensors",
|
||||
@@ -5033,6 +5246,50 @@
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video/resolve/main/ltxv-13b-0.9.7-distilled-fp8.safetensors",
|
||||
"size": "15.7GB"
|
||||
},
|
||||
{
|
||||
"name": "LTX-Video 2B Distilled v0.9.8",
|
||||
"type": "checkpoint",
|
||||
"base": "LTX-Video",
|
||||
"save_path": "checkpoints/LTXV",
|
||||
"description": "LTX-Video 2B distilled model v0.9.8 with improved prompt understanding and detail generation.",
|
||||
"reference": "https://huggingface.co/Lightricks/LTX-Video",
|
||||
"filename": "ltxv-2b-0.9.8-distilled.safetensors",
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video/resolve/main/ltxv-2b-0.9.8-distilled.safetensors",
|
||||
"size": "6.34GB"
|
||||
},
|
||||
{
|
||||
"name": "LTX-Video 2B Distilled FP8 v0.9.8",
|
||||
"type": "checkpoint",
|
||||
"base": "LTX-Video",
|
||||
"save_path": "checkpoints/LTXV",
|
||||
"description": "Quantized LTX-Video 2B distilled model v0.9.8 with improved prompt understanding and detail generation, optimized for lower VRAM usage.",
|
||||
"reference": "https://huggingface.co/Lightricks/LTX-Video",
|
||||
"filename": "ltxv-2b-0.9.8-distilled-fp8.safetensors",
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video/resolve/main/ltxv-2b-0.9.8-distilled-fp8.safetensors",
|
||||
"size": "4.46GB"
|
||||
},
|
||||
{
|
||||
"name": "LTX-Video 13B Distilled v0.9.8",
|
||||
"type": "checkpoint",
|
||||
"base": "LTX-Video",
|
||||
"save_path": "checkpoints/LTXV",
|
||||
"description": "LTX-Video 13B distilled model v0.9.8 with improved prompt understanding and detail generation.",
|
||||
"reference": "https://huggingface.co/Lightricks/LTX-Video",
|
||||
"filename": "ltxv-13b-0.9.8-distilled.safetensors",
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video/resolve/main/ltxv-13b-0.9.8-distilled.safetensors",
|
||||
"size": "28.6GB"
|
||||
},
|
||||
{
|
||||
"name": "LTX-Video 13B Distilled FP8 v0.9.8",
|
||||
"type": "checkpoint",
|
||||
"base": "LTX-Video",
|
||||
"save_path": "checkpoints/LTXV",
|
||||
"description": "Quantized LTX-Video 13B distilled model v0.9.8 with improved prompt understanding and detail generation, optimized for lower VRAM usage.",
|
||||
"reference": "https://huggingface.co/Lightricks/LTX-Video",
|
||||
"filename": "ltxv-13b-0.9.8-distilled-fp8.safetensors",
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video/resolve/main/ltxv-13b-0.9.8-distilled-fp8.safetensors",
|
||||
"size": "15.7GB"
|
||||
},
|
||||
{
|
||||
"name": "LTX-Video 13B Distilled LoRA v0.9.7",
|
||||
"type": "lora",
|
||||
@@ -5044,6 +5301,50 @@
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video/resolve/main/ltxv-13b-0.9.7-distilled-lora128.safetensors",
|
||||
"size": "1.33GB"
|
||||
},
|
||||
{
|
||||
"name": "LTX-Video ICLoRA Depth 13B v0.9.7",
|
||||
"type": "lora",
|
||||
"base": "LTX-Video",
|
||||
"save_path": "loras",
|
||||
"description": "In-Context LoRA (IC LoRA) for depth-controlled video-to-video generation with precise depth conditioning.",
|
||||
"reference": "https://huggingface.co/Lightricks/LTX-Video-ICLoRA-depth-13b-0.9.7",
|
||||
"filename": "ltxv-097-ic-lora-depth-control-comfyui.safetensors",
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video-ICLoRA-depth-13b-0.9.7/resolve/main/ltxv-097-ic-lora-depth-control-comfyui.safetensors",
|
||||
"size": "81.9MB"
|
||||
},
|
||||
{
|
||||
"name": "LTX-Video ICLoRA Pose 13B v0.9.7",
|
||||
"type": "lora",
|
||||
"base": "LTX-Video",
|
||||
"save_path": "loras",
|
||||
"description": "In-Context LoRA (IC LoRA) for pose-controlled video-to-video generation with precise pose conditioning.",
|
||||
"reference": "https://huggingface.co/Lightricks/LTX-Video-ICLoRA-pose-13b-0.9.7",
|
||||
"filename": "ltxv-097-ic-lora-pose-control-comfyui.safetensors",
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video-ICLoRA-pose-13b-0.9.7/resolve/main/ltxv-097-ic-lora-pose-control-comfyui.safetensors",
|
||||
"size": "151MB"
|
||||
},
|
||||
{
|
||||
"name": "LTX-Video ICLoRA Canny 13B v0.9.7",
|
||||
"type": "lora",
|
||||
"base": "LTX-Video",
|
||||
"save_path": "loras",
|
||||
"description": "In-Context LoRA (IC LoRA) for canny edge-controlled video-to-video generation with precise edge conditioning.",
|
||||
"reference": "https://huggingface.co/Lightricks/LTX-Video-ICLoRA-canny-13b-0.9.7",
|
||||
"filename": "ltxv-097-ic-lora-canny-control-comfyui.safetensors",
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video-ICLoRA-canny-13b-0.9.7/resolve/main/ltxv-097-ic-lora-canny-control-comfyui.safetensors",
|
||||
"size": "81.9MB"
|
||||
},
|
||||
{
|
||||
"name": "LTX-Video ICLoRA Detailer 13B v0.9.8",
|
||||
"type": "lora",
|
||||
"base": "LTX-Video",
|
||||
"save_path": "loras",
|
||||
"description": "A video detailer model on top of LTXV_13B_098_DEV trained on custom data using In-Context LoRA (IC LoRA) method.",
|
||||
"reference": "https://huggingface.co/Lightricks/LTX-Video-ICLoRA-detailer-13b-0.9.8",
|
||||
"filename": "ltxv-098-ic-lora-detailer-comfyui.safetensors",
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video-ICLoRA-detailer-13b-0.9.8/resolve/main/ltxv-098-ic-lora-detailer-comfyui.safetensors",
|
||||
"size": "1.31GB"
|
||||
},
|
||||
{
|
||||
"name": "Latent Bridge Matching for Image Relighting",
|
||||
"type": "diffusion_model",
|
||||
|
||||
95
node_db/README.md
Normal file
95
node_db/README.md
Normal file
@@ -0,0 +1,95 @@
|
||||
# ComfyUI-Manager: Node Database (node_db)
|
||||
|
||||
This directory contains the JSON database files that power ComfyUI-Manager's legacy node registry system. While the manager is gradually transitioning to the online Custom Node Registry (CNR), these local JSON files continue to provide important metadata about custom nodes, models, and their integrations.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
The node_db directory is organized into several subdirectories, each serving a specific purpose:
|
||||
|
||||
- **dev/**: Development channel files with latest additions and experimental nodes
|
||||
- **legacy/**: Historical/legacy nodes that may require special handling
|
||||
- **new/**: New nodes that have passed initial verification but are still being evaluated
|
||||
- **forked/**: Forks of existing nodes with modifications
|
||||
- **tutorial/**: Example and tutorial nodes designed for learning purposes
|
||||
|
||||
## Core Database Files
|
||||
|
||||
Each subdirectory contains a standard set of JSON files:
|
||||
|
||||
- **custom-node-list.json**: Primary database of custom nodes with metadata
|
||||
- **extension-node-map.json**: Maps between extensions and individual nodes they provide
|
||||
- **model-list.json**: Catalog of models that can be downloaded through the manager
|
||||
- **alter-list.json**: Alternative implementations of nodes for compatibility or functionality
|
||||
- **github-stats.json**: GitHub repository statistics for node popularity metrics
|
||||
|
||||
## Database Schema
|
||||
|
||||
### custom-node-list.json
|
||||
```json
|
||||
{
|
||||
"custom_nodes": [
|
||||
{
|
||||
"title": "Node display name",
|
||||
"name": "Repository name",
|
||||
"reference": "Original repository if forked",
|
||||
"files": ["GitHub URL or other source location"],
|
||||
"install_type": "git",
|
||||
"description": "Description of the node's functionality",
|
||||
"pip": ["optional pip dependencies"],
|
||||
"js": ["optional JavaScript files"],
|
||||
"tags": ["categorization tags"]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### extension-node-map.json
|
||||
```json
|
||||
{
|
||||
"extension-id": [
|
||||
["list", "of", "node", "classes"],
|
||||
{
|
||||
"author": "Author name",
|
||||
"description": "Extension description",
|
||||
"nodename_pattern": "Optional regex pattern for node name matching"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Transition to Custom Node Registry (CNR)
|
||||
|
||||
This local database system is being progressively replaced by the online Custom Node Registry (CNR), which provides:
|
||||
- Real-time updates without manual JSON maintenance
|
||||
- Improved versioning support
|
||||
- Better security validation
|
||||
- Enhanced metadata
|
||||
|
||||
The Manager supports both systems simultaneously during the transition period.
|
||||
|
||||
## Implementation Details
|
||||
|
||||
- The database follows a channel-based architecture for different sources
|
||||
- Multiple database modes are supported: Channel, Local, and Remote
|
||||
- The system supports differential updates to minimize bandwidth usage
|
||||
- Security levels are enforced for different node installations based on source
|
||||
|
||||
## Usage in the Application
|
||||
|
||||
The Manager's backend uses these database files to:
|
||||
|
||||
1. Provide browsable lists of available nodes and models
|
||||
2. Resolve dependencies for installation
|
||||
3. Track updates and new versions
|
||||
4. Map node classes to their source repositories
|
||||
5. Assess risk levels for installation security
|
||||
|
||||
## Maintenance Scripts
|
||||
|
||||
Each subdirectory contains a `scan.sh` script that assists with:
|
||||
- Scanning repositories for new nodes
|
||||
- Updating metadata
|
||||
- Validating database integrity
|
||||
- Generating proper JSON structures
|
||||
|
||||
This database system enables a flexible, secure, and comprehensive management system for the ComfyUI ecosystem while the transition to CNR continues.
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
rm ~/.tmp/dev/*.py > /dev/null 2>&1
|
||||
python ../../scanner.py ~/.tmp/dev
|
||||
python ../../scanner.py ~/.tmp/dev $*
|
||||
@@ -1,5 +1,25 @@
|
||||
{
|
||||
"custom_nodes": [
|
||||
{
|
||||
"author": "synchronicity-labs",
|
||||
"title": "ComfyUI Sync Lipsync Node",
|
||||
"reference": "https://github.com/synchronicity-labs/sync-comfyui",
|
||||
"files": [
|
||||
"https://github.com/synchronicity-labs/sync-comfyui"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This custom node allows you to perform audio-video lip synchronization inside ComfyUI using a simple interface."
|
||||
},
|
||||
{
|
||||
"author": "joaomede",
|
||||
"title": "ComfyUI-Unload-Model-Fork",
|
||||
"reference": "https://github.com/joaomede/ComfyUI-Unload-Model-Fork",
|
||||
"files": [
|
||||
"https://github.com/joaomede/ComfyUI-Unload-Model-Fork"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "For unloading a model or all models, using the memory management that is already present in ComfyUI. Copied from [a/https://github.com/willblaschko/ComfyUI-Unload-Models](https://github.com/willblaschko/ComfyUI-Unload-Models) but without the unnecessary extra stuff."
|
||||
},
|
||||
{
|
||||
"author": "SanDiegoDude",
|
||||
"title": "ComfyUI-HiDream-Sampler [WIP]",
|
||||
|
||||
@@ -1,16 +1,750 @@
|
||||
{
|
||||
"custom_nodes": [
|
||||
{
|
||||
"author": "#NOTICE_1.13",
|
||||
"title": "NOTICE: This channel is not the default channel.",
|
||||
"reference": "https://github.com/ltdrdata/ComfyUI-Manager",
|
||||
"files": [],
|
||||
"author": "takoyaki1118",
|
||||
"title": "ComfyUI-MangaTools [REMOVED]",
|
||||
"reference": "https://github.com/takoyaki1118/ComfyUI-MangaTools",
|
||||
"files": [
|
||||
"https://github.com/takoyaki1118/ComfyUI-MangaTools"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "If you see this message, your ComfyUI-Manager is outdated.\nLegacy channel provides only the list of the deprecated nodes. If you want to find the complete node list, please go to the Default channel."
|
||||
"description": "NODES: Manga Panel Detector, Manga Panel Dispatcher, GateImage, MangaPageAssembler"
|
||||
},
|
||||
{
|
||||
"author": "lucasgattas",
|
||||
"title": "comfyui-egregora-regional [REMOVED]",
|
||||
"reference": "https://github.com/lucasgattas/comfyui-egregora-regional",
|
||||
"files": [
|
||||
"https://github.com/lucasgattas/comfyui-egregora-regional"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Image Tile Split with Region-Aware Prompting for ComfyUI"
|
||||
},
|
||||
{
|
||||
"author": "lucasgattas",
|
||||
"title": "comfyui-egregora-tiled [REMOVED]",
|
||||
"reference": "https://github.com/lucasgattas/comfyui-egregora-tiled",
|
||||
"files": [
|
||||
"https://github.com/lucasgattas/comfyui-egregora-tiled"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Tiled regional prompting + tiled VAE decode with seam-free blending for ComfyUI"
|
||||
},
|
||||
{
|
||||
"author": "Seedsa",
|
||||
"title": "ComfyUI Fooocus Nodes [REMOVED]",
|
||||
"id": "fooocus-nodes",
|
||||
"reference": "https://github.com/Seedsa/Fooocus_Nodes",
|
||||
"files": [
|
||||
"https://github.com/Seedsa/Fooocus_Nodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This extension provides image generation features based on Fooocus."
|
||||
},
|
||||
{
|
||||
"author": "zhilemann",
|
||||
"title": "ComfyUI-moondream2 [REMOVED]",
|
||||
"reference": "https://github.com/zhilemann/ComfyUI-moondream2",
|
||||
"files": [
|
||||
"https://github.com/zhilemann/ComfyUI-moondream2"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "nodes for nightly moondream2 VLM inference\nsupports only captioning and visual queries at the moment"
|
||||
},
|
||||
{
|
||||
"author": "shinich39",
|
||||
"title": "comfyui-textarea-is-shit [REMOVED]",
|
||||
"reference": "https://github.com/shinich39/comfyui-textarea-is-shit",
|
||||
"files": [
|
||||
"https://github.com/shinich39/comfyui-textarea-is-shit"
|
||||
],
|
||||
"description": "HTML gives me a textarea like piece of shit.",
|
||||
"install_type": "git-clone"
|
||||
},
|
||||
{
|
||||
"author": "shinich39",
|
||||
"title": "comfyui-poor-textarea [REMOVED]",
|
||||
"reference": "https://github.com/shinich39/comfyui-poor-textarea",
|
||||
"files": [
|
||||
"https://github.com/shinich39/comfyui-poor-textarea"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Add commentify, indentation, auto-close brackets in textarea."
|
||||
},
|
||||
{
|
||||
"author": "InfiniNode",
|
||||
"title": "Comfyui-InfiniNode-Model-Suite [UNSAFE/REMOVED]",
|
||||
"reference": "https://github.com/InfiniNode/Comfyui-InfiniNode-Model-Suite",
|
||||
"files": [
|
||||
"https://github.com/InfiniNode/Comfyui-InfiniNode-Model-Suite"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Welcome to the InfiniNode Model Suite, a custom node pack for ComfyUI that transforms the process of manipulating generative AI models. Our suite is a direct implementation of the 'GUI-Based Key Converter Development Plan,' designed to remove technical barriers for advanced AI practitioners and integrate seamlessly with existing image generation pipelines.[w/This node pack contains a node that has a vulnerability allowing write to arbitrary file paths.]"
|
||||
},
|
||||
{
|
||||
"author": "Avalre",
|
||||
"title": "ComfyUI-avaNodes [REMOVED]",
|
||||
"reference": "https://github.com/Avalre/ComfyUI-avaNodes",
|
||||
"files": [
|
||||
"https://github.com/Avalre/ComfyUI-avaNodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "These nodes were created to personalize/optimize several ComfyUI nodes for my own use. You can replicate the functionality of most of my nodes by some combination of default ComfyUI nodes and custom nodes from other developers."
|
||||
},
|
||||
{
|
||||
"author": "Alectriciti",
|
||||
"title": "comfyui-creativeprompts [REMOVED]",
|
||||
"reference": "https://github.com/Alectriciti/comfyui-creativeprompts",
|
||||
"files": [
|
||||
"https://github.com/Alectriciti/comfyui-creativeprompts"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A creative alternative to dynamicprompts"
|
||||
},
|
||||
{
|
||||
"author": "flybirdxx",
|
||||
"title": "ComfyUI Sliding Window [REMOVED]",
|
||||
"reference": "https://github.com/PixWizardry/ComfyUI_Sliding_Window",
|
||||
"files": [
|
||||
"https://github.com/PixWizardry/ComfyUI_Sliding_Window"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This set of nodes provides a powerful sliding window or 'tiling' technique for processing long videos and animations in ComfyUI. It allows you to work on animations that are longer than your VRAM would typically allow by breaking the job into smaller, overlapping chunks and seamlessly blending them back together."
|
||||
},
|
||||
{
|
||||
"author": "SykkoAtHome",
|
||||
"title": "Sykko Tools for ComfyUI [REMOVED]",
|
||||
"reference": "https://github.com/SykkoAtHome/ComfyUI_SykkoTools",
|
||||
"files": [
|
||||
"https://github.com/SykkoAtHome/ComfyUI_SykkoTools"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Utilities for working with camera animations inside ComfyUI. The repository currently provides a node for loading camera motion from ASCII FBX files and a corresponding command line helper for debugging."
|
||||
},
|
||||
{
|
||||
"author": "hananbeer",
|
||||
"title": "node_dev - ComfyUI Node Development Helper [REMOVED]",
|
||||
"reference": "https://github.com/hananbeer/node_dev",
|
||||
"files": [
|
||||
"https://github.com/hananbeer/node_dev"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Browse to this endpoint to reload custom nodes for more streamlined development:\nhttp://127.0.0.1:8188/node_dev/reload/<module_name>"
|
||||
},
|
||||
{
|
||||
"author": "Charonartist",
|
||||
"title": "Comfyui_gemini_tts_node [REMOVED]",
|
||||
"reference": "https://github.com/Charonartist/Comfyui_gemini_tts_node",
|
||||
"files": [
|
||||
"https://github.com/Charonartist/Comfyui_gemini_tts_node"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This custom node is a ComfyUI node for generating speech from text using the Gemini 2.5 Flash Preview TTS API."
|
||||
},
|
||||
{
|
||||
"author": "squirrel765",
|
||||
"title": "lorasubdirectory [REMOVED]",
|
||||
"reference": "https://github.com/andrewsthomasj/lorasubdirectory",
|
||||
"files": [
|
||||
"https://github.com/andrewsthomasj/lorasubdirectory"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "only show dropdown of loras ina a given subdirectory"
|
||||
},
|
||||
{
|
||||
"author": "shingo1228",
|
||||
"title": "ComfyUI-send-Eagle(slim) [REVMOED]",
|
||||
"id": "send-eagle",
|
||||
"reference": "https://github.com/shingo1228/ComfyUI-send-eagle-slim",
|
||||
"files": [
|
||||
"https://github.com/shingo1228/ComfyUI-send-eagle-slim"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Nodes:Send Webp Image to Eagle. This is an extension node for ComfyUI that allows you to send generated images in webp format to Eagle. This extension node is a re-implementation of the Eagle linkage functions of the previous ComfyUI-send-Eagle node, focusing on the functions required for this node."
|
||||
},
|
||||
{
|
||||
"author": "shingo1228",
|
||||
"title": "ComfyUI-SDXL-EmptyLatentImage [REVMOED]",
|
||||
"id": "sdxl-emptylatent",
|
||||
"reference": "https://github.com/shingo1228/ComfyUI-SDXL-EmptyLatentImage",
|
||||
"files": [
|
||||
"https://github.com/shingo1228/ComfyUI-SDXL-EmptyLatentImage"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Nodes:SDXL Empty Latent Image. An extension node for ComfyUI that allows you to select a resolution from the pre-defined json files and output a Latent Image."
|
||||
},
|
||||
{
|
||||
"author": "chaunceyyann",
|
||||
"title": "ComfyUI Image Processing Nodes [REMOVED]",
|
||||
"reference": "https://github.com/chaunceyyann/comfyui-image-processing-nodes",
|
||||
"files": [
|
||||
"https://github.com/chaunceyyann/comfyui-image-processing-nodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A collection of custom nodes for ComfyUI focused on image processing operations."
|
||||
},
|
||||
{
|
||||
"author": "OgreLemonSoup",
|
||||
"title": "Gallery&Tabs [DEPRECATED]",
|
||||
"id": "LoadImageGallery",
|
||||
"reference": "https://github.com/OgreLemonSoup/ComfyUI-Load-Image-Gallery",
|
||||
"files": [
|
||||
"https://github.com/OgreLemonSoup/ComfyUI-Load-Image-Gallery"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Adds a gallery to the Load Image node and tabs for Load Checkpoint/Lora/etc nodes"
|
||||
},
|
||||
{
|
||||
"author": "11dogzi",
|
||||
"title": "Qwen-Image ComfyUI [REMOVED]",
|
||||
"reference": "https://github.com/11dogzi/Comfyui-Qwen-Image",
|
||||
"files": [
|
||||
"https://github.com/11dogzi/Comfyui-Qwen-Image"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This is a custom node package that integrates the Qwen-Image model into ComfyUI."
|
||||
},
|
||||
{
|
||||
"author": "BAIS1C",
|
||||
"title": "ComfyUI-AudioDuration [REMOVED]",
|
||||
"reference": "https://github.com/BAIS1C/ComfyUI_BASICDancePoser",
|
||||
"files": [
|
||||
"https://github.com/BAIS1C/ComfyUI_BASICDancePoser"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Node to extract Dance poses from Music to control Video Generations.\nNOTE: The files in the repo are not organized."
|
||||
},
|
||||
{
|
||||
"author": "BAIS1C",
|
||||
"title": "ComfyUI_BASICSAdvancedDancePoser [REMOVED]",
|
||||
"reference": "https://github.com/BAIS1C/ComfyUI_BASICSAdvancedDancePoser",
|
||||
"files": [
|
||||
"https://github.com/BAIS1C/ComfyUI_BASICSAdvancedDancePoser"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Professional COCO-WholeBody 133-keypoint dance animation system for ComfyUI"
|
||||
},
|
||||
{
|
||||
"author": "fablestudio",
|
||||
"title": "ComfyUI-Showrunner-Utils [REMOVED]",
|
||||
"reference": "https://github.com/fablestudio/ComfyUI-Showrunner-Utils",
|
||||
"files": [
|
||||
"https://github.com/fablestudio/ComfyUI-Showrunner-Utils"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "NODES: Align Face, Generate Timestamp, GetMostCommonColors, Alpha Crop and Position Image, Shrink Image"
|
||||
},
|
||||
{
|
||||
"author": "skayka",
|
||||
"title": "ComfyUI-DreamFit [REMOVED]",
|
||||
"reference": "https://github.com/skayka/ComfyUI-DreamFit",
|
||||
"files": [
|
||||
"https://github.com/skayka/ComfyUI-DreamFit"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Garment-centric human generation nodes for ComfyUI using DreamFit with Flux.\nDreamFit is a powerful adapter system that enhances Flux models with garment-aware generation capabilities, enabling high-quality fashion and clothing generation."
|
||||
},
|
||||
{
|
||||
"author": "domenecmiralles",
|
||||
"title": "obobo_nodes [REMOVED]",
|
||||
"reference": "https://github.com/domenecmiralles/obobo_nodes",
|
||||
"files": [
|
||||
"https://github.com/domenecmiralles/obobo_nodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A collection of custom nodes for ComfyUI that provide various input and output capabilities."
|
||||
},
|
||||
{
|
||||
"author": "NicholasKao1029",
|
||||
"title": "comfyui-pixxio [REMOVED]",
|
||||
"reference": "https://github.com/NicholasKao1029/comfyui-pixxio",
|
||||
"files": [
|
||||
"https://github.com/NicholasKao1029/comfyui-pixxio"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "NODES: Auto-Upload Image to Pixxio Collection, Load Image from Pixx.io"
|
||||
},
|
||||
{
|
||||
"author": "ComfyUI-Workflow",
|
||||
"title": "ComfyUI OpenAI Nodes [REMOVED]",
|
||||
"reference": "https://github.com/ComfyUI-Workflow/ComfyUI-OpenAI",
|
||||
"files": [
|
||||
"https://github.com/ComfyUI-Workflow/ComfyUI-OpenAI"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "By utilizing OpenAI's powerful vision models, this node enables you to incorporate state-of-the-art image understanding into your ComfyUI projects with minimal setup."
|
||||
},
|
||||
{
|
||||
"author": "dionren",
|
||||
"title": "Export Workflow With Cyuai Api Available Nodes [REMOVED]",
|
||||
"id": "comfyUI-Pro-Export-Tool",
|
||||
"reference": "https://github.com/dionren/ComfyUI-Pro-Export-Tool",
|
||||
"files": [
|
||||
"https://github.com/dionren/ComfyUI-Pro-Export-Tool"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This is a node to convert workflows to cyuai api available nodes."
|
||||
},
|
||||
{
|
||||
"author": "1H-hobit",
|
||||
"title": "ComfyUI_InternVL3 [REMOVED]",
|
||||
"reference": "https://github.com/1H-hobit/ComfyUI_InternVL3",
|
||||
"files": [
|
||||
"https://github.com/1H-hobit/ComfyUI_InternVL3"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "ComfyUI for [a/InternVL](https://github.com/OpenGVLab/InternVL)"
|
||||
},
|
||||
{
|
||||
"author": "spacepxl",
|
||||
"title": "ComfyUI-Florence-2 [DEPRECATED]",
|
||||
"id": "florence2-spacepxl",
|
||||
"reference": "https://github.com/spacepxl/ComfyUI-Florence-2",
|
||||
"files": [
|
||||
"https://github.com/spacepxl/ComfyUI-Florence-2"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "[a/https://huggingface.co/microsoft/Florence-2-large-ft](https://huggingface.co/microsoft/Florence-2-large-ft)\nLarge or base model, support for captioning and bbox task modes, more coming soon."
|
||||
},
|
||||
{
|
||||
"author": "xxxxxxxxxxxc",
|
||||
"title": "flux-kontext-diff-merge [REMOVED]",
|
||||
"reference": "https://github.com/xxxxxxxxxxxc/flux-kontext-diff-merge",
|
||||
"files": [
|
||||
"https://github.com/xxxxxxxxxxxc/flux-kontext-diff-merge"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Preserve image quality with flux-kontext-diff-merge. This ComfyUI node merges only changed areas from AI edits, ensuring clarity and detail."
|
||||
},
|
||||
{
|
||||
"author": "TechnoByteJS",
|
||||
"title": "TechNodes [REMOVED]",
|
||||
"id": "technodes",
|
||||
"reference": "https://github.com/TechnoByteJS/ComfyUI-TechNodes",
|
||||
"files": [
|
||||
"https://github.com/TechnoByteJS/ComfyUI-TechNodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "ComfyUI nodes for merging, testing and more.\nNOTE: SDNext Merge, VAE Merge, MBW Layers, Repeat VAE, Quantization."
|
||||
},
|
||||
{
|
||||
"author": "DDDDEEP",
|
||||
"title": "ComfyUI-DDDDEEP [REMOVED]",
|
||||
"reference": "https://github.com/DDDDEEP/ComfyUI-DDDDEEP",
|
||||
"files": [
|
||||
"https://github.com/DDDDEEP/ComfyUI-DDDDEEP"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "NODES: AutoWidthHeight, ReturnIntSeed, OppositeBool, PromptItemCollection"
|
||||
},
|
||||
{
|
||||
"author": "manifestations",
|
||||
"title": "ComfyUI Ethnic Outfits Custom Nodes [REMOVED]",
|
||||
"reference": "https://github.com/manifestations/comfyui-outfits",
|
||||
"files": [
|
||||
"https://github.com/manifestations/comfyui-outfits"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Custom ComfyUI nodes for generating outfit prompts representing diverse ethnicities, cultures, and regions. Uses extensible JSON data for clothing, accessories, and poses, with “random/disabled” dropdowns for flexibility. Advanced prompt engineering is supported via Ollama LLM integration. Easily add new regions, ethnicities, or cultures by updating data files and creating lightweight node wrappers. Designed for artists, researchers, and developers seeking culturally rich, customizable prompt generation in ComfyUI workflows."
|
||||
},
|
||||
{
|
||||
"author": "MitoshiroPJ",
|
||||
"title": "ComfyUI Slothful Attention [REMOVED]",
|
||||
"reference": "https://github.com/MitoshiroPJ/comfyui_slothful_attention",
|
||||
"files": [
|
||||
"https://github.com/MitoshiroPJ/comfyui_slothful_attention"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This custom node allow controlling output without training. The reducing method is similar to [a/Spatial-Reduction Attention](https://paperswithcode.com/method/spatial-reduction-attention)."
|
||||
},
|
||||
{
|
||||
"author": "MitoshiroPJ",
|
||||
"title": "comfyui_focal_sampler [REMOVED]",
|
||||
"reference": "https://github.com/MitoshiroPJ/comfyui_focal_sampler",
|
||||
"files": [
|
||||
"https://github.com/MitoshiroPJ/comfyui_focal_sampler"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Apply additional sampling to specific area"
|
||||
},
|
||||
{
|
||||
"author": "manifestations",
|
||||
"title": "ComfyUI Ethnic Outfit & Prompt Enhancer Nodes [REMOVED]",
|
||||
"reference": "https://github.com/manifestations/comfyui-indian-outfit",
|
||||
"files": [
|
||||
"https://github.com/manifestations/comfyui-indian-outfit"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Features:\n* Extensive options for Indian, Indonesian, and international clothing, jewelry, accessories, and styles\n* Multiple jewelry and accessory fields (with material support: gold, diamond, silver, leather, beads, etc.)\n* Support for tattoos, henna, hair styles, poses, shot types, lighting, and photography genres\n* Seamless prompt expansion using your own Ollama LLM instance\n* Modular, extensible JSON data files for easy customization"
|
||||
},
|
||||
{
|
||||
"author": "coVISIONSld",
|
||||
"title": "ComfyUI-OmniGen2 [REMOVED]",
|
||||
"reference": "https://github.com/coVISIONSld/ComfyUI-OmniGen2",
|
||||
"files": [
|
||||
"https://github.com/coVISIONSld/ComfyUI-OmniGen2"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "ComfyUI-OmniGen2 is a custom node package for the OmniGen2 model, enabling advanced text-to-image generation and visual understanding."
|
||||
},
|
||||
{
|
||||
"author": "S4MUEL-404",
|
||||
"title": "ComfyUI-S4Tool-Image-Overlay [REMOVED]",
|
||||
"reference": "https://github.com/S4MUEL-404/ComfyUI-S4Tool-Image-Overlay",
|
||||
"files": [
|
||||
"https://github.com/S4MUEL-404/ComfyUI-S4Tool-Image-Overlay"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Quickly set up image overlay effects"
|
||||
},
|
||||
{
|
||||
"author": "akspa0",
|
||||
"title": "ComfyUI-FapMixPlus [REMOVED]",
|
||||
"reference": "https://github.com/akspa0/ComfyUI-FapMixPlus",
|
||||
"files": [
|
||||
"https://github.com/akspa0/ComfyUI-FapMixPlus"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This is an audio processing script that applies soft limiting, optional loudness normalization, and optional slicing for transcription. It can also produce stereo-mixed outputs with optional audio appended to the end. The script organizes processed files into structured folders with sanitized filenames and retains original timestamps for continuity."
|
||||
},
|
||||
{
|
||||
"author": "RedmondAI",
|
||||
"title": "comfyui-tools [UNSAFE]",
|
||||
"reference": "https://github.com/RedmondAI/comfyui-tools",
|
||||
"files": [
|
||||
"https://github.com/RedmondAI/comfyui-tools"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Custom extensions for ComfyUI used by the Redmond3D VFX team.[w/This node pack has a vulnerability that allows it to create files at arbitrary paths.]"
|
||||
},
|
||||
{
|
||||
"author": "S4MUEL-404",
|
||||
"title": "Image Position Blend [REMOVED]",
|
||||
"id": "ComfyUI-Image-Position-Blend",
|
||||
"version": "1.1",
|
||||
"reference": "https://github.com/S4MUEL-404/ComfyUI-Image-Position-Blend",
|
||||
"files": [
|
||||
"https://github.com/S4MUEL-404/ComfyUI-Image-Position-Blend"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A custom node for conveniently adjusting the overlay position of two images."
|
||||
},
|
||||
{
|
||||
"author": "S4MUEL-404",
|
||||
"title": "ComfyUI-Text-On-Image [REMOVED]",
|
||||
"id": "ComfyUI-Text-On-Image",
|
||||
"reference": "https://github.com/S4MUEL-404/ComfyUI-Text-On-Image",
|
||||
"files": [
|
||||
"https://github.com/S4MUEL-404/ComfyUI-Text-On-Image"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A custom node for ComfyUI that allows users to add text overlays to images with customizable size, font, position, and shadow."
|
||||
},
|
||||
{
|
||||
"author": "S4MUEL-404",
|
||||
"title": "ComfyUI-Prompts-Selector [REMOVED]",
|
||||
"reference": "https://github.com/S4MUEL-404/ComfyUI-Prompts-Selector",
|
||||
"files": [
|
||||
"https://github.com/S4MUEL-404/ComfyUI-Prompts-Selector"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Quickly select preset prompts and merge them"
|
||||
},
|
||||
{
|
||||
"author": "juntaosun",
|
||||
"title": "ComfyUI_open_nodes [REMOVED]",
|
||||
"reference": "https://github.com/juntaosun/ComfyUI_open_nodes",
|
||||
"files": [
|
||||
"https://github.com/juntaosun/ComfyUI_open_nodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "ComfyUI open nodes by juntaosun."
|
||||
},
|
||||
{
|
||||
"author": "perilli",
|
||||
"title": "apw_nodes [DEPRECATED]",
|
||||
"reference": "https://github.com/alessandroperilli/apw_nodes",
|
||||
"files": [
|
||||
"https://github.com/alessandroperilli/apw_nodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A custom node suite to augment the capabilities of the [a/AP Workflows for ComfyUI](https://perilli.com/ai/comfyui/)[w/'APW_Nodes' has been newly added in place of 'apw_nodes'.]"
|
||||
},
|
||||
{
|
||||
"author": "markuryy",
|
||||
"title": "ComfyUI Spiritparticle Nodes [REMOVED]",
|
||||
"reference": "https://github.com/markuryy/comfyui-spiritparticle",
|
||||
"files": [
|
||||
"https://github.com/markuryy/comfyui-spiritparticle"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A node pack by spiritparticle."
|
||||
},
|
||||
{
|
||||
"author": "SpaceKendo",
|
||||
"title": "Text to video for Stable Video Diffusion in ComfyUI [REMOVED]",
|
||||
"id": "svd-txt2vid",
|
||||
"reference": "https://github.com/SpaceKendo/ComfyUI-svd_txt2vid",
|
||||
"files": [
|
||||
"https://github.com/SpaceKendo/ComfyUI-svd_txt2vid"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This is node replaces the init_image conditioning for the [a/Stable Video Diffusion](https://github.com/Stability-AI/generative-models) image to video model with text embeds, together with a conditioning frame. The conditioning frame is a set of latents."
|
||||
},
|
||||
{
|
||||
"author": "vovler",
|
||||
"title": "ComfyUI Civitai Helper Extension [REMOVED]",
|
||||
"reference": "https://github.com/vovler/comfyui-civitaihelper",
|
||||
"files": [
|
||||
"https://github.com/vovler/comfyui-civitaihelper"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "ComfyUI extension for parsing Civitai PNG workflows and automatically downloading missing models"
|
||||
},
|
||||
{
|
||||
"author": "DriftJohnson",
|
||||
"title": "DJZ-Nodes [REMOVED]",
|
||||
"id": "DJZ-Nodes",
|
||||
"reference": "https://github.com/MushroomFleet/DJZ-Nodes",
|
||||
"files": [
|
||||
"https://github.com/MushroomFleet/DJZ-Nodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "AspectSize and other nodes"
|
||||
},
|
||||
{
|
||||
"author": "DriftJohnson",
|
||||
"title": "KokoroTTS Node [REMOVED]",
|
||||
"reference": "https://github.com/MushroomFleet/DJZ-KokoroTTS",
|
||||
"files": [
|
||||
"https://github.com/MushroomFleet/DJZ-KokoroTTS"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This node provides advanced text-to-speech functionality powered by KokoroTTS. Follow the instructions below to install, configure, and use the node within your portable ComfyUI installation."
|
||||
},
|
||||
{
|
||||
"author": "MushroomFleet",
|
||||
"title": "DJZ-Pedalboard [REMOVED]",
|
||||
"reference": "https://github.com/MushroomFleet/DJZ-Pedalboard",
|
||||
"files": [
|
||||
"https://github.com/MushroomFleet/DJZ-Pedalboard"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This project provides a collection of custom nodes designed for enhanced audio effects in ComfyUI. With an intuitive pedalboard interface, users can easily integrate and manipulate various audio effects within their workflows."
|
||||
},
|
||||
{
|
||||
"author": "MushroomFleet",
|
||||
"title": "SVG Suite for ComfyUI [REMOVED]",
|
||||
"reference": "https://github.com/MushroomFleet/svg-suite",
|
||||
"files": [
|
||||
"https://github.com/MushroomFleet/svg-suite"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "SVG Suite is an advanced set of nodes for converting images to SVG in ComfyUI, expanding upon the functionality of ComfyUI-ToSVG."
|
||||
},
|
||||
{
|
||||
"author": "joeriben",
|
||||
"title": "AI4ArtsEd Ollama Prompt Node [DEPRECATED]",
|
||||
"reference": "https://github.com/joeriben/ai4artsed_comfyui",
|
||||
"files": [
|
||||
"https://github.com/joeriben/ai4artsed_comfyui"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Experimental nodes for ComfyUI. For more, see [a/https://kubi-meta.de/ai4artsed](https://kubi-meta.de/ai4artsed) A custom ComfyUI node for stylistic and cultural transformation of input text using local LLMs served via Ollama. This node allows you to combine a free-form prompt (e.g. translation, poetic recoding, genre shift) with externally supplied text in the ComfyUI graph. The result is processed via an Ollama-hosted model and returned as plain text."
|
||||
},
|
||||
{
|
||||
"author": "bento234",
|
||||
"title": "ComfyUI-bento-toolbox [REMOVED]",
|
||||
"reference": "https://github.com/bento234/ComfyUI-bento-toolbox",
|
||||
"files": [
|
||||
"https://github.com/bento234/ComfyUI-bento-toolbox"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "NODES: Tile Prompt Distributor"
|
||||
},
|
||||
{
|
||||
"author": "yichengup",
|
||||
"title": "ComfyUI-VideoBlender [REMOVED]",
|
||||
"reference": "https://github.com/yichengup/ComfyUI-VideoBlender",
|
||||
"files": [
|
||||
"https://github.com/yichengup/ComfyUI-VideoBlender"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Video clip mixing"
|
||||
},
|
||||
{
|
||||
"author": "xl0",
|
||||
"title": "latent-tools [REMOVED]",
|
||||
"reference": "https://github.com/xl0/latent-tools",
|
||||
"files": [
|
||||
"https://github.com/xl0/latent-tools"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Visualize and manipulate the latent space in ComfyUI"
|
||||
},
|
||||
{
|
||||
"author": "Conor-Collins",
|
||||
"title": "ComfyUI-CoCoTools [REMOVED]",
|
||||
"reference": "https://github.com/Conor-Collins/coco_tools",
|
||||
"files": [
|
||||
"https://github.com/Conor-Collins/coco_tools"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A set of custom nodes for ComfyUI providing advanced image processing, file handling, and utility functions."
|
||||
},
|
||||
{
|
||||
"author": "theUpsider",
|
||||
"title": "ComfyUI-Logic [DEPRECATED]",
|
||||
"id": "comfy-logic",
|
||||
"reference": "https://github.com/theUpsider/ComfyUI-Logic",
|
||||
"files": [
|
||||
"https://github.com/theUpsider/ComfyUI-Logic"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "An extension to ComfyUI that introduces logic nodes and conditional rendering capabilities."
|
||||
},
|
||||
{
|
||||
"author": "Malloc-pix",
|
||||
"title": "comfyui_qwen2.4_vl_node [REMOVED]",
|
||||
"reference": "https://github.com/Malloc-pix/comfyui_qwen2.4_vl_node",
|
||||
"files": [
|
||||
"https://github.com/Malloc-pix/comfyui_qwen2.4_vl_node"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "NODES: CogVLM2 Captioner, CLIP Dynamic Text Encode(cy)"
|
||||
},
|
||||
{
|
||||
"author": "inyourdreams-studio",
|
||||
"title": "ComfyUI-RBLM [REMOVED]",
|
||||
"reference": "https://github.com/inyourdreams-studio/comfyui-rblm",
|
||||
"files": [
|
||||
"https://github.com/inyourdreams-studio/comfyui-rblm"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A custom node pack for ComfyUI that provides text manipulation nodes."
|
||||
},
|
||||
{
|
||||
"author": "dream-computing",
|
||||
"title": "SyntaxNodes - Image Processing Effects for ComfyUI [REMOVED]",
|
||||
"reference": "https://github.com/dream-computing/syntax-nodes",
|
||||
"files": [
|
||||
"https://github.com/dream-computing/syntax-nodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A collection of custom nodes for ComfyUI designed to apply various image processing effects, stylizations, and analyses."
|
||||
},
|
||||
{
|
||||
"author": "UD1sto",
|
||||
"title": "plugin-utils-nodes [DEPRECATED]",
|
||||
"reference": "https://github.com/its-DeFine/plugin-utils-nodes",
|
||||
"files": [
|
||||
"https://github.com/its-DeFine/plugin-utils-nodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "NODES: Compare Images (SimHash), Image Selector, Temporal Consistency, Update Image Reference, Frame Blend."
|
||||
},
|
||||
{
|
||||
"author": "hanyingcho",
|
||||
"title": "ComfyUI LLM Promp [REMOVED]",
|
||||
"reference": "https://github.com/hanyingcho/comfyui-llmprompt",
|
||||
"files": [
|
||||
"https://github.com/hanyingcho/comfyui-llmprompt"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "NODES: Load llm, Generate Text with LLM, Inference Qwen2VL, Inference Qwen2"
|
||||
},
|
||||
{
|
||||
"author": "WASasquatch",
|
||||
"title": "WAS Node Suite [DEPRECATED]",
|
||||
"id": "was",
|
||||
"reference": "https://github.com/WASasquatch/was-node-suite-comfyui",
|
||||
"pip": ["numba"],
|
||||
"files": [
|
||||
"https://github.com/WASasquatch/was-node-suite-comfyui"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A node suite for ComfyUI with many new nodes, such as image processing, text processing, and more."
|
||||
},
|
||||
{
|
||||
"author": "TOM1063",
|
||||
"title": "ComfyUI-SamuraiTools [REMOVED]",
|
||||
"reference": "https://github.com/TOM1063/ComfyUI-SamuraiTools",
|
||||
"files": [
|
||||
"https://github.com/TOM1063/ComfyUI-SamuraiTools"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "ComfyUI custom node for switching integer values based on boolean conditions"
|
||||
},
|
||||
{
|
||||
"author": "whitemoney293",
|
||||
"title": "ComfyUI-MediaUtilities [REMOVED]",
|
||||
"reference": "https://github.com/ThanaritKanjanametawatAU/ComfyUI-MediaUtilities",
|
||||
"files": [
|
||||
"https://github.com/ThanaritKanjanametawatAU/ComfyUI-MediaUtilities"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Custom nodes for loading and previewing media from URLs in ComfyUI."
|
||||
},
|
||||
{
|
||||
"author": "pureexe",
|
||||
"title": "DiffusionLight-ComfyUI [REMOVED]",
|
||||
"reference": "https://github.com/pureexe/DiffusionLight-ComfyUI",
|
||||
"files": [
|
||||
"https://github.com/pureexe/DiffusionLight-ComfyUI"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "DiffusionLight (Turbo) implemented in ComfyUI"
|
||||
},
|
||||
{
|
||||
"author": "gondar-software",
|
||||
"title": "comfyui-custom-padding [REMOVED]",
|
||||
"reference": "https://github.com/gondar-software/comfyui-custom-padding",
|
||||
"files": [
|
||||
"https://github.com/gondar-software/comfyui-custom-padding"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "NODES: Adaptive image padding, Adaptive image unpadding"
|
||||
},
|
||||
{
|
||||
"author": "Charonartist",
|
||||
"title": "ComfyUI-EagleExporter [REMOVED]",
|
||||
"reference": "https://github.com/Charonartist/ComfyUI-EagleExporter",
|
||||
"files": [
|
||||
"https://github.com/Charonartist/ComfyUI-EagleExporter"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "This is an extension that automatically saves video files generated with ComfyUI's 'video combine' extension to the Eagle library."
|
||||
},
|
||||
{
|
||||
"author": "pomePLaszlo-collablyu",
|
||||
"title": "comfyui_ejam [REMOVED]",
|
||||
"reference": "https://github.com/PLaszlo-collab/comfyui_ejam",
|
||||
"files": [
|
||||
"https://github.com/PLaszlo-collab/comfyui_ejam"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Ejam nodes for comfyui"
|
||||
},
|
||||
{
|
||||
"author": "jonnydolake",
|
||||
"title": "ComfyUI-AIR-Nodes [REMOVED]",
|
||||
"reference": "https://github.com/jonnydolake/ComfyUI-AIR-Nodes",
|
||||
"files": [
|
||||
"https://github.com/jonnydolake/ComfyUI-AIR-Nodes"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "NODES: String List To Prompt Schedule, Force Minimum Batch Size, Target Location (Crop), Target Location (Paste), Image Composite Chained, Match Image Count To Mask Count, Random Character Prompts, Parallax Test, Easy Parallax, Parallax GPU Test"
|
||||
},
|
||||
{
|
||||
"author": "solution9th",
|
||||
"title": "Comfyui_mobilesam [REMOVED]",
|
||||
"reference": "https://github.com/solution9th/Comfyui_mobilesam",
|
||||
"files": [
|
||||
"https://github.com/solution9th/Comfyui_mobilesam"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "NODES: Mobile SAM Model Loader, Mobile SAM Detector, Mobile SAM Predictor"
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"author": "syaofox",
|
||||
"title": "ComfyUI_fnodes [REMOVED]",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,219 @@
|
||||
{
|
||||
"models": [
|
||||
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 i2v high noise 14B (fp16)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for i2v high noise 14B (fp16)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_i2v_high_noise_14B_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp16.safetensors",
|
||||
"size": "28.6GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 i2v high noise 14B (fp8_scaled)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for i2v high noise 14B (fp8_scaled)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors",
|
||||
"size": "14.3GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 i2v low noise 14B (fp16)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for i2v low noise 14B (fp16)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_i2v_low_noise_14B_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp16.safetensors",
|
||||
"size": "28.6GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 i2v low noise 14B (fp8_scaled)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for i2v low noise 14B (fp8_scaled)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors",
|
||||
"size": "14.3GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 t2v high noise 14B (fp16)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for t2v high noise 14B (fp16)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_t2v_high_noise_14B_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp16.safetensors",
|
||||
"size": "28.6GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 t2v high noise 14B (fp8_scaled)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for t2v high noise 14B (fp8_scaled)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
|
||||
"size": "14.3GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 t2v low noise 14B (fp16)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for t2v low noise 14B (fp16)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_t2v_low_noise_14B_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp16.safetensors",
|
||||
"size": "28.6GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 t2v low noise 14B (fp8_scaled)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for t2v low noise 14B (fp8_scaled)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
|
||||
"size": "14.3GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/Wan2.2 ti2v 5B (fp16)",
|
||||
"type": "diffusion_model",
|
||||
"base": "Wan2.2",
|
||||
"save_path": "diffusion_models/Wan2.2",
|
||||
"description": "Wan2.2 diffusion model for ti2v 5B (fp16)",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
|
||||
"filename": "wan2.2_ti2v_5B_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors",
|
||||
"size": "10.0GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sam2.1_hiera_tiny.pt",
|
||||
"type": "sam2.1",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2.1 hiera model (tiny)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2.1_hiera_tiny.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_tiny.pt",
|
||||
"size": "149.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2.1_hiera_small.pt",
|
||||
"type": "sam2.1",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2.1 hiera model (small)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2.1_hiera_small.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_small.pt",
|
||||
"size": "176.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2.1_hiera_base_plus.pt",
|
||||
"type": "sam2.1",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2.1 hiera model (base+)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2.1_hiera_base_plus.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_base_plus.pt",
|
||||
"size": "309.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2.1_hiera_large.pt",
|
||||
"type": "sam2.1",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2.1 hiera model (large)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2.1_hiera_large.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_large.pt",
|
||||
"size": "857.0MB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sam2_hiera_tiny.pt",
|
||||
"type": "sam2",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2 hiera model (tiny)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2_hiera_tiny.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_tiny.pt",
|
||||
"size": "149.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2_hiera_small.pt",
|
||||
"type": "sam2",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2 hiera model (small)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2_hiera_small.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_small.pt",
|
||||
"size": "176.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2_hiera_base_plus.pt",
|
||||
"type": "sam2",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2 hiera model (base+)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2_hiera_base_plus.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_base_plus.pt",
|
||||
"size": "309.0MB"
|
||||
},
|
||||
{
|
||||
"name": "sam2_hiera_large.pt",
|
||||
"type": "sam2",
|
||||
"base": "SAM",
|
||||
"save_path": "sams",
|
||||
"description": "Segmenty Anything SAM 2 hiera model (large)",
|
||||
"reference": "https://github.com/facebookresearch/sam2#model-description",
|
||||
"filename": "sam2_hiera_large.pt",
|
||||
"url": "https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_large.pt",
|
||||
"size": "857.0MB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Comfy-Org/omnigen2_fp16.safetensors",
|
||||
"type": "diffusion_model",
|
||||
"base": "OmniGen2",
|
||||
"save_path": "default",
|
||||
"description": "OmniGen2 diffusion model. This is required for using OmniGen2.",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Omnigen2_ComfyUI_repackaged",
|
||||
"filename": "omnigen2_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Omnigen2_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/omnigen2_fp16.safetensors",
|
||||
"size": "7.93GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/qwen_2.5_vl_fp16.safetensors",
|
||||
"type": "clip",
|
||||
"base": "qwen-2.5",
|
||||
"save_path": "default",
|
||||
"description": "text encoder for OmniGen2",
|
||||
"reference": "https://huggingface.co/Comfy-Org/Omnigen2_ComfyUI_repackaged",
|
||||
"filename": "qwen_2.5_vl_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/Omnigen2_ComfyUI_repackaged/resolve/main/split_files/text_encoders/qwen_2.5_vl_fp16.safetensors",
|
||||
"size": "7.51GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Latent Bridge Matching for Image Relighting",
|
||||
"type": "diffusion_model",
|
||||
@@ -473,224 +687,6 @@
|
||||
"filename": "llava_llama3_fp16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/resolve/main/split_files/text_encoders/llava_llama3_fp16.safetensors",
|
||||
"size": "16.1GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "PixArt-Sigma-XL-2-512-MS.safetensors (diffusion)",
|
||||
"type": "diffusion_model",
|
||||
"base": "pixart-sigma",
|
||||
"save_path": "diffusion_models/PixArt-Sigma",
|
||||
"description": "PixArt-Sigma Diffusion model",
|
||||
"reference": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-512-MS",
|
||||
"filename": "PixArt-Sigma-XL-2-512-MS.safetensors",
|
||||
"url": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-512-MS/resolve/main/transformer/diffusion_pytorch_model.safetensors",
|
||||
"size": "2.44GB"
|
||||
},
|
||||
{
|
||||
"name": "PixArt-Sigma-XL-2-1024-MS.safetensors (diffusion)",
|
||||
"type": "diffusion_model",
|
||||
"base": "pixart-sigma",
|
||||
"save_path": "diffusion_models/PixArt-Sigma",
|
||||
"description": "PixArt-Sigma Diffusion model",
|
||||
"reference": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS",
|
||||
"filename": "PixArt-Sigma-XL-2-1024-MS.safetensors",
|
||||
"url": "https://huggingface.co/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS/resolve/main/transformer/diffusion_pytorch_model.safetensors",
|
||||
"size": "2.44GB"
|
||||
},
|
||||
{
|
||||
"name": "PixArt-XL-2-1024-MS.safetensors (diffusion)",
|
||||
"type": "diffusion_model",
|
||||
"base": "pixart-alpha",
|
||||
"save_path": "diffusion_models/PixArt-Alpha",
|
||||
"description": "PixArt-Alpha Diffusion model",
|
||||
"reference": "https://huggingface.co/PixArt-alpha/PixArt-XL-2-1024-MS",
|
||||
"filename": "PixArt-XL-2-1024-MS.safetensors",
|
||||
"url": "https://huggingface.co/PixArt-alpha/PixArt-XL-2-1024-MS/resolve/main/transformer/diffusion_pytorch_model.safetensors",
|
||||
"size": "2.45GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Comfy-Org/hunyuan_video_t2v_720p_bf16.safetensors",
|
||||
"type": "diffusion_model",
|
||||
"base": "Hunyuan Video",
|
||||
"save_path": "diffusion_models/hunyuan_video",
|
||||
"description": "Huyuan Video diffusion model. repackaged version.",
|
||||
"reference": "https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged",
|
||||
"filename": "hunyuan_video_t2v_720p_bf16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/resolve/main/split_files/diffusion_models/hunyuan_video_t2v_720p_bf16.safetensors",
|
||||
"size": "25.6GB"
|
||||
},
|
||||
{
|
||||
"name": "Comfy-Org/hunyuan_video_vae_bf16.safetensors",
|
||||
"type": "VAE",
|
||||
"base": "Hunyuan Video",
|
||||
"save_path": "VAE",
|
||||
"description": "Huyuan Video VAE model. repackaged version.",
|
||||
"reference": "https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged",
|
||||
"filename": "hunyuan_video_vae_bf16.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/resolve/main/split_files/vae/hunyuan_video_vae_bf16.safetensors",
|
||||
"size": "493MB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "LTX-Video 2B v0.9.1 Checkpoint",
|
||||
"type": "checkpoint",
|
||||
"base": "LTX-Video",
|
||||
"save_path": "checkpoints/LTXV",
|
||||
"description": "LTX-Video is the first DiT-based video generation model capable of generating high-quality videos in real-time. It produces 24 FPS videos at a 768x512 resolution faster than they can be watched. Trained on a large-scale dataset of diverse videos, the model generates high-resolution videos with realistic and varied content.",
|
||||
"reference": "https://huggingface.co/Lightricks/LTX-Video",
|
||||
"filename": "ltx-video-2b-v0.9.1.safetensors",
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video/resolve/main/ltx-video-2b-v0.9.1.safetensors",
|
||||
"size": "5.72GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "XLabs-AI/flux-canny-controlnet-v3.safetensors",
|
||||
"type": "controlnet",
|
||||
"base": "FLUX.1",
|
||||
"save_path": "xlabs/controlnets",
|
||||
"description": "ControlNet checkpoints for FLUX.1-dev model by Black Forest Labs.",
|
||||
"reference": "https://huggingface.co/XLabs-AI/flux-controlnet-collections",
|
||||
"filename": "flux-canny-controlnet-v3.safetensors",
|
||||
"url": "https://huggingface.co/XLabs-AI/flux-controlnet-collections/resolve/main/flux-canny-controlnet-v3.safetensors",
|
||||
"size": "1.49GB"
|
||||
},
|
||||
{
|
||||
"name": "XLabs-AI/flux-depth-controlnet-v3.safetensors",
|
||||
"type": "controlnet",
|
||||
"base": "FLUX.1",
|
||||
"save_path": "xlabs/controlnets",
|
||||
"description": "ControlNet checkpoints for FLUX.1-dev model by Black Forest Labs.",
|
||||
"reference": "https://huggingface.co/XLabs-AI/flux-controlnet-collections",
|
||||
"filename": "flux-depth-controlnet-v3.safetensors",
|
||||
"url": "https://huggingface.co/XLabs-AI/flux-controlnet-collections/resolve/main/flux-depth-controlnet-v3.safetensors",
|
||||
"size": "1.49GB"
|
||||
},
|
||||
{
|
||||
"name": "XLabs-AI/flux-hed-controlnet-v3.safetensors",
|
||||
"type": "controlnet",
|
||||
"base": "FLUX.1",
|
||||
"save_path": "xlabs/controlnets",
|
||||
"description": "ControlNet checkpoints for FLUX.1-dev model by Black Forest Labs.",
|
||||
"reference": "https://huggingface.co/XLabs-AI/flux-controlnet-collections",
|
||||
"filename": "flux-hed-controlnet-v3.safetensors",
|
||||
"url": "https://huggingface.co/XLabs-AI/flux-controlnet-collections/resolve/main/flux-hed-controlnet-v3.safetensors",
|
||||
"size": "1.49GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "XLabs-AI/realism_lora.safetensors",
|
||||
"type": "lora",
|
||||
"base": "FLUX.1",
|
||||
"save_path": "xlabs/loras",
|
||||
"description": "A checkpoint with trained LoRAs for FLUX.1-dev model by Black Forest Labs",
|
||||
"reference": "https://huggingface.co/XLabs-AI/flux-lora-collection",
|
||||
"filename": "realism_lora.safetensors",
|
||||
"url": "https://huggingface.co/XLabs-AI/flux-lora-collection/resolve/main/realism_lora.safetensors",
|
||||
"size": "44.8MB"
|
||||
},
|
||||
{
|
||||
"name": "XLabs-AI/art_lora.safetensors",
|
||||
"type": "lora",
|
||||
"base": "FLUX.1",
|
||||
"save_path": "xlabs/loras",
|
||||
"description": "A checkpoint with trained LoRAs for FLUX.1-dev model by Black Forest Labs",
|
||||
"reference": "https://huggingface.co/XLabs-AI/flux-lora-collection",
|
||||
"filename": "art_lora.safetensors",
|
||||
"url": "https://huggingface.co/XLabs-AI/flux-lora-collection/resolve/main/scenery_lora.safetensors",
|
||||
"size": "44.8MB"
|
||||
},
|
||||
{
|
||||
"name": "XLabs-AI/mjv6_lora.safetensors",
|
||||
"type": "lora",
|
||||
"base": "FLUX.1",
|
||||
"save_path": "xlabs/loras",
|
||||
"description": "A checkpoint with trained LoRAs for FLUX.1-dev model by Black Forest Labs",
|
||||
"reference": "https://huggingface.co/XLabs-AI/flux-lora-collection",
|
||||
"filename": "mjv6_lora.safetensors",
|
||||
"url": "https://huggingface.co/XLabs-AI/flux-lora-collection/resolve/main/mjv6_lora.safetensors",
|
||||
"size": "44.8MB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "XLabs-AI/flux-ip-adapter",
|
||||
"type": "lora",
|
||||
"base": "FLUX.1",
|
||||
"save_path": "xlabs/ipadapters",
|
||||
"description": "A checkpoint with trained LoRAs for FLUX.1-dev model by Black Forest Labs",
|
||||
"reference": "https://huggingface.co/XLabs-AI/flux-ip-adapter",
|
||||
"filename": "ip_adapter.safetensors",
|
||||
"url": "https://huggingface.co/XLabs-AI/flux-ip-adapter/resolve/main/ip_adapter.safetensors",
|
||||
"size": "982MB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "stabilityai/SD3.5-Large-Controlnet-Blur",
|
||||
"type": "controlnet",
|
||||
"base": "SD3.5",
|
||||
"save_path": "controlnet/SD3.5",
|
||||
"description": "Blur Controlnet model for SD3.5 Large",
|
||||
"reference": "https://huggingface.co/stabilityai/stable-diffusion-3.5-controlnets",
|
||||
"filename": "sd3.5_large_controlnet_blur.safetensors",
|
||||
"url": "https://huggingface.co/stabilityai/stable-diffusion-3.5-controlnets/resolve/main/sd3.5_large_controlnet_blur.safetensors",
|
||||
"size": "8.65GB"
|
||||
},
|
||||
{
|
||||
"name": "stabilityai/SD3.5-Large-Controlnet-Canny",
|
||||
"type": "controlnet",
|
||||
"base": "SD3.5",
|
||||
"save_path": "controlnet/SD3.5",
|
||||
"description": "Canny Controlnet model for SD3.5 Large",
|
||||
"reference": "https://huggingface.co/stabilityai/stable-diffusion-3.5-controlnets",
|
||||
"filename": "sd3.5_large_controlnet_canny.safetensors",
|
||||
"url": "https://huggingface.co/stabilityai/stable-diffusion-3.5-controlnets/resolve/main/sd3.5_large_controlnet_canny.safetensors",
|
||||
"size": "8.65GB"
|
||||
},
|
||||
{
|
||||
"name": "stabilityai/SD3.5-Large-Controlnet-Depth",
|
||||
"type": "controlnet",
|
||||
"base": "SD3.5",
|
||||
"save_path": "controlnet/SD3.5",
|
||||
"description": "Depth Controlnet model for SD3.5 Large",
|
||||
"reference": "https://huggingface.co/stabilityai/stable-diffusion-3.5-controlnets",
|
||||
"filename": "sd3.5_large_controlnet_depth.safetensors",
|
||||
"url": "https://huggingface.co/stabilityai/stable-diffusion-3.5-controlnets/resolve/main/sd3.5_large_controlnet_depth.safetensors",
|
||||
"size": "8.65GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "LTX-Video 2B v0.9 Checkpoint",
|
||||
"type": "checkpoint",
|
||||
"base": "LTX-Video",
|
||||
"save_path": "checkpoints/LTXV",
|
||||
"description": "LTX-Video is the first DiT-based video generation model capable of generating high-quality videos in real-time. It produces 24 FPS videos at a 768x512 resolution faster than they can be watched. Trained on a large-scale dataset of diverse videos, the model generates high-resolution videos with realistic and varied content.",
|
||||
"reference": "https://huggingface.co/Lightricks/LTX-Video",
|
||||
"filename": "ltx-video-2b-v0.9.safetensors",
|
||||
"url": "https://huggingface.co/Lightricks/LTX-Video/resolve/main/ltx-video-2b-v0.9.safetensors",
|
||||
"size": "9.37GB"
|
||||
},
|
||||
{
|
||||
"name": "InstantX/FLUX.1-dev-IP-Adapter",
|
||||
"type": "IP-Adapter",
|
||||
"base": "FLUX.1",
|
||||
"save_path": "ipadapter-flux",
|
||||
"description": "FLUX.1-dev-IP-Adapter",
|
||||
"reference": "https://huggingface.co/InstantX/FLUX.1-dev-IP-Adapter",
|
||||
"filename": "ip-adapter.bin",
|
||||
"url": "https://huggingface.co/InstantX/FLUX.1-dev-IP-Adapter/resolve/main/ip-adapter.bin",
|
||||
"size": "5.29GB"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Comfy-Org/sigclip_vision_384 (patch14_384)",
|
||||
"type": "clip_vision",
|
||||
"base": "sigclip",
|
||||
"save_path": "clip_vision",
|
||||
"description": "This clip vision model is required for FLUX.1 Redux.",
|
||||
"reference": "https://huggingface.co/Comfy-Org/sigclip_vision_384/tree/main",
|
||||
"filename": "sigclip_vision_patch14_384.safetensors",
|
||||
"url": "https://huggingface.co/Comfy-Org/sigclip_vision_384/resolve/main/sigclip_vision_patch14_384.safetensors",
|
||||
"size": "857MB"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -331,6 +331,26 @@
|
||||
],
|
||||
"description": "Dynamic Node examples for ComfyUI",
|
||||
"install_type": "git-clone"
|
||||
},
|
||||
{
|
||||
"author": "Jonathon-Doran",
|
||||
"title": "remote-combo-demo",
|
||||
"reference": "https://github.com/Jonathon-Doran/remote-combo-demo",
|
||||
"files": [
|
||||
"https://github.com/Jonathon-Doran/remote-combo-demo"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "A minimal test suite demonstrating how remote COMBO inputs behave in ComfyUI, with and without force_input"
|
||||
},
|
||||
{
|
||||
"author": "J1mB091",
|
||||
"title": "ComfyUI-J1mB091 Custom Nodes",
|
||||
"reference": "https://github.com/J1mB091/ComfyUI-J1mB091",
|
||||
"files": [
|
||||
"https://github.com/J1mB091/ComfyUI-J1mB091"
|
||||
],
|
||||
"install_type": "git-clone",
|
||||
"description": "Vibe Coded ComfyUI Custom Nodes"
|
||||
}
|
||||
]
|
||||
}
|
||||
903
openapi.yaml
Normal file
903
openapi.yaml
Normal file
@@ -0,0 +1,903 @@
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: ComfyUI-Manager API
|
||||
description: |
|
||||
API for ComfyUI-Manager, a comprehensive management tool for ComfyUI custom nodes, models, and components.
|
||||
This API enables programmatic access to node management, model downloading, snapshot operations,
|
||||
and overall system configuration.
|
||||
version: "3.32.3"
|
||||
contact:
|
||||
name: ComfyUI-Manager Maintainers
|
||||
servers:
|
||||
- url: '/'
|
||||
description: Default ComfyUI server
|
||||
|
||||
# Common API components
|
||||
components:
|
||||
schemas:
|
||||
Error:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
NodePackageMetadata:
|
||||
type: object
|
||||
properties:
|
||||
title:
|
||||
type: string
|
||||
description: Display name of the node package
|
||||
name:
|
||||
type: string
|
||||
description: Repository/package name
|
||||
files:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Source URLs for the package
|
||||
description:
|
||||
type: string
|
||||
description: Description of the node package functionality
|
||||
install_type:
|
||||
type: string
|
||||
enum: [git, copy, pip]
|
||||
description: Installation method
|
||||
version:
|
||||
type: string
|
||||
description: Version identifier
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the node package
|
||||
ui_id:
|
||||
type: string
|
||||
description: ID for UI reference
|
||||
channel:
|
||||
type: string
|
||||
description: Source channel
|
||||
mode:
|
||||
type: string
|
||||
description: Source mode
|
||||
|
||||
ModelMetadata:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name of the model
|
||||
type:
|
||||
type: string
|
||||
description: Type of model
|
||||
base:
|
||||
type: string
|
||||
description: Base model type
|
||||
save_path:
|
||||
type: string
|
||||
description: Path for saving the model
|
||||
url:
|
||||
type: string
|
||||
description: Download URL
|
||||
filename:
|
||||
type: string
|
||||
description: Target filename
|
||||
ui_id:
|
||||
type: string
|
||||
description: ID for UI reference
|
||||
|
||||
SnapshotItem:
|
||||
type: string
|
||||
description: Name of the snapshot
|
||||
|
||||
QueueStatus:
|
||||
type: object
|
||||
properties:
|
||||
total_count:
|
||||
type: integer
|
||||
description: Total number of tasks
|
||||
done_count:
|
||||
type: integer
|
||||
description: Number of completed tasks
|
||||
in_progress_count:
|
||||
type: integer
|
||||
description: Number of tasks in progress
|
||||
is_processing:
|
||||
type: boolean
|
||||
description: Whether the queue is currently processing
|
||||
|
||||
ImportFailInfoBulkRequest:
|
||||
type: object
|
||||
properties:
|
||||
cnr_ids:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: A list of CNR IDs to check.
|
||||
urls:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: A list of repository URLs to check.
|
||||
|
||||
ImportFailInfoBulkResponse:
|
||||
type: object
|
||||
additionalProperties:
|
||||
$ref: '#/components/schemas/ImportFailInfoItem'
|
||||
description: >-
|
||||
A dictionary where each key is a cnr_id or url from the request,
|
||||
and the value is the corresponding error info.
|
||||
|
||||
ImportFailInfoItem:
|
||||
oneOf:
|
||||
- type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
traceback:
|
||||
type: string
|
||||
- type: "null"
|
||||
|
||||
securitySchemes:
|
||||
securityLevel:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: Security-Level
|
||||
description: Security level for sensitive operations
|
||||
|
||||
parameters:
|
||||
modeParam:
|
||||
name: mode
|
||||
in: query
|
||||
description: Source mode (e.g., "local", "remote")
|
||||
schema:
|
||||
type: string
|
||||
enum: [local, remote, default]
|
||||
|
||||
targetParam:
|
||||
name: target
|
||||
in: query
|
||||
description: Target identifier
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
||||
valueParam:
|
||||
name: value
|
||||
in: query
|
||||
description: New value to set
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
||||
# API Paths
|
||||
paths:
|
||||
# Custom Nodes Endpoints
|
||||
/customnode/getmappings:
|
||||
get:
|
||||
summary: Get node-to-package mappings
|
||||
description: Provides unified mapping between nodes and node packages
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/modeParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: array
|
||||
items:
|
||||
type: array
|
||||
description: Mapping of node packages to node classes
|
||||
|
||||
/customnode/fetch_updates:
|
||||
get:
|
||||
summary: Check for updates
|
||||
description: Fetches updates for custom nodes
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/modeParam'
|
||||
responses:
|
||||
'200':
|
||||
description: No updates available
|
||||
'201':
|
||||
description: Updates found
|
||||
'400':
|
||||
description: Error occurred
|
||||
|
||||
/customnode/installed:
|
||||
get:
|
||||
summary: Get installed custom nodes
|
||||
description: Returns a list of installed node packages
|
||||
parameters:
|
||||
- name: mode
|
||||
in: query
|
||||
description: Lists mode, default or imported
|
||||
schema:
|
||||
type: string
|
||||
enum: [default, imported]
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
$ref: '#/components/schemas/NodePackageMetadata'
|
||||
|
||||
/customnode/getlist:
|
||||
get:
|
||||
summary: Get custom node list
|
||||
description: Provides a list of available custom nodes
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/modeParam'
|
||||
- name: skip_update
|
||||
in: query
|
||||
description: Skip update check
|
||||
schema:
|
||||
type: boolean
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
channel:
|
||||
type: string
|
||||
node_packs:
|
||||
type: object
|
||||
additionalProperties:
|
||||
$ref: '#/components/schemas/NodePackageMetadata'
|
||||
|
||||
/customnode/alternatives:
|
||||
get:
|
||||
summary: Get alternative node options
|
||||
description: Provides alternatives for nodes
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/modeParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: object
|
||||
|
||||
/customnode/versions/{node_name}:
|
||||
get:
|
||||
summary: Get available versions for a node
|
||||
description: Lists all available versions for a specific node
|
||||
parameters:
|
||||
- name: node_name
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
version:
|
||||
type: string
|
||||
'400':
|
||||
description: Node not found
|
||||
|
||||
/customnode/disabled_versions/{node_name}:
|
||||
get:
|
||||
summary: Get disabled versions for a node
|
||||
description: Lists all disabled versions for a specific node
|
||||
parameters:
|
||||
- name: node_name
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
version:
|
||||
type: string
|
||||
'400':
|
||||
description: Node not found
|
||||
|
||||
/customnode/import_fail_info:
|
||||
post:
|
||||
summary: Get import failure information
|
||||
description: Returns information about why a node failed to import
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
cnr_id:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
'400':
|
||||
description: No information available
|
||||
|
||||
/v2/customnode/import_fail_info_bulk:
|
||||
post:
|
||||
summary: Get import failure info for multiple nodes
|
||||
description: Retrieves recorded import failure information for a list of custom nodes.
|
||||
tags:
|
||||
- customnode
|
||||
requestBody:
|
||||
description: A list of CNR IDs or repository URLs to check.
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ImportFailInfoBulkRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: A dictionary containing the import failure information.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ImportFailInfoBulkResponse'
|
||||
'400':
|
||||
description: Bad Request. The request body is invalid.
|
||||
'500':
|
||||
description: Internal Server Error.
|
||||
|
||||
/customnode/install/git_url:
|
||||
post:
|
||||
summary: Install custom node via Git URL
|
||||
description: Installs a custom node from a Git repository URL
|
||||
security:
|
||||
- securityLevel: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Installation successful or already installed
|
||||
'400':
|
||||
description: Installation failed
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
/customnode/install/pip:
|
||||
post:
|
||||
summary: Install custom node dependencies via pip
|
||||
description: Installs Python package dependencies for custom nodes
|
||||
security:
|
||||
- securityLevel: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Installation successful
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
# Model Management Endpoints
|
||||
/externalmodel/getlist:
|
||||
get:
|
||||
summary: Get external model list
|
||||
description: Provides a list of available external models
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/modeParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
models:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ModelMetadata'
|
||||
|
||||
# Queue Management Endpoints
|
||||
/manager/queue/update_all:
|
||||
get:
|
||||
summary: Update all custom nodes
|
||||
description: Queues update operations for all installed custom nodes
|
||||
security:
|
||||
- securityLevel: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/modeParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Update queued successfully
|
||||
'401':
|
||||
description: Processing already in progress
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
/manager/queue/reset:
|
||||
get:
|
||||
summary: Reset queue
|
||||
description: Resets the operation queue
|
||||
responses:
|
||||
'200':
|
||||
description: Queue reset successfully
|
||||
|
||||
/manager/queue/status:
|
||||
get:
|
||||
summary: Get queue status
|
||||
description: Returns the current status of the operation queue
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/QueueStatus'
|
||||
|
||||
/manager/queue/install:
|
||||
post:
|
||||
summary: Install custom node
|
||||
description: Queues installation of a custom node
|
||||
security:
|
||||
- securityLevel: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NodePackageMetadata'
|
||||
responses:
|
||||
'200':
|
||||
description: Installation queued successfully
|
||||
'403':
|
||||
description: Security policy violation
|
||||
'404':
|
||||
description: Target node not found or security issue
|
||||
|
||||
/manager/queue/start:
|
||||
get:
|
||||
summary: Start queue processing
|
||||
description: Starts processing the operation queue
|
||||
responses:
|
||||
'200':
|
||||
description: Processing started
|
||||
'201':
|
||||
description: Processing already in progress
|
||||
|
||||
/manager/queue/fix:
|
||||
post:
|
||||
summary: Fix custom node
|
||||
description: Attempts to fix a broken custom node installation
|
||||
security:
|
||||
- securityLevel: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NodePackageMetadata'
|
||||
responses:
|
||||
'200':
|
||||
description: Fix operation queued successfully
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
/manager/queue/reinstall:
|
||||
post:
|
||||
summary: Reinstall custom node
|
||||
description: Uninstalls and then reinstalls a custom node
|
||||
security:
|
||||
- securityLevel: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NodePackageMetadata'
|
||||
responses:
|
||||
'200':
|
||||
description: Reinstall operation queued successfully
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
/manager/queue/uninstall:
|
||||
post:
|
||||
summary: Uninstall custom node
|
||||
description: Queues uninstallation of a custom node
|
||||
security:
|
||||
- securityLevel: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NodePackageMetadata'
|
||||
responses:
|
||||
'200':
|
||||
description: Uninstallation queued successfully
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
/manager/queue/update:
|
||||
post:
|
||||
summary: Update custom node
|
||||
description: Queues update of a custom node
|
||||
security:
|
||||
- securityLevel: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NodePackageMetadata'
|
||||
responses:
|
||||
'200':
|
||||
description: Update queued successfully
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
/manager/queue/disable:
|
||||
post:
|
||||
summary: Disable custom node
|
||||
description: Disables a custom node without uninstalling it
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NodePackageMetadata'
|
||||
responses:
|
||||
'200':
|
||||
description: Disable operation queued successfully
|
||||
|
||||
/manager/queue/update_comfyui:
|
||||
get:
|
||||
summary: Update ComfyUI
|
||||
description: Queues an update operation for ComfyUI itself
|
||||
responses:
|
||||
'200':
|
||||
description: Update queued successfully
|
||||
|
||||
/manager/queue/install_model:
|
||||
post:
|
||||
summary: Install model
|
||||
description: Queues installation of a model
|
||||
security:
|
||||
- securityLevel: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ModelMetadata'
|
||||
responses:
|
||||
'200':
|
||||
description: Installation queued successfully
|
||||
'400':
|
||||
description: Invalid model request
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
# Snapshot Management Endpoints
|
||||
/snapshot/getlist:
|
||||
get:
|
||||
summary: Get snapshot list
|
||||
description: Returns a list of available snapshots
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/SnapshotItem'
|
||||
|
||||
/snapshot/remove:
|
||||
get:
|
||||
summary: Remove snapshot
|
||||
description: Removes a specified snapshot
|
||||
security:
|
||||
- securityLevel: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/targetParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Snapshot removed successfully
|
||||
'400':
|
||||
description: Error removing snapshot
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
/snapshot/restore:
|
||||
get:
|
||||
summary: Restore snapshot
|
||||
description: Restores a specified snapshot
|
||||
security:
|
||||
- securityLevel: []
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/targetParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Snapshot restoration scheduled
|
||||
'400':
|
||||
description: Error restoring snapshot
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
/snapshot/get_current:
|
||||
get:
|
||||
summary: Get current snapshot
|
||||
description: Returns the current system state as a snapshot
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
'400':
|
||||
description: Error creating snapshot
|
||||
|
||||
/snapshot/save:
|
||||
get:
|
||||
summary: Save snapshot
|
||||
description: Saves the current system state as a new snapshot
|
||||
responses:
|
||||
'200':
|
||||
description: Snapshot saved successfully
|
||||
'400':
|
||||
description: Error saving snapshot
|
||||
|
||||
# ComfyUI Management Endpoints
|
||||
/comfyui_manager/comfyui_versions:
|
||||
get:
|
||||
summary: Get ComfyUI versions
|
||||
description: Returns available and current ComfyUI versions
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
versions:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
current:
|
||||
type: string
|
||||
'400':
|
||||
description: Error retrieving versions
|
||||
|
||||
/comfyui_manager/comfyui_switch_version:
|
||||
get:
|
||||
summary: Switch ComfyUI version
|
||||
description: Switches to a specified ComfyUI version
|
||||
parameters:
|
||||
- name: ver
|
||||
in: query
|
||||
description: Target version
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Version switch successful
|
||||
'400':
|
||||
description: Error switching version
|
||||
|
||||
/manager/reboot:
|
||||
get:
|
||||
summary: Reboot ComfyUI
|
||||
description: Restarts the ComfyUI server
|
||||
security:
|
||||
- securityLevel: []
|
||||
responses:
|
||||
'200':
|
||||
description: Reboot initiated
|
||||
'403':
|
||||
description: Security policy violation
|
||||
|
||||
# Configuration Endpoints
|
||||
/manager/preview_method:
|
||||
get:
|
||||
summary: Get or set preview method
|
||||
description: Gets or sets the latent preview method
|
||||
parameters:
|
||||
- name: value
|
||||
in: query
|
||||
required: false
|
||||
description: New preview method
|
||||
schema:
|
||||
type: string
|
||||
enum: [auto, latent2rgb, taesd, none]
|
||||
responses:
|
||||
'200':
|
||||
description: Setting updated or current value returned
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
|
||||
/manager/db_mode:
|
||||
get:
|
||||
summary: Get or set database mode
|
||||
description: Gets or sets the database mode
|
||||
parameters:
|
||||
- name: value
|
||||
in: query
|
||||
required: false
|
||||
description: New database mode
|
||||
schema:
|
||||
type: string
|
||||
enum: [channel, local, remote]
|
||||
responses:
|
||||
'200':
|
||||
description: Setting updated or current value returned
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
|
||||
/manager/policy/component:
|
||||
get:
|
||||
summary: Get or set component policy
|
||||
description: Gets or sets the component policy
|
||||
parameters:
|
||||
- name: value
|
||||
in: query
|
||||
required: false
|
||||
description: New component policy
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Setting updated or current value returned
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
|
||||
/manager/policy/update:
|
||||
get:
|
||||
summary: Get or set update policy
|
||||
description: Gets or sets the update policy
|
||||
parameters:
|
||||
- name: value
|
||||
in: query
|
||||
required: false
|
||||
description: New update policy
|
||||
schema:
|
||||
type: string
|
||||
enum: [stable, nightly, nightly-comfyui]
|
||||
responses:
|
||||
'200':
|
||||
description: Setting updated or current value returned
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
|
||||
/manager/channel_url_list:
|
||||
get:
|
||||
summary: Get or set channel URL
|
||||
description: Gets or sets the channel URL for custom node sources
|
||||
parameters:
|
||||
- name: value
|
||||
in: query
|
||||
required: false
|
||||
description: New channel name
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Setting updated or channel list returned
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
selected:
|
||||
type: string
|
||||
list:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
|
||||
# Component Management Endpoints
|
||||
/manager/component/save:
|
||||
post:
|
||||
summary: Save component
|
||||
description: Saves a reusable workflow component
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
workflow:
|
||||
type: object
|
||||
responses:
|
||||
'200':
|
||||
description: Component saved successfully
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
'400':
|
||||
description: Error saving component
|
||||
|
||||
/manager/component/loads:
|
||||
post:
|
||||
summary: Load components
|
||||
description: Loads all available workflow components
|
||||
responses:
|
||||
'200':
|
||||
description: Components loaded successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
'400':
|
||||
description: Error loading components
|
||||
|
||||
# Miscellaneous Endpoints
|
||||
/manager/version:
|
||||
get:
|
||||
summary: Get manager version
|
||||
description: Returns the current version of ComfyUI-Manager
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
|
||||
/manager/notice:
|
||||
get:
|
||||
summary: Get manager notice
|
||||
description: Returns HTML content with notices and version information
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
text/html:
|
||||
schema:
|
||||
type: string
|
||||
@@ -38,7 +38,6 @@ else:
|
||||
def current_timestamp():
|
||||
return str(time.time()).split('.')[0]
|
||||
|
||||
security_check.security_check()
|
||||
|
||||
cm_global.pip_blacklist = {'torch', 'torchaudio', 'torchsde', 'torchvision'}
|
||||
cm_global.pip_downgrade_blacklist = ['torch', 'torchaudio', 'torchsde', 'torchvision', 'transformers', 'safetensors', 'kornia']
|
||||
@@ -119,19 +118,14 @@ def check_file_logging():
|
||||
|
||||
read_config()
|
||||
read_uv_mode()
|
||||
security_check.security_check()
|
||||
check_file_logging()
|
||||
|
||||
if sys.version_info < (3, 13):
|
||||
cm_global.pip_overrides = {'numpy': 'numpy<2'}
|
||||
else:
|
||||
cm_global.pip_overrides = {}
|
||||
cm_global.pip_overrides = {}
|
||||
|
||||
if os.path.exists(manager_pip_overrides_path):
|
||||
with open(manager_pip_overrides_path, 'r', encoding="UTF-8", errors="ignore") as json_file:
|
||||
cm_global.pip_overrides = json.load(json_file)
|
||||
|
||||
if sys.version_info < (3, 13):
|
||||
cm_global.pip_overrides['numpy'] = 'numpy<2'
|
||||
|
||||
|
||||
if os.path.exists(manager_pip_blacklist_path):
|
||||
@@ -344,7 +338,12 @@ try:
|
||||
log_file.write(message)
|
||||
else:
|
||||
log_file.write(f"[{timestamp}] {message}")
|
||||
log_file.flush()
|
||||
|
||||
try:
|
||||
log_file.flush()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
self.last_char = message if message == '' else message[-1]
|
||||
|
||||
if not file_only:
|
||||
@@ -357,7 +356,10 @@ try:
|
||||
original_stderr.flush()
|
||||
|
||||
def flush(self):
|
||||
log_file.flush()
|
||||
try:
|
||||
log_file.flush()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
with std_log_lock:
|
||||
if self.is_stdout:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-manager"
|
||||
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
|
||||
version = "3.32.3"
|
||||
version = "3.36"
|
||||
license = { file = "LICENSE.txt" }
|
||||
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions", "toml", "uv", "chardet"]
|
||||
|
||||
|
||||
25
scanner.py
25
scanner.py
@@ -102,12 +102,8 @@ def extract_nodes(code_text):
|
||||
def scan_in_file(filename, is_builtin=False):
|
||||
global builtin_nodes
|
||||
|
||||
try:
|
||||
with open(filename, encoding='utf-8') as file:
|
||||
code = file.read()
|
||||
except UnicodeDecodeError:
|
||||
with open(filename, encoding='cp949') as file:
|
||||
code = file.read()
|
||||
with open(filename, encoding='utf-8', errors='ignore') as file:
|
||||
code = file.read()
|
||||
|
||||
pattern = r"_CLASS_MAPPINGS\s*=\s*{([^}]*)}"
|
||||
regex = re.compile(pattern, re.MULTILINE | re.DOTALL)
|
||||
@@ -259,13 +255,13 @@ def clone_or_pull_git_repository(git_url):
|
||||
repo.git.submodule('update', '--init', '--recursive')
|
||||
print(f"Pulling {repo_name}...")
|
||||
except Exception as e:
|
||||
print(f"Pulling {repo_name} failed: {e}")
|
||||
print(f"Failed to pull '{repo_name}': {e}")
|
||||
else:
|
||||
try:
|
||||
Repo.clone_from(git_url, repo_dir, recursive=True)
|
||||
print(f"Cloning {repo_name}...")
|
||||
except Exception as e:
|
||||
print(f"Cloning {repo_name} failed: {e}")
|
||||
print(f"Failed to clone '{repo_name}': {e}")
|
||||
|
||||
|
||||
def update_custom_nodes():
|
||||
@@ -297,7 +293,7 @@ def update_custom_nodes():
|
||||
pass
|
||||
|
||||
def is_rate_limit_exceeded():
|
||||
return g.rate_limiting[0] == 0
|
||||
return g.rate_limiting[0] <= 20
|
||||
|
||||
if is_rate_limit_exceeded():
|
||||
print(f"GitHub API Rate Limit Exceeded: remained - {(g.rate_limiting_resettime - datetime.datetime.now().timestamp())/60:.2f} min")
|
||||
@@ -500,8 +496,15 @@ def gen_json(node_info):
|
||||
nodes_in_url, metadata_in_url = data[git_url]
|
||||
nodes = set(nodes_in_url)
|
||||
|
||||
for x, desc in node_list_json.items():
|
||||
nodes.add(x.strip())
|
||||
try:
|
||||
for x, desc in node_list_json.items():
|
||||
nodes.add(x.strip())
|
||||
except Exception as e:
|
||||
print(f"\nERROR: Invalid json format '{node_list_json_path}'")
|
||||
print("------------------------------------------------------")
|
||||
print(e)
|
||||
print("------------------------------------------------------")
|
||||
node_list_json = {}
|
||||
|
||||
metadata_in_url['title_aux'] = title
|
||||
|
||||
|
||||
19
tests-api/.gitignore
vendored
19
tests-api/.gitignore
vendored
@@ -1,19 +0,0 @@
|
||||
# Python cache files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# Pytest cache
|
||||
.pytest_cache/
|
||||
|
||||
# Coverage reports
|
||||
.coverage
|
||||
htmlcov/
|
||||
|
||||
# Virtual environments
|
||||
venv/
|
||||
env/
|
||||
ENV/
|
||||
|
||||
# Test-specific resources
|
||||
resources/tmp/
|
||||
@@ -1,91 +0,0 @@
|
||||
# ComfyUI-Manager API Tests
|
||||
|
||||
This directory contains tests for the ComfyUI-Manager API endpoints, validating the OpenAPI specification and ensuring API functionality.
|
||||
|
||||
## Setup
|
||||
|
||||
1. Install test dependencies:
|
||||
|
||||
```bash
|
||||
pip install -r requirements-test.txt
|
||||
```
|
||||
|
||||
2. Ensure ComfyUI is running with ComfyUI-Manager installed:
|
||||
|
||||
```bash
|
||||
# Start ComfyUI with the default server
|
||||
python main.py
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
|
||||
### Run all tests
|
||||
|
||||
```bash
|
||||
pytest -xvs
|
||||
```
|
||||
|
||||
### Run specific test files
|
||||
|
||||
```bash
|
||||
# Run only the spec validation tests
|
||||
pytest -xvs test_spec_validation.py
|
||||
|
||||
# Run only the custom node API tests
|
||||
pytest -xvs test_customnode_api.py
|
||||
```
|
||||
|
||||
### Run specific test functions
|
||||
|
||||
```bash
|
||||
# Run a specific test
|
||||
pytest -xvs test_customnode_api.py::test_get_custom_node_list
|
||||
```
|
||||
|
||||
## Test Configuration
|
||||
|
||||
The tests use the following default configuration:
|
||||
|
||||
- Server URL: `http://localhost:8188`
|
||||
- Server timeout: 2 seconds
|
||||
- Wait between requests: 0.5 seconds
|
||||
- Maximum retries: 3
|
||||
|
||||
You can override these settings with environment variables:
|
||||
|
||||
```bash
|
||||
# Use a different server URL
|
||||
COMFYUI_SERVER_URL=http://localhost:8189 pytest -xvs
|
||||
```
|
||||
|
||||
## Test Categories
|
||||
|
||||
The tests are organized into the following categories:
|
||||
|
||||
1. **Spec Validation** (`test_spec_validation.py`): Validates that the OpenAPI specification is correct and complete.
|
||||
2. **Custom Node API** (`test_customnode_api.py`): Tests for custom node management endpoints.
|
||||
3. **Snapshot API** (`test_snapshot_api.py`): Tests for snapshot management endpoints.
|
||||
4. **Queue API** (`test_queue_api.py`): Tests for queue management endpoints.
|
||||
5. **Config API** (`test_config_api.py`): Tests for configuration endpoints.
|
||||
6. **Model API** (`test_model_api.py`): Tests for model management endpoints (minimal as these are being deprecated).
|
||||
|
||||
## Test Implementation Details
|
||||
|
||||
### Fixtures
|
||||
|
||||
- `test_config`: Provides the test configuration
|
||||
- `server_url`: Returns the server URL from the configuration
|
||||
- `openapi_spec`: Loads the OpenAPI specification
|
||||
- `api_client`: Creates a requests Session for API calls
|
||||
- `api_request`: Helper function for making consistent API requests
|
||||
|
||||
### Utilities
|
||||
|
||||
- `validation.py`: Functions for validating responses against the OpenAPI schema
|
||||
- `schema_utils.py`: Utilities for extracting and manipulating schemas
|
||||
|
||||
## Notes
|
||||
|
||||
- Some tests are skipped with `@pytest.mark.skip` to avoid modifying state in automated testing
|
||||
- Security-level restricted endpoints have minimal tests to avoid security issues
|
||||
- Tests focus on read operations rather than write operations where possible
|
||||
@@ -1 +0,0 @@
|
||||
# Make tests-api directory a proper package
|
||||
@@ -1,237 +0,0 @@
|
||||
"""
|
||||
PyTest configuration and fixtures for API tests.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import pytest
|
||||
import requests
|
||||
import tempfile
|
||||
import time
|
||||
import yaml
|
||||
from pathlib import Path
|
||||
from typing import Dict, Generator, Optional, Tuple
|
||||
|
||||
# Import test utilities
|
||||
import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Get the absolute path to the current file (conftest.py)
|
||||
current_file = Path(os.path.abspath(__file__))
|
||||
|
||||
# Get the directory containing the current file (the tests-api directory)
|
||||
tests_api_dir = current_file.parent
|
||||
|
||||
# Add the tests-api directory to the Python path
|
||||
if str(tests_api_dir) not in sys.path:
|
||||
sys.path.insert(0, str(tests_api_dir))
|
||||
|
||||
# Apply mocks for ComfyUI imports
|
||||
from mocks.patch import apply_mocks
|
||||
apply_mocks()
|
||||
|
||||
# Now we can import from utils.validation
|
||||
from utils.validation import load_openapi_spec
|
||||
|
||||
|
||||
# Default test configuration
|
||||
DEFAULT_TEST_CONFIG = {
|
||||
"server_url": "http://localhost:8188",
|
||||
"server_timeout": 2, # seconds
|
||||
"wait_between_requests": 0.5, # seconds
|
||||
"max_retries": 3,
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def test_config() -> Dict:
|
||||
"""
|
||||
Load test configuration from environment variables or use defaults.
|
||||
"""
|
||||
config = DEFAULT_TEST_CONFIG.copy()
|
||||
|
||||
# Override from environment variables if present
|
||||
if "COMFYUI_SERVER_URL" in os.environ:
|
||||
config["server_url"] = os.environ["COMFYUI_SERVER_URL"]
|
||||
|
||||
return config
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def server_url(test_config: Dict) -> str:
|
||||
"""
|
||||
Get the server URL from the test configuration.
|
||||
"""
|
||||
return test_config["server_url"]
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def openapi_spec() -> Dict:
|
||||
"""
|
||||
Load the OpenAPI specification.
|
||||
"""
|
||||
return load_openapi_spec()
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def api_client(server_url: str, test_config: Dict) -> requests.Session:
|
||||
"""
|
||||
Create a requests Session for API calls.
|
||||
"""
|
||||
session = requests.Session()
|
||||
|
||||
# Check if the server is running
|
||||
try:
|
||||
response = session.get(f"{server_url}/", timeout=test_config["server_timeout"])
|
||||
response.raise_for_status()
|
||||
except (requests.ConnectionError, requests.Timeout, requests.HTTPError):
|
||||
pytest.skip("ComfyUI server is not running or not accessible")
|
||||
|
||||
return session
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def temp_dir() -> Generator[Path, None, None]:
|
||||
"""
|
||||
Create a temporary directory for test files.
|
||||
"""
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
yield Path(temp_dir)
|
||||
|
||||
|
||||
class SecurityLevelContext:
|
||||
"""
|
||||
Context manager for setting and restoring security levels.
|
||||
"""
|
||||
def __init__(self, api_client: requests.Session, server_url: str, security_level: str):
|
||||
self.api_client = api_client
|
||||
self.server_url = server_url
|
||||
self.security_level = security_level
|
||||
self.original_level = None
|
||||
|
||||
async def __aenter__(self):
|
||||
# Get the current security level (not directly exposed in API, would require more setup)
|
||||
# For now, we'll just set the new level
|
||||
|
||||
# Set the new security level
|
||||
# Note: In a real implementation, we would need a way to set this
|
||||
# This is a placeholder - the actual implementation would depend on how
|
||||
# security levels are managed in ComfyUI-Manager
|
||||
return self
|
||||
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
||||
# Restore the original security level if needed
|
||||
pass
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def security_level_context(api_client: requests.Session, server_url: str):
|
||||
"""
|
||||
Create a context manager for setting security levels.
|
||||
"""
|
||||
return lambda level: SecurityLevelContext(api_client, server_url, level)
|
||||
|
||||
|
||||
def make_api_url(server_url: str, path: str) -> str:
|
||||
"""
|
||||
Construct a full API URL from the server URL and path.
|
||||
"""
|
||||
# Ensure the path starts with a slash
|
||||
if not path.startswith("/"):
|
||||
path = f"/{path}"
|
||||
|
||||
# Remove trailing slash from server_url if present
|
||||
if server_url.endswith("/"):
|
||||
server_url = server_url[:-1]
|
||||
|
||||
return f"{server_url}{path}"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def api_request(api_client: requests.Session, server_url: str, test_config: Dict):
|
||||
"""
|
||||
Helper function for making API requests with consistent behavior.
|
||||
"""
|
||||
def _request(
|
||||
method: str,
|
||||
path: str,
|
||||
params: Optional[Dict] = None,
|
||||
json_data: Optional[Dict] = None,
|
||||
headers: Optional[Dict] = None,
|
||||
expected_status: int = 200,
|
||||
retry_on_error: bool = True,
|
||||
) -> Tuple[requests.Response, Optional[Dict]]:
|
||||
"""
|
||||
Make an API request with automatic validation.
|
||||
|
||||
Args:
|
||||
method: HTTP method
|
||||
path: API path
|
||||
params: Query parameters
|
||||
json_data: JSON request body
|
||||
headers: HTTP headers
|
||||
expected_status: Expected HTTP status code
|
||||
retry_on_error: Whether to retry on connection errors
|
||||
|
||||
Returns:
|
||||
Tuple of (Response object, JSON response data or None)
|
||||
"""
|
||||
method = method.lower()
|
||||
url = make_api_url(server_url, path)
|
||||
|
||||
if headers is None:
|
||||
headers = {}
|
||||
|
||||
# Add common headers
|
||||
headers.setdefault("Accept", "application/json")
|
||||
|
||||
# Sleep between requests to avoid overwhelming the server
|
||||
time.sleep(test_config["wait_between_requests"])
|
||||
|
||||
retries = test_config["max_retries"] if retry_on_error else 0
|
||||
last_exception = None
|
||||
|
||||
for attempt in range(retries + 1):
|
||||
try:
|
||||
if method == "get":
|
||||
response = api_client.get(url, params=params, headers=headers)
|
||||
elif method == "post":
|
||||
response = api_client.post(url, params=params, json=json_data, headers=headers)
|
||||
elif method == "put":
|
||||
response = api_client.put(url, params=params, json=json_data, headers=headers)
|
||||
elif method == "delete":
|
||||
response = api_client.delete(url, params=params, headers=headers)
|
||||
else:
|
||||
raise ValueError(f"Unsupported HTTP method: {method}")
|
||||
|
||||
# Check status code
|
||||
assert response.status_code == expected_status, (
|
||||
f"Expected status code {expected_status}, got {response.status_code}"
|
||||
)
|
||||
|
||||
# Parse JSON response if possible
|
||||
json_response = None
|
||||
if response.headers.get("Content-Type", "").startswith("application/json"):
|
||||
try:
|
||||
json_response = response.json()
|
||||
except json.JSONDecodeError:
|
||||
if expected_status == 200:
|
||||
raise ValueError("Response was not valid JSON")
|
||||
|
||||
return response, json_response
|
||||
|
||||
except (requests.ConnectionError, requests.Timeout) as e:
|
||||
last_exception = e
|
||||
if attempt < retries:
|
||||
# Wait before retrying
|
||||
time.sleep(1)
|
||||
continue
|
||||
break
|
||||
|
||||
if last_exception:
|
||||
raise last_exception
|
||||
|
||||
raise RuntimeError("Failed to make API request")
|
||||
|
||||
return _request
|
||||
@@ -1 +0,0 @@
|
||||
# Make tests-api/mocks directory a proper package
|
||||
@@ -1,26 +0,0 @@
|
||||
"""
|
||||
Mock CustomNodeManager for testing purposes
|
||||
"""
|
||||
|
||||
class CustomNodeManager:
|
||||
"""
|
||||
Mock implementation of the CustomNodeManager class
|
||||
"""
|
||||
instance = None
|
||||
|
||||
def __init__(self):
|
||||
self.custom_nodes = {}
|
||||
self.node_paths = []
|
||||
self.refresh_timeout = None
|
||||
|
||||
def get_node_path(self, node_class):
|
||||
"""
|
||||
Mock implementation to get the path for a node class
|
||||
"""
|
||||
return self.custom_nodes.get(node_class, None)
|
||||
|
||||
def update_node_paths(self):
|
||||
"""
|
||||
Mock implementation to update node paths
|
||||
"""
|
||||
pass
|
||||
@@ -1,116 +0,0 @@
|
||||
"""
|
||||
Patch module to mock imports for testing
|
||||
"""
|
||||
import sys
|
||||
import importlib.util
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Import mock modules
|
||||
from mocks.prompt_server import PromptServer
|
||||
from mocks.custom_node_manager import CustomNodeManager
|
||||
|
||||
# Current directory
|
||||
current_dir = Path(__file__).parent.parent # tests-api directory
|
||||
|
||||
# Define mocks
|
||||
class MockModule:
|
||||
"""Base class for mock modules"""
|
||||
pass
|
||||
|
||||
# Create server mock module with PromptServer
|
||||
server_mock = MockModule()
|
||||
server_mock.PromptServer = PromptServer
|
||||
prompt_server_instance = PromptServer()
|
||||
server_mock.PromptServer.instance = prompt_server_instance
|
||||
server_mock.PromptServer.inst = prompt_server_instance
|
||||
|
||||
# Create app mock module with custom_node_manager submodule
|
||||
app_mock = MockModule()
|
||||
app_custom_node_manager = MockModule()
|
||||
app_custom_node_manager.CustomNodeManager = CustomNodeManager
|
||||
app_custom_node_manager.CustomNodeManager.instance = CustomNodeManager()
|
||||
|
||||
# Create utils mock module with json_util submodule
|
||||
utils_mock = MockModule()
|
||||
utils_json_util = MockModule()
|
||||
|
||||
# Create utils.validation and utils.schema_utils submodules
|
||||
utils_validation = MockModule()
|
||||
utils_schema_utils = MockModule()
|
||||
|
||||
# Import actual modules (make sure path is set up correctly)
|
||||
sys.path.insert(0, str(current_dir))
|
||||
|
||||
try:
|
||||
# Import the validation module
|
||||
from utils.validation import load_openapi_spec
|
||||
utils_validation.load_openapi_spec = load_openapi_spec
|
||||
|
||||
# Import all schema_utils functions
|
||||
from utils.schema_utils import (
|
||||
get_all_paths,
|
||||
get_grouped_paths,
|
||||
get_methods_for_path,
|
||||
find_paths_with_security,
|
||||
get_content_types_for_response,
|
||||
get_required_parameters
|
||||
)
|
||||
|
||||
utils_schema_utils.get_all_paths = get_all_paths
|
||||
utils_schema_utils.get_grouped_paths = get_grouped_paths
|
||||
utils_schema_utils.get_methods_for_path = get_methods_for_path
|
||||
utils_schema_utils.find_paths_with_security = find_paths_with_security
|
||||
utils_schema_utils.get_content_types_for_response = get_content_types_for_response
|
||||
utils_schema_utils.get_required_parameters = get_required_parameters
|
||||
|
||||
except ImportError as e:
|
||||
print(f"Error importing test utilities: {e}")
|
||||
# Define dummy functions if imports fail
|
||||
def dummy_load_openapi_spec():
|
||||
"""Dummy function for testing"""
|
||||
return {"paths": {}}
|
||||
utils_validation.load_openapi_spec = dummy_load_openapi_spec
|
||||
|
||||
def dummy_get_all_paths(spec):
|
||||
return list(spec.get("paths", {}).keys())
|
||||
utils_schema_utils.get_all_paths = dummy_get_all_paths
|
||||
|
||||
def dummy_get_grouped_paths(spec):
|
||||
return {}
|
||||
utils_schema_utils.get_grouped_paths = dummy_get_grouped_paths
|
||||
|
||||
def dummy_get_methods_for_path(spec, path):
|
||||
return []
|
||||
utils_schema_utils.get_methods_for_path = dummy_get_methods_for_path
|
||||
|
||||
def dummy_find_paths_with_security(spec, security_scheme=None):
|
||||
return []
|
||||
utils_schema_utils.find_paths_with_security = dummy_find_paths_with_security
|
||||
|
||||
def dummy_get_content_types_for_response(spec, path, method, status_code="200"):
|
||||
return []
|
||||
utils_schema_utils.get_content_types_for_response = dummy_get_content_types_for_response
|
||||
|
||||
def dummy_get_required_parameters(spec, path, method):
|
||||
return []
|
||||
utils_schema_utils.get_required_parameters = dummy_get_required_parameters
|
||||
|
||||
# Add merge_json_recursive from our mock utils
|
||||
from mocks.utils import merge_json_recursive
|
||||
utils_json_util.merge_json_recursive = merge_json_recursive
|
||||
|
||||
# Apply the mocks to sys.modules
|
||||
def apply_mocks():
|
||||
"""Apply all mocks to sys.modules"""
|
||||
sys.modules['server'] = server_mock
|
||||
sys.modules['app'] = app_mock
|
||||
sys.modules['app.custom_node_manager'] = app_custom_node_manager
|
||||
sys.modules['utils'] = utils_mock
|
||||
sys.modules['utils.json_util'] = utils_json_util
|
||||
sys.modules['utils.validation'] = utils_validation
|
||||
sys.modules['utils.schema_utils'] = utils_schema_utils
|
||||
|
||||
# Make sure our actual utils module is importable
|
||||
if current_dir not in sys.path:
|
||||
sys.path.insert(0, str(current_dir))
|
||||
@@ -1,71 +0,0 @@
|
||||
"""
|
||||
Mock PromptServer for testing purposes
|
||||
"""
|
||||
|
||||
class MockRoutes:
|
||||
"""
|
||||
Mock routing class with method decorators
|
||||
"""
|
||||
def __init__(self):
|
||||
self.routes = {}
|
||||
|
||||
def get(self, path):
|
||||
"""Decorator for GET routes"""
|
||||
def decorator(f):
|
||||
self.routes[('GET', path)] = f
|
||||
return f
|
||||
return decorator
|
||||
|
||||
def post(self, path):
|
||||
"""Decorator for POST routes"""
|
||||
def decorator(f):
|
||||
self.routes[('POST', path)] = f
|
||||
return f
|
||||
return decorator
|
||||
|
||||
def put(self, path):
|
||||
"""Decorator for PUT routes"""
|
||||
def decorator(f):
|
||||
self.routes[('PUT', path)] = f
|
||||
return f
|
||||
return decorator
|
||||
|
||||
def delete(self, path):
|
||||
"""Decorator for DELETE routes"""
|
||||
def decorator(f):
|
||||
self.routes[('DELETE', path)] = f
|
||||
return f
|
||||
return decorator
|
||||
|
||||
|
||||
class PromptServer:
|
||||
"""
|
||||
Mock implementation of the PromptServer class
|
||||
"""
|
||||
instance = None
|
||||
inst = None
|
||||
|
||||
def __init__(self):
|
||||
self.routes = MockRoutes()
|
||||
self.registered_paths = set()
|
||||
self.base_url = "http://127.0.0.1:8188" # Assuming server is running on default port
|
||||
self.queue_lock = None
|
||||
|
||||
def add_route(self, method, path, handler, *args, **kwargs):
|
||||
"""
|
||||
Add a mock route to the server
|
||||
"""
|
||||
self.routes.routes[(method.upper(), path)] = handler
|
||||
self.registered_paths.add(path)
|
||||
|
||||
async def send_msg(self, message, data=None):
|
||||
"""
|
||||
Mock send_msg method (does nothing in the mock)
|
||||
"""
|
||||
pass
|
||||
|
||||
def send_sync(self, message, data=None):
|
||||
"""
|
||||
Mock send_sync method (does nothing in the mock)
|
||||
"""
|
||||
pass
|
||||
@@ -1,20 +0,0 @@
|
||||
"""
|
||||
Mock utils module for testing purposes
|
||||
"""
|
||||
|
||||
def merge_json_recursive(a, b):
|
||||
"""
|
||||
Mock implementation of merge_json_recursive
|
||||
"""
|
||||
if isinstance(a, dict) and isinstance(b, dict):
|
||||
result = a.copy()
|
||||
for key, value in b.items():
|
||||
if key in result and isinstance(result[key], (dict, list)) and isinstance(value, (dict, list)):
|
||||
result[key] = merge_json_recursive(result[key], value)
|
||||
else:
|
||||
result[key] = value
|
||||
return result
|
||||
elif isinstance(a, list) and isinstance(b, list):
|
||||
return a + b
|
||||
else:
|
||||
return b
|
||||
@@ -1,382 +0,0 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: ComfyUI-Manager API
|
||||
description: API for managing ComfyUI extensions, custom nodes, and models
|
||||
version: 1.0.0
|
||||
contact:
|
||||
name: ComfyUI Community
|
||||
url: https://github.com/comfyanonymous/ComfyUI
|
||||
|
||||
servers:
|
||||
- url: http://localhost:8188
|
||||
description: Local ComfyUI server
|
||||
|
||||
paths:
|
||||
/customnode/getlist:
|
||||
get:
|
||||
summary: Get the list of custom nodes
|
||||
description: Returns the list of custom nodes from all configured channels
|
||||
parameters:
|
||||
- name: mode
|
||||
in: query
|
||||
description: "The mode to retrieve (local=installed nodes, remote=available nodes)"
|
||||
schema:
|
||||
type: string
|
||||
enum: [local, remote]
|
||||
default: remote
|
||||
responses:
|
||||
'200':
|
||||
description: List of custom nodes
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
nodes:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/CustomNode'
|
||||
'500':
|
||||
description: Server error
|
||||
|
||||
/customnode/get_node_mappings:
|
||||
get:
|
||||
summary: Get mappings between node class names and their custom nodes
|
||||
description: Returns mappings that help identify which custom node package provides specific node classes
|
||||
parameters:
|
||||
- name: mode
|
||||
in: query
|
||||
description: "The mode for mappings (local=installed nodes, nickname=node nicknames)"
|
||||
schema:
|
||||
type: string
|
||||
enum: [local, nickname]
|
||||
default: local
|
||||
required: true
|
||||
responses:
|
||||
'200':
|
||||
description: Node mappings
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
'500':
|
||||
description: Server error
|
||||
|
||||
/customnode/get_node_alternatives:
|
||||
get:
|
||||
summary: Get alternative nodes for specific node classes
|
||||
description: Returns alternative implementations of node classes from different custom node packages
|
||||
parameters:
|
||||
- name: mode
|
||||
in: query
|
||||
description: "The mode to retrieve alternatives (local=installed nodes, remote=all available nodes)"
|
||||
schema:
|
||||
type: string
|
||||
enum: [local, remote]
|
||||
default: remote
|
||||
responses:
|
||||
'200':
|
||||
description: Node alternatives
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
'500':
|
||||
description: Server error
|
||||
|
||||
/externalmodel/getlist:
|
||||
get:
|
||||
summary: Get the list of external models
|
||||
description: Returns the list of models from all configured channels
|
||||
parameters:
|
||||
- name: mode
|
||||
in: query
|
||||
description: "The mode to retrieve (local=installed models, remote=available models)"
|
||||
schema:
|
||||
type: string
|
||||
enum: [local, remote]
|
||||
default: remote
|
||||
responses:
|
||||
'200':
|
||||
description: List of external models
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
models:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ExternalModel'
|
||||
'500':
|
||||
description: Server error
|
||||
|
||||
/manager/get_config:
|
||||
get:
|
||||
summary: Get manager configuration
|
||||
description: Returns the current configuration of ComfyUI-Manager
|
||||
parameters:
|
||||
- name: key
|
||||
in: query
|
||||
description: "The configuration key to retrieve"
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
responses:
|
||||
'200':
|
||||
description: Configuration value
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
'400':
|
||||
description: Invalid key or missing parameter
|
||||
'500':
|
||||
description: Server error
|
||||
|
||||
/manager/set_config:
|
||||
post:
|
||||
summary: Set manager configuration
|
||||
description: Updates the configuration of ComfyUI-Manager
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- key
|
||||
- value
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
description: "The configuration key to update"
|
||||
value:
|
||||
type: string
|
||||
description: "The new value for the configuration key"
|
||||
responses:
|
||||
'200':
|
||||
description: Configuration updated successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
'400':
|
||||
description: Invalid key or value
|
||||
'500':
|
||||
description: Server error
|
||||
|
||||
/snapshot/getlist:
|
||||
get:
|
||||
summary: Get the list of snapshots
|
||||
description: Returns the list of saved snapshots
|
||||
responses:
|
||||
'200':
|
||||
description: List of snapshots
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
snapshots:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Snapshot'
|
||||
'500':
|
||||
description: Server error
|
||||
|
||||
/comfyui_manager/queue/status:
|
||||
get:
|
||||
summary: Get queue status
|
||||
description: Returns the current status of the operation queue
|
||||
responses:
|
||||
'200':
|
||||
description: Queue status
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/QueueStatus'
|
||||
'500':
|
||||
description: Server error
|
||||
|
||||
components:
|
||||
schemas:
|
||||
CustomNode:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- title
|
||||
- reference
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: "Internal name/ID of the custom node"
|
||||
title:
|
||||
type: string
|
||||
description: "Display title of the custom node"
|
||||
reference:
|
||||
type: string
|
||||
description: "Reference URL (usually GitHub repository URL)"
|
||||
description:
|
||||
type: string
|
||||
description: "Description of what the custom node does"
|
||||
install_type:
|
||||
type: string
|
||||
enum: [git, pip, copy]
|
||||
description: "Installation method for the custom node"
|
||||
files:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: "List of files provided by this custom node"
|
||||
node_class_names:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: "List of node class names provided by this custom node"
|
||||
installed:
|
||||
type: boolean
|
||||
description: "Whether the custom node is installed"
|
||||
version:
|
||||
type: string
|
||||
description: "Version of the custom node"
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: "Tags associated with the custom node"
|
||||
|
||||
ExternalModel:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- type
|
||||
- url
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: "Name of the model"
|
||||
type:
|
||||
type: string
|
||||
description: "Type of the model (checkpoint, lora, embedding, etc.)"
|
||||
url:
|
||||
type: string
|
||||
description: "Download URL for the model"
|
||||
description:
|
||||
type: string
|
||||
description: "Description of the model"
|
||||
size:
|
||||
type: integer
|
||||
description: "Size of the model in bytes"
|
||||
installed:
|
||||
type: boolean
|
||||
description: "Whether the model is installed"
|
||||
version:
|
||||
type: string
|
||||
description: "Version of the model"
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: "Tags associated with the model"
|
||||
|
||||
Snapshot:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- date
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: "Name of the snapshot"
|
||||
date:
|
||||
type: string
|
||||
format: date-time
|
||||
description: "Date when the snapshot was created"
|
||||
description:
|
||||
type: string
|
||||
description: "Description of the snapshot"
|
||||
nodes:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: "List of custom nodes in the snapshot"
|
||||
models:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: "List of models in the snapshot"
|
||||
|
||||
QueueStatus:
|
||||
type: object
|
||||
properties:
|
||||
pending:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/QueueItem'
|
||||
description: "List of pending operations in the queue"
|
||||
completed:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/QueueItem'
|
||||
description: "List of completed operations in the queue"
|
||||
failed:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/QueueItem'
|
||||
description: "List of failed operations in the queue"
|
||||
running:
|
||||
type: boolean
|
||||
description: "Whether the queue is currently running"
|
||||
|
||||
QueueItem:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- type
|
||||
- target
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: "Unique ID of the queue item"
|
||||
type:
|
||||
type: string
|
||||
enum: [install, update, uninstall]
|
||||
description: "Type of operation"
|
||||
target:
|
||||
type: string
|
||||
description: "Target of the operation (e.g., custom node name, model name)"
|
||||
status:
|
||||
type: string
|
||||
enum: [pending, processing, completed, failed]
|
||||
description: "Current status of the operation"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message if the operation failed"
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: "Time when the operation was added to the queue"
|
||||
completed_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: "Time when the operation was completed"
|
||||
|
||||
securitySchemes:
|
||||
ApiKeyAuth:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: X-API-Key
|
||||
description: "API key for authentication"
|
||||
@@ -1,6 +0,0 @@
|
||||
pytest>=7.3.1
|
||||
requests>=2.31.0
|
||||
openapi-spec-validator>=0.6.0
|
||||
jsonschema>=4.17.3
|
||||
pytest-asyncio>=0.21.0
|
||||
pyyaml>=6.0
|
||||
@@ -1,270 +0,0 @@
|
||||
"""
|
||||
Tests for configuration endpoints.
|
||||
"""
|
||||
import pytest
|
||||
from typing import Callable, Dict, List, Tuple
|
||||
|
||||
from utils.validation import validate_response
|
||||
|
||||
|
||||
def test_get_preview_method(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test getting the current preview method.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/manager/preview_method"
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Verify the response is one of the valid preview methods
|
||||
assert response.text in ["auto", "latent2rgb", "taesd", "none"]
|
||||
|
||||
|
||||
def test_get_db_mode(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test getting the current database mode.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/manager/db_mode"
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Verify the response is one of the valid database modes
|
||||
assert response.text in ["channel", "local", "remote"]
|
||||
|
||||
|
||||
def test_get_component_policy(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test getting the current component policy.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/manager/policy/component"
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Component policy could be any string
|
||||
assert response.text is not None
|
||||
|
||||
|
||||
def test_get_update_policy(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test getting the current update policy.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/manager/policy/update"
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Verify the response is one of the valid update policies
|
||||
assert response.text in ["stable", "nightly", "nightly-comfyui"]
|
||||
|
||||
|
||||
def test_get_channel_url_list(
|
||||
api_request: Callable,
|
||||
openapi_spec: Dict
|
||||
):
|
||||
"""
|
||||
Test getting the channel URL list.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/manager/channel_url_list"
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Validate response structure against the schema
|
||||
assert json_data is not None
|
||||
validate_response(
|
||||
response_data=json_data,
|
||||
path=path,
|
||||
method="get",
|
||||
spec=openapi_spec,
|
||||
)
|
||||
|
||||
# Verify the response contains the expected fields
|
||||
assert "selected" in json_data
|
||||
assert "list" in json_data
|
||||
assert isinstance(json_data["list"], list)
|
||||
|
||||
# Each channel should have a name and URL
|
||||
if json_data["list"]:
|
||||
first_channel = json_data["list"][0]
|
||||
assert "name" in first_channel
|
||||
assert "url" in first_channel
|
||||
|
||||
|
||||
def test_get_manager_version(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test getting the manager version.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/manager/version"
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Verify the response is a version string
|
||||
assert response.text.startswith("V") # Version strings start with V
|
||||
|
||||
|
||||
def test_get_manager_notice(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test getting the manager notice.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/manager/notice"
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Verify the response is HTML content
|
||||
assert response.headers.get("Content-Type", "").startswith("text/html") or "ComfyUI" in response.text
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying operations")
|
||||
class TestConfigChanges:
|
||||
"""
|
||||
Tests for changing configuration settings.
|
||||
These are skipped to avoid modifying state in automated tests.
|
||||
"""
|
||||
|
||||
@pytest.fixture(scope="class", autouse=True)
|
||||
def save_original_config(self, api_request: Callable):
|
||||
"""
|
||||
Save the original configuration to restore after tests.
|
||||
"""
|
||||
# Save original values
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path="/manager/preview_method",
|
||||
expected_status=200,
|
||||
)
|
||||
self.original_preview_method = response.text
|
||||
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path="/manager/db_mode",
|
||||
expected_status=200,
|
||||
)
|
||||
self.original_db_mode = response.text
|
||||
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path="/manager/policy/update",
|
||||
expected_status=200,
|
||||
)
|
||||
self.original_update_policy = response.text
|
||||
|
||||
yield
|
||||
|
||||
# Restore original values
|
||||
api_request(
|
||||
method="get",
|
||||
path="/manager/preview_method",
|
||||
params={"value": self.original_preview_method},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
api_request(
|
||||
method="get",
|
||||
path="/manager/db_mode",
|
||||
params={"value": self.original_db_mode},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
api_request(
|
||||
method="get",
|
||||
path="/manager/policy/update",
|
||||
params={"value": self.original_update_policy},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
def test_set_preview_method(self, api_request: Callable):
|
||||
"""
|
||||
Test setting the preview method.
|
||||
"""
|
||||
# Set to a different value (taesd)
|
||||
api_request(
|
||||
method="get",
|
||||
path="/manager/preview_method",
|
||||
params={"value": "taesd"},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Verify it was changed
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path="/manager/preview_method",
|
||||
expected_status=200,
|
||||
)
|
||||
assert response.text == "taesd"
|
||||
|
||||
def test_set_db_mode(self, api_request: Callable):
|
||||
"""
|
||||
Test setting the database mode.
|
||||
"""
|
||||
# Set to local mode
|
||||
api_request(
|
||||
method="get",
|
||||
path="/manager/db_mode",
|
||||
params={"value": "local"},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Verify it was changed
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path="/manager/db_mode",
|
||||
expected_status=200,
|
||||
)
|
||||
assert response.text == "local"
|
||||
|
||||
def test_set_update_policy(self, api_request: Callable):
|
||||
"""
|
||||
Test setting the update policy.
|
||||
"""
|
||||
# Set to stable
|
||||
api_request(
|
||||
method="get",
|
||||
path="/manager/policy/update",
|
||||
params={"value": "stable"},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Verify it was changed
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path="/manager/policy/update",
|
||||
expected_status=200,
|
||||
)
|
||||
assert response.text == "stable"
|
||||
@@ -1,200 +0,0 @@
|
||||
"""
|
||||
Tests for custom node management endpoints.
|
||||
"""
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
from typing import Callable, Dict, Tuple
|
||||
|
||||
from utils.validation import validate_response
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"mode",
|
||||
["local", "remote"]
|
||||
)
|
||||
def test_get_custom_node_list(
|
||||
api_request: Callable,
|
||||
openapi_spec: Dict,
|
||||
mode: str
|
||||
):
|
||||
"""
|
||||
Test the endpoint for listing custom nodes.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/customnode/getlist"
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
params={"mode": mode, "skip_update": "true"},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Validate response structure against the schema
|
||||
assert json_data is not None
|
||||
validate_response(
|
||||
response_data=json_data,
|
||||
path=path,
|
||||
method="get",
|
||||
spec=openapi_spec,
|
||||
)
|
||||
|
||||
# Verify the response contains the expected fields
|
||||
assert "channel" in json_data
|
||||
assert "node_packs" in json_data
|
||||
assert isinstance(json_data["node_packs"], dict)
|
||||
|
||||
# If there are any node packs, verify they have the expected structure
|
||||
if json_data["node_packs"]:
|
||||
# Take the first node pack to validate
|
||||
first_node_pack = next(iter(json_data["node_packs"].values()))
|
||||
assert "title" in first_node_pack
|
||||
assert "name" in first_node_pack
|
||||
|
||||
|
||||
def test_get_installed_nodes(
|
||||
api_request: Callable,
|
||||
openapi_spec: Dict
|
||||
):
|
||||
"""
|
||||
Test the endpoint for listing installed nodes.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/customnode/installed"
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Validate response structure against the schema
|
||||
assert json_data is not None
|
||||
validate_response(
|
||||
response_data=json_data,
|
||||
path=path,
|
||||
method="get",
|
||||
spec=openapi_spec,
|
||||
)
|
||||
|
||||
# Verify the response is a dictionary of node packs
|
||||
assert isinstance(json_data, dict)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"mode",
|
||||
["local", "nickname"]
|
||||
)
|
||||
def test_get_node_mappings(
|
||||
api_request: Callable,
|
||||
openapi_spec: Dict,
|
||||
mode: str
|
||||
):
|
||||
"""
|
||||
Test the endpoint for getting node-to-package mappings.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/customnode/getmappings"
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
params={"mode": mode},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Validate response structure against the schema
|
||||
assert json_data is not None
|
||||
validate_response(
|
||||
response_data=json_data,
|
||||
path=path,
|
||||
method="get",
|
||||
spec=openapi_spec,
|
||||
)
|
||||
|
||||
# Verify the response is a dictionary mapping extension IDs to node info
|
||||
assert isinstance(json_data, dict)
|
||||
|
||||
# If there are any mappings, verify they have the expected structure
|
||||
if json_data:
|
||||
# Take the first mapping to validate
|
||||
first_mapping = next(iter(json_data.values()))
|
||||
assert isinstance(first_mapping, list)
|
||||
assert len(first_mapping) == 2
|
||||
assert isinstance(first_mapping[0], list) # List of node classes
|
||||
assert isinstance(first_mapping[1], dict) # Metadata
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"mode",
|
||||
["local", "remote"]
|
||||
)
|
||||
def test_get_node_alternatives(
|
||||
api_request: Callable,
|
||||
openapi_spec: Dict,
|
||||
mode: str
|
||||
):
|
||||
"""
|
||||
Test the endpoint for getting alternative node options.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/customnode/alternatives"
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
params={"mode": mode},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Validate response structure against the schema
|
||||
assert json_data is not None
|
||||
validate_response(
|
||||
response_data=json_data,
|
||||
path=path,
|
||||
method="get",
|
||||
spec=openapi_spec,
|
||||
)
|
||||
|
||||
# Verify the response is a dictionary
|
||||
assert isinstance(json_data, dict)
|
||||
|
||||
|
||||
def test_fetch_updates(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test the endpoint for fetching updates.
|
||||
This might modify state, so we just check for a valid response.
|
||||
"""
|
||||
# Make the API request with skip_update=true to avoid actual updates
|
||||
path = "/customnode/fetch_updates"
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
params={"mode": "local"},
|
||||
# Don't validate JSON since this endpoint doesn't return JSON
|
||||
expected_status=200,
|
||||
retry_on_error=False, # Don't retry as this might have side effects
|
||||
)
|
||||
|
||||
# Just check the status code is as expected (covered by api_request)
|
||||
assert response.status_code in [200, 201]
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Queue endpoints are better tested with queue operations")
|
||||
def test_queue_update_all(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test the endpoint for queuing updates for all nodes.
|
||||
Skipping as this would actually modify the installation.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Security-restricted endpoint")
|
||||
def test_install_node_via_git_url(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test the endpoint for installing a node via Git URL.
|
||||
Skipping as this requires high security level and would modify the installation.
|
||||
"""
|
||||
pass
|
||||
@@ -1,23 +0,0 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Print current working directory
|
||||
print(f"Current directory: {os.getcwd()}")
|
||||
|
||||
# Print module search path
|
||||
print(f"System path: {sys.path}")
|
||||
|
||||
# Try to import
|
||||
try:
|
||||
from utils.validation import load_openapi_spec
|
||||
print("Import successful!")
|
||||
except ImportError as e:
|
||||
print(f"Import error: {e}")
|
||||
|
||||
# Try direct import
|
||||
try:
|
||||
sys.path.insert(0, os.path.join(os.getcwd(), "custom_nodes/ComfyUI-Manager/tests-api"))
|
||||
from utils.validation import load_openapi_spec
|
||||
print("Direct import successful!")
|
||||
except ImportError as e:
|
||||
print(f"Direct import error: {e}")
|
||||
@@ -1,62 +0,0 @@
|
||||
"""
|
||||
Tests for model management endpoints.
|
||||
These features are scheduled for deprecation, so tests are minimal.
|
||||
"""
|
||||
import pytest
|
||||
from typing import Callable, Dict
|
||||
|
||||
from utils.validation import validate_response
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"mode",
|
||||
["local", "remote"]
|
||||
)
|
||||
def test_get_external_model_list(
|
||||
api_request: Callable,
|
||||
openapi_spec: Dict,
|
||||
mode: str
|
||||
):
|
||||
"""
|
||||
Test the endpoint for listing external models.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/externalmodel/getlist"
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
params={"mode": mode},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Validate response structure against the schema
|
||||
assert json_data is not None
|
||||
validate_response(
|
||||
response_data=json_data,
|
||||
path=path,
|
||||
method="get",
|
||||
spec=openapi_spec,
|
||||
)
|
||||
|
||||
# Verify the response contains the expected fields
|
||||
assert "models" in json_data
|
||||
assert isinstance(json_data["models"], list)
|
||||
|
||||
# If there are any models, verify they have the expected structure
|
||||
if json_data["models"]:
|
||||
first_model = json_data["models"][0]
|
||||
assert "name" in first_model
|
||||
assert "type" in first_model
|
||||
assert "url" in first_model
|
||||
assert "filename" in first_model
|
||||
assert "installed" in first_model
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying operation that requires auth")
|
||||
def test_install_model():
|
||||
"""
|
||||
Test queuing a model installation.
|
||||
Skipped to avoid modifying state and requires authentication.
|
||||
This feature is also scheduled for deprecation.
|
||||
"""
|
||||
pass
|
||||
@@ -1,213 +0,0 @@
|
||||
"""
|
||||
Tests for queue management endpoints.
|
||||
"""
|
||||
import pytest
|
||||
import time
|
||||
from pathlib import Path
|
||||
from typing import Callable, Dict, Tuple
|
||||
|
||||
from utils.validation import validate_response
|
||||
|
||||
|
||||
def test_get_queue_status(
|
||||
api_request: Callable,
|
||||
openapi_spec: Dict
|
||||
):
|
||||
"""
|
||||
Test the endpoint for getting queue status.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/manager/queue/status"
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Validate response structure against the schema
|
||||
assert json_data is not None
|
||||
validate_response(
|
||||
response_data=json_data,
|
||||
path=path,
|
||||
method="get",
|
||||
spec=openapi_spec,
|
||||
)
|
||||
|
||||
# Verify the response contains the expected fields
|
||||
assert "total_count" in json_data
|
||||
assert "done_count" in json_data
|
||||
assert "in_progress_count" in json_data
|
||||
assert "is_processing" in json_data
|
||||
|
||||
# Type checks
|
||||
assert isinstance(json_data["total_count"], int)
|
||||
assert isinstance(json_data["done_count"], int)
|
||||
assert isinstance(json_data["in_progress_count"], int)
|
||||
assert isinstance(json_data["is_processing"], bool)
|
||||
|
||||
|
||||
def test_reset_queue(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test the endpoint for resetting the queue.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/manager/queue/reset"
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Now check the queue status to verify it was reset
|
||||
response2, json_data = api_request(
|
||||
method="get",
|
||||
path="/manager/queue/status",
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Queue should be empty after reset
|
||||
assert json_data["total_count"] == json_data["done_count"] + json_data["in_progress_count"]
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying operation that requires auth")
|
||||
def test_queue_install_node():
|
||||
"""
|
||||
Test queuing a node installation.
|
||||
Skipped to avoid modifying state and requires authentication.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying operation that requires auth")
|
||||
def test_queue_update_node():
|
||||
"""
|
||||
Test queuing a node update.
|
||||
Skipped to avoid modifying state and requires authentication.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying operation that requires auth")
|
||||
def test_queue_uninstall_node():
|
||||
"""
|
||||
Test queuing a node uninstallation.
|
||||
Skipped to avoid modifying state and requires authentication.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying operation")
|
||||
def test_queue_start():
|
||||
"""
|
||||
Test starting the queue.
|
||||
Skipped to avoid modifying state.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class TestQueueOperations:
|
||||
"""
|
||||
Test a complete queue workflow.
|
||||
These tests are grouped to ensure proper sequencing but are still skipped
|
||||
to avoid modifying state in automated tests.
|
||||
"""
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def node_data(self) -> Dict:
|
||||
"""
|
||||
Create test data for a node operation.
|
||||
"""
|
||||
# This would be replaced with actual data for a known safe node
|
||||
return {
|
||||
"ui_id": "test_node_1",
|
||||
"id": "comfyui-manager", # Manager itself
|
||||
"version": "latest",
|
||||
"channel": "default",
|
||||
"mode": "local",
|
||||
}
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying operation")
|
||||
def test_queue_operation_sequence(
|
||||
self,
|
||||
api_request: Callable,
|
||||
node_data: Dict
|
||||
):
|
||||
"""
|
||||
Test the queue operation sequence.
|
||||
"""
|
||||
# 1. Reset the queue
|
||||
api_request(
|
||||
method="get",
|
||||
path="/manager/queue/reset",
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# 2. Queue a node operation (we'll use the manager itself)
|
||||
api_request(
|
||||
method="post",
|
||||
path="/manager/queue/update",
|
||||
json_data=node_data,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# 3. Check queue status - should have one operation
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path="/manager/queue/status",
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
assert json_data["total_count"] > 0
|
||||
assert not json_data["is_processing"] # Queue hasn't started yet
|
||||
|
||||
# 4. Start the queue
|
||||
api_request(
|
||||
method="get",
|
||||
path="/manager/queue/start",
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# 5. Check queue status again - should be processing
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path="/manager/queue/status",
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Queue should be processing or already done
|
||||
assert json_data["is_processing"] or json_data["done_count"] == json_data["total_count"]
|
||||
|
||||
# 6. Wait for queue to complete (with timeout)
|
||||
max_wait_time = 60 # seconds
|
||||
start_time = time.time()
|
||||
completed = False
|
||||
|
||||
while time.time() - start_time < max_wait_time:
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path="/manager/queue/status",
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
if json_data["done_count"] == json_data["total_count"] and not json_data["is_processing"]:
|
||||
completed = True
|
||||
break
|
||||
|
||||
time.sleep(2) # Wait before checking again
|
||||
|
||||
assert completed, "Queue did not complete within timeout period"
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying operation")
|
||||
def test_concurrent_queue_operations(
|
||||
self,
|
||||
api_request: Callable,
|
||||
node_data: Dict
|
||||
):
|
||||
"""
|
||||
Test concurrent queue operations.
|
||||
"""
|
||||
# This would test adding multiple operations to the queue
|
||||
# and verifying they all complete correctly
|
||||
pass
|
||||
@@ -1,198 +0,0 @@
|
||||
"""
|
||||
Tests for snapshot management endpoints.
|
||||
"""
|
||||
import pytest
|
||||
import time
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Callable, Dict, List, Optional
|
||||
|
||||
from utils.validation import validate_response
|
||||
|
||||
|
||||
def test_get_snapshot_list(
|
||||
api_request: Callable,
|
||||
openapi_spec: Dict
|
||||
):
|
||||
"""
|
||||
Test the endpoint for listing snapshots.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/snapshot/getlist"
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Validate response structure against the schema
|
||||
assert json_data is not None
|
||||
validate_response(
|
||||
response_data=json_data,
|
||||
path=path,
|
||||
method="get",
|
||||
spec=openapi_spec,
|
||||
)
|
||||
|
||||
# Verify the response contains the expected fields
|
||||
assert "items" in json_data
|
||||
assert isinstance(json_data["items"], list)
|
||||
|
||||
|
||||
def test_get_current_snapshot(
|
||||
api_request: Callable,
|
||||
openapi_spec: Dict
|
||||
):
|
||||
"""
|
||||
Test the endpoint for getting the current snapshot.
|
||||
"""
|
||||
# Make the API request
|
||||
path = "/snapshot/get_current"
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path=path,
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Validate response structure against the schema
|
||||
assert json_data is not None
|
||||
validate_response(
|
||||
response_data=json_data,
|
||||
path=path,
|
||||
method="get",
|
||||
spec=openapi_spec,
|
||||
)
|
||||
|
||||
# Check for basic snapshot structure
|
||||
assert "snapshot_date" in json_data
|
||||
assert "custom_nodes" in json_data
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="This test creates a snapshot which is a state-modifying operation")
|
||||
def test_save_snapshot(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test the endpoint for saving a new snapshot.
|
||||
Skipped to avoid modifying state in tests.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="This test removes a snapshot which is a destructive operation")
|
||||
def test_remove_snapshot(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test the endpoint for removing a snapshot.
|
||||
Skipped to avoid modifying state in tests.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="This test restores a snapshot which is a state-modifying operation")
|
||||
def test_restore_snapshot(
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test the endpoint for restoring a snapshot.
|
||||
Skipped to avoid modifying state in tests.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class TestSnapshotWorkflow:
|
||||
"""
|
||||
Test the complete snapshot workflow (create, list, get, remove).
|
||||
These tests are grouped to ensure proper sequencing but are still skipped
|
||||
to avoid modifying state in automated tests.
|
||||
"""
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def snapshot_name(self) -> str:
|
||||
"""
|
||||
Generate a unique snapshot name for testing.
|
||||
"""
|
||||
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||
return f"test_snapshot_{timestamp}"
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying test")
|
||||
def test_create_snapshot(
|
||||
self,
|
||||
api_request: Callable,
|
||||
snapshot_name: str
|
||||
):
|
||||
"""
|
||||
Test creating a snapshot.
|
||||
"""
|
||||
# Make the API request to save a snapshot
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path="/snapshot/save",
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Verify a snapshot was created (would need to check the snapshot list)
|
||||
response2, json_data = api_request(
|
||||
method="get",
|
||||
path="/snapshot/getlist",
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# The most recently created snapshot should be first in the list
|
||||
assert json_data["items"]
|
||||
|
||||
# Store the snapshot name for later tests
|
||||
self.actual_snapshot_name = json_data["items"][0]
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying test")
|
||||
def test_get_snapshot_details(
|
||||
self,
|
||||
api_request: Callable,
|
||||
openapi_spec: Dict
|
||||
):
|
||||
"""
|
||||
Test getting details of the created snapshot.
|
||||
"""
|
||||
# This would check the current snapshot, not a specific one
|
||||
# since there's no direct API to get a specific snapshot
|
||||
response, json_data = api_request(
|
||||
method="get",
|
||||
path="/snapshot/get_current",
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Validate the snapshot data
|
||||
assert json_data is not None
|
||||
validate_response(
|
||||
response_data=json_data,
|
||||
path="/snapshot/get_current",
|
||||
method="get",
|
||||
spec=openapi_spec,
|
||||
)
|
||||
|
||||
@pytest.mark.skip(reason="State-modifying test")
|
||||
def test_remove_test_snapshot(
|
||||
self,
|
||||
api_request: Callable
|
||||
):
|
||||
"""
|
||||
Test removing the test snapshot.
|
||||
"""
|
||||
# Make the API request to remove the snapshot
|
||||
response, _ = api_request(
|
||||
method="get",
|
||||
path="/snapshot/remove",
|
||||
params={"target": self.actual_snapshot_name},
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# Verify the snapshot was removed
|
||||
response2, json_data = api_request(
|
||||
method="get",
|
||||
path="/snapshot/getlist",
|
||||
expected_status=200,
|
||||
)
|
||||
|
||||
# The snapshot should no longer be in the list
|
||||
assert self.actual_snapshot_name not in json_data["items"]
|
||||
@@ -1,150 +0,0 @@
|
||||
"""
|
||||
Tests for validating the OpenAPI specification.
|
||||
"""
|
||||
import json
|
||||
import pytest
|
||||
import yaml
|
||||
from typing import Dict, Any, List, Tuple
|
||||
from pathlib import Path
|
||||
from openapi_spec_validator import validate_spec
|
||||
from utils.validation import load_openapi_spec
|
||||
from utils.schema_utils import (
|
||||
get_all_paths,
|
||||
get_methods_for_path,
|
||||
find_paths_with_security,
|
||||
get_required_parameters
|
||||
)
|
||||
|
||||
|
||||
def test_spec_is_valid():
|
||||
"""
|
||||
Test that the OpenAPI specification is valid according to the spec validator.
|
||||
"""
|
||||
spec = load_openapi_spec()
|
||||
validate_spec(spec)
|
||||
|
||||
|
||||
def test_spec_has_info():
|
||||
"""
|
||||
Test that the OpenAPI specification has basic info.
|
||||
"""
|
||||
spec = load_openapi_spec()
|
||||
|
||||
assert "info" in spec
|
||||
assert "title" in spec["info"]
|
||||
assert "version" in spec["info"]
|
||||
assert spec["info"]["title"] == "ComfyUI-Manager API"
|
||||
|
||||
|
||||
def test_spec_has_paths():
|
||||
"""
|
||||
Test that the OpenAPI specification has paths defined.
|
||||
"""
|
||||
spec = load_openapi_spec()
|
||||
|
||||
assert "paths" in spec
|
||||
assert len(spec["paths"]) > 0
|
||||
|
||||
|
||||
def test_paths_have_responses():
|
||||
"""
|
||||
Test that all paths have responses defined.
|
||||
"""
|
||||
spec = load_openapi_spec()
|
||||
|
||||
for path, path_item in spec["paths"].items():
|
||||
for method, operation in path_item.items():
|
||||
if method.lower() not in {"get", "post", "put", "delete", "patch", "options", "head"}:
|
||||
continue
|
||||
|
||||
assert "responses" in operation, f"Path {path} method {method} has no responses"
|
||||
assert len(operation["responses"]) > 0, f"Path {path} method {method} has empty responses"
|
||||
|
||||
|
||||
def test_responses_have_schemas():
|
||||
"""
|
||||
Test that responses with application/json content type have schemas.
|
||||
"""
|
||||
spec = load_openapi_spec()
|
||||
|
||||
for path, path_item in spec["paths"].items():
|
||||
for method, operation in path_item.items():
|
||||
if method.lower() not in {"get", "post", "put", "delete", "patch", "options", "head"}:
|
||||
continue
|
||||
|
||||
for status, response in operation["responses"].items():
|
||||
if "content" not in response:
|
||||
continue
|
||||
|
||||
if "application/json" in response["content"]:
|
||||
assert "schema" in response["content"]["application/json"], (
|
||||
f"Path {path} method {method} status {status} "
|
||||
f"application/json content has no schema"
|
||||
)
|
||||
|
||||
|
||||
def test_required_parameters_have_schemas():
|
||||
"""
|
||||
Test that all required parameters have schemas.
|
||||
"""
|
||||
spec = load_openapi_spec()
|
||||
|
||||
for path, path_item in spec["paths"].items():
|
||||
for method, operation in path_item.items():
|
||||
if method.lower() not in {"get", "post", "put", "delete", "patch", "options", "head"}:
|
||||
continue
|
||||
|
||||
if "parameters" not in operation:
|
||||
continue
|
||||
|
||||
for param in operation["parameters"]:
|
||||
if param.get("required", False):
|
||||
assert "schema" in param, (
|
||||
f"Path {path} method {method} required parameter {param.get('name')} has no schema"
|
||||
)
|
||||
|
||||
|
||||
def test_security_schemes_defined():
|
||||
"""
|
||||
Test that security schemes are properly defined.
|
||||
"""
|
||||
spec = load_openapi_spec()
|
||||
|
||||
# Get paths requiring security
|
||||
secure_paths = find_paths_with_security(spec)
|
||||
|
||||
if secure_paths:
|
||||
assert "components" in spec, "Spec has secure paths but no components"
|
||||
assert "securitySchemes" in spec["components"], "Spec has secure paths but no securitySchemes"
|
||||
|
||||
# Check each security reference is defined
|
||||
for path, method in secure_paths:
|
||||
operation = spec["paths"][path][method]
|
||||
for security_req in operation["security"]:
|
||||
for scheme_name in security_req:
|
||||
assert scheme_name in spec["components"]["securitySchemes"], (
|
||||
f"Security scheme {scheme_name} used by {method.upper()} {path} "
|
||||
f"is not defined in components.securitySchemes"
|
||||
)
|
||||
|
||||
|
||||
def test_common_endpoint_groups_present():
|
||||
"""
|
||||
Test that the spec includes the main endpoint groups.
|
||||
"""
|
||||
spec = load_openapi_spec()
|
||||
paths = get_all_paths(spec)
|
||||
|
||||
# Define the expected endpoint prefixes
|
||||
expected_prefixes = [
|
||||
"/customnode/",
|
||||
"/externalmodel/",
|
||||
"/manager/",
|
||||
"/snapshot/",
|
||||
"/comfyui_manager/",
|
||||
]
|
||||
|
||||
# Check that at least one path exists for each expected prefix
|
||||
for prefix in expected_prefixes:
|
||||
matching_paths = [p for p in paths if p.startswith(prefix)]
|
||||
assert matching_paths, f"No endpoints found with prefix {prefix}"
|
||||
@@ -1 +0,0 @@
|
||||
# Make utils directory a proper package
|
||||
@@ -1,174 +0,0 @@
|
||||
"""
|
||||
Schema utilities for extracting and manipulating OpenAPI schemas.
|
||||
"""
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional, Set, Tuple
|
||||
from .validation import load_openapi_spec
|
||||
|
||||
|
||||
def get_all_paths(spec: Dict[str, Any]) -> List[str]:
|
||||
"""
|
||||
Get all paths defined in the OpenAPI specification.
|
||||
|
||||
Args:
|
||||
spec: The OpenAPI specification
|
||||
|
||||
Returns:
|
||||
List of all paths
|
||||
"""
|
||||
return list(spec.get("paths", {}).keys())
|
||||
|
||||
|
||||
def get_grouped_paths(spec: Dict[str, Any]) -> Dict[str, List[str]]:
|
||||
"""
|
||||
Group paths by their top-level segment.
|
||||
|
||||
Args:
|
||||
spec: The OpenAPI specification
|
||||
|
||||
Returns:
|
||||
Dictionary mapping top-level segments to lists of paths
|
||||
"""
|
||||
result = {}
|
||||
|
||||
for path in get_all_paths(spec):
|
||||
segments = path.strip("/").split("/")
|
||||
if not segments:
|
||||
continue
|
||||
|
||||
top_segment = segments[0]
|
||||
if top_segment not in result:
|
||||
result[top_segment] = []
|
||||
|
||||
result[top_segment].append(path)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def get_methods_for_path(spec: Dict[str, Any], path: str) -> List[str]:
|
||||
"""
|
||||
Get all HTTP methods defined for a path.
|
||||
|
||||
Args:
|
||||
spec: The OpenAPI specification
|
||||
path: The API path
|
||||
|
||||
Returns:
|
||||
List of HTTP methods (lowercase)
|
||||
"""
|
||||
if path not in spec.get("paths", {}):
|
||||
return []
|
||||
|
||||
return [
|
||||
method.lower()
|
||||
for method in spec["paths"][path].keys()
|
||||
if method.lower() in {"get", "post", "put", "delete", "patch", "options", "head"}
|
||||
]
|
||||
|
||||
|
||||
def find_paths_with_security(
|
||||
spec: Dict[str, Any],
|
||||
security_scheme: Optional[str] = None
|
||||
) -> List[Tuple[str, str]]:
|
||||
"""
|
||||
Find all paths that require security.
|
||||
|
||||
Args:
|
||||
spec: The OpenAPI specification
|
||||
security_scheme: Optional specific security scheme to filter by
|
||||
|
||||
Returns:
|
||||
List of (path, method) tuples that require security
|
||||
"""
|
||||
result = []
|
||||
|
||||
for path, path_item in spec.get("paths", {}).items():
|
||||
for method, operation in path_item.items():
|
||||
if method.lower() not in {"get", "post", "put", "delete", "patch", "options", "head"}:
|
||||
continue
|
||||
|
||||
if "security" in operation:
|
||||
if security_scheme is None:
|
||||
result.append((path, method.lower()))
|
||||
else:
|
||||
# Check if this security scheme is required
|
||||
for security_req in operation["security"]:
|
||||
if security_scheme in security_req:
|
||||
result.append((path, method.lower()))
|
||||
break
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def get_content_types_for_response(
|
||||
spec: Dict[str, Any],
|
||||
path: str,
|
||||
method: str,
|
||||
status_code: str = "200"
|
||||
) -> List[str]:
|
||||
"""
|
||||
Get content types defined for a response.
|
||||
|
||||
Args:
|
||||
spec: The OpenAPI specification
|
||||
path: The API path
|
||||
method: The HTTP method
|
||||
status_code: The HTTP status code
|
||||
|
||||
Returns:
|
||||
List of content types
|
||||
"""
|
||||
method = method.lower()
|
||||
|
||||
if path not in spec["paths"]:
|
||||
return []
|
||||
|
||||
if method not in spec["paths"][path]:
|
||||
return []
|
||||
|
||||
if "responses" not in spec["paths"][path][method]:
|
||||
return []
|
||||
|
||||
if status_code not in spec["paths"][path][method]["responses"]:
|
||||
return []
|
||||
|
||||
response_def = spec["paths"][path][method]["responses"][status_code]
|
||||
|
||||
if "content" not in response_def:
|
||||
return []
|
||||
|
||||
return list(response_def["content"].keys())
|
||||
|
||||
|
||||
def get_required_parameters(
|
||||
spec: Dict[str, Any],
|
||||
path: str,
|
||||
method: str
|
||||
) -> List[Dict[str, Any]]:
|
||||
"""
|
||||
Get all required parameters for a path/method.
|
||||
|
||||
Args:
|
||||
spec: The OpenAPI specification
|
||||
path: The API path
|
||||
method: The HTTP method
|
||||
|
||||
Returns:
|
||||
List of parameter objects that are required
|
||||
"""
|
||||
method = method.lower()
|
||||
|
||||
if path not in spec["paths"]:
|
||||
return []
|
||||
|
||||
if method not in spec["paths"][path]:
|
||||
return []
|
||||
|
||||
if "parameters" not in spec["paths"][path][method]:
|
||||
return []
|
||||
|
||||
return [
|
||||
param for param in spec["paths"][path][method]["parameters"]
|
||||
if param.get("required", False)
|
||||
]
|
||||
@@ -1,155 +0,0 @@
|
||||
"""
|
||||
Validation utilities for API tests.
|
||||
"""
|
||||
import json
|
||||
import jsonschema
|
||||
import yaml
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
|
||||
def load_openapi_spec(spec_path: Union[str, Path] = None) -> Dict[str, Any]:
|
||||
"""
|
||||
Load the OpenAPI specification document.
|
||||
|
||||
Args:
|
||||
spec_path: Path to the OpenAPI specification file
|
||||
|
||||
Returns:
|
||||
The OpenAPI specification as a dictionary
|
||||
"""
|
||||
if spec_path is None:
|
||||
# Default to the root openapi.yaml file
|
||||
spec_path = Path(__file__).parents[2] / "openapi.yaml"
|
||||
|
||||
with open(spec_path, "r") as f:
|
||||
if str(spec_path).endswith(".yaml") or str(spec_path).endswith(".yml"):
|
||||
return yaml.safe_load(f)
|
||||
else:
|
||||
return json.load(f)
|
||||
|
||||
|
||||
def get_schema_for_path(
|
||||
spec: Dict[str, Any],
|
||||
path: str,
|
||||
method: str,
|
||||
status_code: str = "200",
|
||||
content_type: str = "application/json"
|
||||
) -> Optional[Dict[str, Any]]:
|
||||
"""
|
||||
Extract the response schema for a specific path, method, and status code.
|
||||
|
||||
Args:
|
||||
spec: The OpenAPI specification
|
||||
path: The API path (e.g., "/customnode/getlist")
|
||||
method: The HTTP method (e.g., "get", "post")
|
||||
status_code: The HTTP status code (default: "200")
|
||||
content_type: The response content type (default: "application/json")
|
||||
|
||||
Returns:
|
||||
The schema for the specified path and method, or None if not found
|
||||
"""
|
||||
method = method.lower()
|
||||
|
||||
if path not in spec["paths"]:
|
||||
return None
|
||||
|
||||
if method not in spec["paths"][path]:
|
||||
return None
|
||||
|
||||
if "responses" not in spec["paths"][path][method]:
|
||||
return None
|
||||
|
||||
if status_code not in spec["paths"][path][method]["responses"]:
|
||||
return None
|
||||
|
||||
response_def = spec["paths"][path][method]["responses"][status_code]
|
||||
|
||||
if "content" not in response_def:
|
||||
return None
|
||||
|
||||
if content_type not in response_def["content"]:
|
||||
return None
|
||||
|
||||
if "schema" not in response_def["content"][content_type]:
|
||||
return None
|
||||
|
||||
return response_def["content"][content_type]["schema"]
|
||||
|
||||
|
||||
def validate_response_schema(
|
||||
response_data: Any,
|
||||
schema: Dict[str, Any],
|
||||
spec: Dict[str, Any] = None
|
||||
) -> bool:
|
||||
"""
|
||||
Validate a response against a schema from the OpenAPI specification.
|
||||
|
||||
Args:
|
||||
response_data: The response data to validate
|
||||
schema: The schema to validate against
|
||||
spec: The complete OpenAPI specification (for resolving references)
|
||||
|
||||
Returns:
|
||||
True if validation succeeds, raises an exception otherwise
|
||||
"""
|
||||
if spec is None:
|
||||
spec = load_openapi_spec()
|
||||
|
||||
# Create a resolver for references within the schema
|
||||
resolver = jsonschema.RefResolver.from_schema(spec)
|
||||
|
||||
# Validate the response against the schema
|
||||
jsonschema.validate(
|
||||
instance=response_data,
|
||||
schema=schema,
|
||||
resolver=resolver
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def validate_response(
|
||||
response_data: Any,
|
||||
path: str,
|
||||
method: str,
|
||||
status_code: str = "200",
|
||||
content_type: str = "application/json",
|
||||
spec: Dict[str, Any] = None
|
||||
) -> bool:
|
||||
"""
|
||||
Validate a response against the schema defined in the OpenAPI specification.
|
||||
|
||||
Args:
|
||||
response_data: The response data to validate
|
||||
path: The API path
|
||||
method: The HTTP method
|
||||
status_code: The HTTP status code (default: "200")
|
||||
content_type: The response content type (default: "application/json")
|
||||
spec: The OpenAPI specification (loaded from default location if None)
|
||||
|
||||
Returns:
|
||||
True if validation succeeds, raises an exception otherwise
|
||||
"""
|
||||
if spec is None:
|
||||
spec = load_openapi_spec()
|
||||
|
||||
schema = get_schema_for_path(
|
||||
spec=spec,
|
||||
path=path,
|
||||
method=method,
|
||||
status_code=status_code,
|
||||
content_type=content_type
|
||||
)
|
||||
|
||||
if schema is None:
|
||||
raise ValueError(
|
||||
f"No schema found for {method.upper()} {path} "
|
||||
f"with status {status_code} and content type {content_type}"
|
||||
)
|
||||
|
||||
return validate_response_schema(
|
||||
response_data=response_data,
|
||||
schema=schema,
|
||||
spec=spec
|
||||
)
|
||||
Reference in New Issue
Block a user