comfyui-manager 4.2.2__tar.gz → 4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {comfyui_manager-4.2.2/comfyui_manager.egg-info → comfyui_manager-4.4}/PKG-INFO +99 -6
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/README.md +95 -4
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/cm_cli/__main__.py +2 -3
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/cnr_utils.py +2 -1
- comfyui_manager-4.4/comfyui_manager/common/config_writer.py +76 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/git_utils.py +2 -1
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/manager_security.py +101 -0
- comfyui_manager-4.4/comfyui_manager/common/manager_util.py +965 -0
- comfyui_manager-4.4/comfyui_manager/common/security_messages.py +7 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/timestamp_utils.py +6 -3
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/unified_dep_resolver.py +30 -37
- comfyui_manager-4.4/comfyui_manager/glob/constants.py +47 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/glob/manager_core.py +133 -160
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/glob/manager_server.py +34 -24
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/glob/share_3rdparty.py +11 -198
- comfyui_manager-4.4/comfyui_manager/glob/utils/formatting_utils.py +21 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/glob/utils/model_utils.py +2 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/README.md +0 -2
- comfyui_manager-4.4/comfyui_manager/js/cm-api.js +154 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/comfyui-manager.js +49 -88
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/comfyui-share-common.js +14 -246
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/comfyui-share-youml.js +2 -2
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/common.js +53 -3
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/custom-nodes-manager.js +104 -71
- comfyui_manager-4.4/comfyui_manager/js/manager-grid.js +67 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/model-manager.js +171 -116
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/node_fixer.js +25 -6
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/snapshot.js +24 -10
- comfyui_manager-4.4/comfyui_manager/legacy/html_utils.py +82 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/legacy/manager_core.py +210 -207
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/legacy/manager_server.py +126 -116
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/legacy/share_3rdparty.py +11 -198
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/prestartup_script.py +69 -49
- {comfyui_manager-4.2.2 → comfyui_manager-4.4/comfyui_manager.egg-info}/PKG-INFO +99 -6
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager.egg-info/SOURCES.txt +26 -3
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager.egg-info/requires.txt +2 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/pyproject.toml +5 -16
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/requirements.txt +2 -0
- comfyui_manager-4.4/tests/test_cache_files.py +202 -0
- comfyui_manager-4.4/tests/test_channel_response.py +172 -0
- comfyui_manager-4.4/tests/test_cm_api_try_install.py +381 -0
- comfyui_manager-4.4/tests/test_cnr_install_extraction_failure.py +95 -0
- comfyui_manager-4.4/tests/test_config_write_and_install_denial.py +800 -0
- comfyui_manager-4.4/tests/test_flagged_nodepack_policy.py +581 -0
- comfyui_manager-4.4/tests/test_glob_model_install_whitelist.py +110 -0
- comfyui_manager-4.4/tests/test_grid_highlight_escaping.py +189 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/tests/test_install_flags_config.py +3 -2
- comfyui_manager-4.4/tests/test_legacy_model_whitelist.py +43 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/tests/test_legacy_secgate_other_paths.py +3 -3
- comfyui_manager-4.4/tests/test_logger_terminal_state.py +123 -0
- comfyui_manager-4.4/tests/test_markdown_composer_href.py +114 -0
- comfyui_manager-4.4/tests/test_notice_html_sanitizer.py +135 -0
- comfyui_manager-4.4/tests/test_notice_tls.py +218 -0
- comfyui_manager-4.4/tests/test_pip_blacklist_matching.py +425 -0
- comfyui_manager-4.4/tests/test_pip_fixer_opencv.py +135 -0
- comfyui_manager-4.4/tests/test_pip_package_names.py +85 -0
- comfyui_manager-4.4/tests/test_restart_command.py +195 -0
- comfyui_manager-4.4/tests/test_restore_pip_snapshot.py +110 -0
- comfyui_manager-4.4/tests/test_share_asset_path.py +185 -0
- comfyui_manager-4.4/tests/test_snapshot_restore_pins.py +113 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/tests/test_unified_dep_resolver.py +182 -37
- comfyui_manager-4.4/tests/test_version_suffix.py +90 -0
- comfyui_manager-4.2.2/comfyui_manager/common/manager_util.py +0 -638
- comfyui_manager-4.2.2/comfyui_manager/glob/constants.py +0 -56
- comfyui_manager-4.2.2/comfyui_manager/glob/utils/formatting_utils.py +0 -60
- comfyui_manager-4.2.2/comfyui_manager/js/cm-api.js +0 -67
- comfyui_manager-4.2.2/comfyui_manager/js/comfyui-share-copus.js +0 -1168
- comfyui_manager-4.2.2/comfyui_manager/js/comfyui-share-openart.js +0 -746
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/LICENSE.txt +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/MANIFEST.in +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/cm_cli/__init__.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/__init__.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/alter-list.json +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/channels.list.template +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/__init__.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/cm_global.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/context.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/enums.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/git_compat.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/git_helper.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/manager_downloader.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/node_package.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/common/security_check.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/custom-node-list.json +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/data_models/__init__.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/data_models/generated_models.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/extension-node-map.json +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/extras.json +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/github-stats.json +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/glob/CLAUDE.md +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/glob/__init__.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/glob/utils/__init__.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/glob/utils/environment_utils.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/glob/utils/node_pack_utils.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/glob/utils/security_utils.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/comfyui-gui-builder.js +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/custom-nodes-manager.css +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/model-manager.css +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/popover-helper.js +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/snapshot.css +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/turbogrid.esm.js +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/js/workflow-metadata.js +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/legacy/__init__.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager/model-list.json +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager.egg-info/dependency_links.txt +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager.egg-info/entry_points.txt +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/comfyui_manager.egg-info/top_level.txt +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/setup.cfg +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/tests/test_git_compat.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/tests/test_install_flags_guards.py +0 -0
- {comfyui_manager-4.2.2 → comfyui_manager-4.4}/tests/test_nightly_cnr_fallback.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: comfyui-manager
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.4
|
|
4
4
|
Summary: ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI.
|
|
5
5
|
Maintainer-email: "Dr.Lt.Data" <dr.lt.data@gmail.com>, Yoland Yan <yoland@comfy.org>, James Kwon <hongilkwon316@gmail.com>, Robin Huang <robin@comfy.org>
|
|
6
6
|
License: GPL-3.0-only
|
|
@@ -9,7 +9,7 @@ Keywords: comfyui,comfyui-manager
|
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.10
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE.txt
|
|
15
15
|
Requires-Dist: GitPython
|
|
@@ -22,6 +22,8 @@ Requires-Dist: typing-extensions
|
|
|
22
22
|
Requires-Dist: toml
|
|
23
23
|
Requires-Dist: uv
|
|
24
24
|
Requires-Dist: chardet
|
|
25
|
+
Requires-Dist: packaging
|
|
26
|
+
Requires-Dist: nh3>=0.3.7
|
|
25
27
|
Provides-Extra: dev
|
|
26
28
|
Requires-Dist: pre-commit; extra == "dev"
|
|
27
29
|
Requires-Dist: pytest; extra == "dev"
|
|
@@ -46,6 +48,8 @@ Dynamic: license-file
|
|
|
46
48
|
|
|
47
49
|
## Installation
|
|
48
50
|
|
|
51
|
+
Requires Python 3.10 or newer, matching ComfyUI's minimum Python version.
|
|
52
|
+
|
|
49
53
|
* When installing the latest ComfyUI, it will be automatically installed as a dependency, so manual installation is no longer necessary.
|
|
50
54
|
|
|
51
55
|
* Manual installation of the nightly version:
|
|
@@ -109,8 +113,7 @@ Dynamic: license-file
|
|
|
109
113
|
 
|
|
110
114
|
|
|
111
115
|
* You can share the workflow by clicking the Share button at the bottom of the main menu or selecting Share Output from the Context Menu of the Image node.
|
|
112
|
-
* Currently, it supports sharing via [https://
|
|
113
|
-
[https://openart.ai](https://openart.ai/workflows/dev), [https://youml.com](https://youml.com)
|
|
116
|
+
* Currently, it supports sharing via [https://youml.com](https://youml.com)
|
|
114
117
|
as well as through the Matrix channel.
|
|
115
118
|
|
|
116
119
|

|
|
@@ -132,6 +135,7 @@ In `ComfyUI-Manager` V4.0.3b4 and later, configuration files and dynamically gen
|
|
|
132
135
|
* Configurable pip overrides: `<USER_DIRECTORY>/__manager/pip_overrides.json`
|
|
133
136
|
* Configurable pip blacklist: `<USER_DIRECTORY>/__manager/pip_blacklist.list`
|
|
134
137
|
* Configurable pip auto fix: `<USER_DIRECTORY>/__manager/pip_auto_fix.list`
|
|
138
|
+
* Configurable flagged nodepack whitelist: `<USER_DIRECTORY>/__manager/nodepack-whitelist.list`
|
|
135
139
|
* Saved snapshot files: `<USER_DIRECTORY>/__manager/snapshots`
|
|
136
140
|
* Startup script files: `<USER_DIRECTORY>/__manager/startup-scripts`
|
|
137
141
|
* Component files: `<USER_DIRECTORY>/__manager/components`
|
|
@@ -248,6 +252,7 @@ The following settings are applied based on the section marked as `is_default`.
|
|
|
248
252
|
security_level = <Set the security level => strong|normal|normal-|weak>
|
|
249
253
|
allow_git_url_install = <Allow installing custom nodes from arbitrary git URLs. Independent of security_level. Default: False>
|
|
250
254
|
allow_pip_install = <Allow installing arbitrary pip packages via the Manager. Independent of security_level. Default: False>
|
|
255
|
+
allow_flagged_nodepack_install = <Allow flagged CNR versions on non-local listeners in trusted private networks. Default: False>
|
|
251
256
|
always_lazy_install = <Whether to perform dependency installation on restart even in environments other than Windows.>
|
|
252
257
|
network_mode = <Set the network mode => public|private|offline|personal_cloud>
|
|
253
258
|
```
|
|
@@ -283,6 +288,7 @@ The following settings are applied based on the section marked as `is_default`.
|
|
|
283
288
|
```
|
|
284
289
|
downgrade_blacklist = diffusers, kornia
|
|
285
290
|
```
|
|
291
|
+
* Names are matched without regard to case or to `-`, `_`, and `.`, so `opencv-python` and `opencv_python` are the same package.
|
|
286
292
|
|
|
287
293
|
* Custom pip mapping
|
|
288
294
|
* When you create the `pip_overrides.json` file, it changes the installation of specific pip packages to installations defined by the user.
|
|
@@ -360,8 +366,8 @@ The security settings are applied based on whether the ComfyUI server's listener
|
|
|
360
366
|
|-------------|---------------------------------------------------------------------------------------------------------------------------------------|
|
|
361
367
|
| high+ | * **Switch ComfyUI version**<BR>* **Fix nodepack** |
|
|
362
368
|
| high | _(no features at this tier — `Fix nodepack` promoted to `high+` to align the enforcement gate with the `SECURITY_MESSAGE_HIGH_P` log text)_ |
|
|
363
|
-
| middle+ | * Uninstall/Update<BR>* Installation of
|
|
364
|
-
| middle | * Restart
|
|
369
|
+
| middle+ | * Uninstall/Update<BR>* Installation of Git/nightly nodepacks registered in the `default channel`.<BR>* Restore/Remove Snapshot<BR>* Install model |
|
|
370
|
+
| middle | * Restart<BR>* Installation of CNR release versions (subject to the flagged-version policy below) |
|
|
365
371
|
| low | * Update ComfyUI |
|
|
366
372
|
|
|
367
373
|
* **Note**: `Install via git url` and `pip install` are no longer gated by `security_level` — they moved to the dedicated flags `allow_git_url_install` / `allow_pip_install`. Installation of a nodepack registered not in the `default channel` likewise requires `allow_git_url_install` (in addition to the `middle+` level preconditions) instead of a `high+` security level. See the [Dedicated install flags](#dedicated-install-flags-allow_git_url_install--allow_pip_install) subsection below.
|
|
@@ -391,6 +397,93 @@ The `Install via git url` and `pip install` features are governed by two dedicat
|
|
|
391
397
|
* Changes to these flags require a restart of ComfyUI to take effect.
|
|
392
398
|
* Migration note: if you previously relied on `security_level = weak` or `normal-` to use these features, you must now opt in explicitly by setting the flags in the `[default]` section of `config.ini`. The flags are not auto-seeded from your `security_level`.
|
|
393
399
|
|
|
400
|
+
### Flagged CNR nodepacks
|
|
401
|
+
|
|
402
|
+
Before downloading a CNR release, Manager checks the selected version's `status`
|
|
403
|
+
in the existing `/nodes/{id}/install` response. No additional Registry request is
|
|
404
|
+
needed. The check applies to both the default and legacy Manager implementations,
|
|
405
|
+
including CNR version changes, updates, and snapshot restores. Legacy batch
|
|
406
|
+
reinstallation checks the target before removing the existing nodepack, and a
|
|
407
|
+
policy refusal preserves the current installation. For flagged-policy denials,
|
|
408
|
+
the UI reports that the current security configuration does not allow the action
|
|
409
|
+
and directs users to the terminal. Only the terminal provides loopback-only
|
|
410
|
+
`--listen` examples, the private network override setting, the pack whitelist,
|
|
411
|
+
and restart instructions.
|
|
412
|
+
|
|
413
|
+
* Active versions continue through the normal install flow. New HTTP requests
|
|
414
|
+
to install CNR releases use the `middle` security level, so they are available
|
|
415
|
+
on non-local listeners with `security_level = normal`, `normal-`, or `weak`.
|
|
416
|
+
`strong` denies these new requests, including requests for whitelisted packs.
|
|
417
|
+
* Flagged versions (`NodeVersionStatusFlagged`) must satisfy the same installation
|
|
418
|
+
conditions as Active versions. In addition, **all** addresses in `--listen`
|
|
419
|
+
must resolve to loopback, such as `127.0.0.1` and `::1`, unless the explicit
|
|
420
|
+
override below is enabled or the pack ID is whitelisted.
|
|
421
|
+
* To allow specific packs on any listener without enabling all flagged installs,
|
|
422
|
+
edit `nodepack-whitelist.list` beside Manager's `config.ini`
|
|
423
|
+
(normally `<USER_DIRECTORY>/__manager/nodepack-whitelist.list`).
|
|
424
|
+
At server startup, Manager creates a commented template if the file is missing;
|
|
425
|
+
existing files are preserved. The template grants no exceptions by default.
|
|
426
|
+
Enter one Registry pack ID per line:
|
|
427
|
+
|
|
428
|
+
```text
|
|
429
|
+
# Nodepack whitelist
|
|
430
|
+
# Add one Registry ID per line; each entry applies to all CNR versions.
|
|
431
|
+
# Registry IDs are case-insensitive.
|
|
432
|
+
|
|
433
|
+
comfyui-impact-pack
|
|
434
|
+
comfyui-inspire-pack # Inline comments are supported.
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
Entries are case-insensitive and apply to all CNR versions of that pack. Use
|
|
438
|
+
Registry IDs, not display names, Git URLs, or `id@version`; wildcards are not
|
|
439
|
+
expanded. Blank lines and `#` comments are ignored. Delete an entry or comment
|
|
440
|
+
out its line with `#` to revoke that exception. Manager reads the file
|
|
441
|
+
for each installation check, so edits and removals apply without restarting.
|
|
442
|
+
A missing, unreadable, or NUL-containing file grants no whitelist exceptions.
|
|
443
|
+
If mixed encodings introduce NUL characters, Manager logs a warning to save
|
|
444
|
+
the file as UTF-8. Whitelist-based permission is logged at WARNING level with
|
|
445
|
+
the Registry ID, including in snapshot restore children. This records the policy
|
|
446
|
+
decision, not successful installation. Packs absent from the list continue to
|
|
447
|
+
use the listener and global option rules.
|
|
448
|
+
* To allow flagged versions on a non-local listener in a **trusted private
|
|
449
|
+
network**, an administrator can explicitly opt in:
|
|
450
|
+
|
|
451
|
+
```ini
|
|
452
|
+
[default]
|
|
453
|
+
allow_flagged_nodepack_install = true
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
* The option defaults to `false`. Only `true` (case-insensitive) enables it;
|
|
457
|
+
missing or invalid values are treated as `false`. Restart ComfyUI after editing it.
|
|
458
|
+
* With this option enabled, the flagged-version check allows installation
|
|
459
|
+
regardless of the listen address. Manager does not automatically detect a
|
|
460
|
+
private network. This option does not require `network_mode = private`, and
|
|
461
|
+
`network_mode = personal_cloud` alone does not allow flagged versions.
|
|
462
|
+
* CNR API refusals, including banned or unavailable packages, still prevent
|
|
463
|
+
installation. Neither the option nor the whitelist bypasses the `strong`
|
|
464
|
+
restriction on new HTTP install requests or the separate Git/nightly and pip
|
|
465
|
+
installation policies.
|
|
466
|
+
* Enabling an already installed version does not query the Registry or reinstall it.
|
|
467
|
+
* Older deferred switches without a stored status require loopback-only listeners,
|
|
468
|
+
the override, or a whitelisted pack ID. Otherwise they are rejected without
|
|
469
|
+
changing the installed pack; request the installation again so Manager can
|
|
470
|
+
check its current Registry status.
|
|
471
|
+
* Newly scheduled deferred version switches retain the returned version status
|
|
472
|
+
and check it against the current listen address, option, and whitelist again
|
|
473
|
+
at restart.
|
|
474
|
+
This uses the saved status; it does not query CNR again for later status changes.
|
|
475
|
+
Server-scheduled snapshot restores inherit the permission computed from the
|
|
476
|
+
server's current listener and setting, and read the whitelist from the server's
|
|
477
|
+
Manager configuration directory.
|
|
478
|
+
* Startup execution of deferred CNR switches and server-scheduled snapshot
|
|
479
|
+
restores does not recheck `security_level`. Changing it to `strong` does not
|
|
480
|
+
cancel previously scheduled work. For example, a flagged version switch
|
|
481
|
+
scheduled under `normal` can still run after restarting with `strong` if the
|
|
482
|
+
pack remains whitelisted. The startup flagged-version checks described above
|
|
483
|
+
still apply. This is existing behavior of scheduled execution.
|
|
484
|
+
* Standalone `cm-cli` commands remain local administrator operations and do not
|
|
485
|
+
use the server listener policy.
|
|
486
|
+
|
|
394
487
|
|
|
395
488
|
# Disclaimer
|
|
396
489
|
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
17
|
+
Requires Python 3.10 or newer, matching ComfyUI's minimum Python version.
|
|
18
|
+
|
|
17
19
|
* When installing the latest ComfyUI, it will be automatically installed as a dependency, so manual installation is no longer necessary.
|
|
18
20
|
|
|
19
21
|
* Manual installation of the nightly version:
|
|
@@ -77,8 +79,7 @@
|
|
|
77
79
|
 
|
|
78
80
|
|
|
79
81
|
* You can share the workflow by clicking the Share button at the bottom of the main menu or selecting Share Output from the Context Menu of the Image node.
|
|
80
|
-
* Currently, it supports sharing via [https://
|
|
81
|
-
[https://openart.ai](https://openart.ai/workflows/dev), [https://youml.com](https://youml.com)
|
|
82
|
+
* Currently, it supports sharing via [https://youml.com](https://youml.com)
|
|
82
83
|
as well as through the Matrix channel.
|
|
83
84
|
|
|
84
85
|

|
|
@@ -100,6 +101,7 @@ In `ComfyUI-Manager` V4.0.3b4 and later, configuration files and dynamically gen
|
|
|
100
101
|
* Configurable pip overrides: `<USER_DIRECTORY>/__manager/pip_overrides.json`
|
|
101
102
|
* Configurable pip blacklist: `<USER_DIRECTORY>/__manager/pip_blacklist.list`
|
|
102
103
|
* Configurable pip auto fix: `<USER_DIRECTORY>/__manager/pip_auto_fix.list`
|
|
104
|
+
* Configurable flagged nodepack whitelist: `<USER_DIRECTORY>/__manager/nodepack-whitelist.list`
|
|
103
105
|
* Saved snapshot files: `<USER_DIRECTORY>/__manager/snapshots`
|
|
104
106
|
* Startup script files: `<USER_DIRECTORY>/__manager/startup-scripts`
|
|
105
107
|
* Component files: `<USER_DIRECTORY>/__manager/components`
|
|
@@ -216,6 +218,7 @@ The following settings are applied based on the section marked as `is_default`.
|
|
|
216
218
|
security_level = <Set the security level => strong|normal|normal-|weak>
|
|
217
219
|
allow_git_url_install = <Allow installing custom nodes from arbitrary git URLs. Independent of security_level. Default: False>
|
|
218
220
|
allow_pip_install = <Allow installing arbitrary pip packages via the Manager. Independent of security_level. Default: False>
|
|
221
|
+
allow_flagged_nodepack_install = <Allow flagged CNR versions on non-local listeners in trusted private networks. Default: False>
|
|
219
222
|
always_lazy_install = <Whether to perform dependency installation on restart even in environments other than Windows.>
|
|
220
223
|
network_mode = <Set the network mode => public|private|offline|personal_cloud>
|
|
221
224
|
```
|
|
@@ -251,6 +254,7 @@ The following settings are applied based on the section marked as `is_default`.
|
|
|
251
254
|
```
|
|
252
255
|
downgrade_blacklist = diffusers, kornia
|
|
253
256
|
```
|
|
257
|
+
* Names are matched without regard to case or to `-`, `_`, and `.`, so `opencv-python` and `opencv_python` are the same package.
|
|
254
258
|
|
|
255
259
|
* Custom pip mapping
|
|
256
260
|
* When you create the `pip_overrides.json` file, it changes the installation of specific pip packages to installations defined by the user.
|
|
@@ -328,8 +332,8 @@ The security settings are applied based on whether the ComfyUI server's listener
|
|
|
328
332
|
|-------------|---------------------------------------------------------------------------------------------------------------------------------------|
|
|
329
333
|
| high+ | * **Switch ComfyUI version**<BR>* **Fix nodepack** |
|
|
330
334
|
| high | _(no features at this tier — `Fix nodepack` promoted to `high+` to align the enforcement gate with the `SECURITY_MESSAGE_HIGH_P` log text)_ |
|
|
331
|
-
| middle+ | * Uninstall/Update<BR>* Installation of
|
|
332
|
-
| middle | * Restart
|
|
335
|
+
| middle+ | * Uninstall/Update<BR>* Installation of Git/nightly nodepacks registered in the `default channel`.<BR>* Restore/Remove Snapshot<BR>* Install model |
|
|
336
|
+
| middle | * Restart<BR>* Installation of CNR release versions (subject to the flagged-version policy below) |
|
|
333
337
|
| low | * Update ComfyUI |
|
|
334
338
|
|
|
335
339
|
* **Note**: `Install via git url` and `pip install` are no longer gated by `security_level` — they moved to the dedicated flags `allow_git_url_install` / `allow_pip_install`. Installation of a nodepack registered not in the `default channel` likewise requires `allow_git_url_install` (in addition to the `middle+` level preconditions) instead of a `high+` security level. See the [Dedicated install flags](#dedicated-install-flags-allow_git_url_install--allow_pip_install) subsection below.
|
|
@@ -359,6 +363,93 @@ The `Install via git url` and `pip install` features are governed by two dedicat
|
|
|
359
363
|
* Changes to these flags require a restart of ComfyUI to take effect.
|
|
360
364
|
* Migration note: if you previously relied on `security_level = weak` or `normal-` to use these features, you must now opt in explicitly by setting the flags in the `[default]` section of `config.ini`. The flags are not auto-seeded from your `security_level`.
|
|
361
365
|
|
|
366
|
+
### Flagged CNR nodepacks
|
|
367
|
+
|
|
368
|
+
Before downloading a CNR release, Manager checks the selected version's `status`
|
|
369
|
+
in the existing `/nodes/{id}/install` response. No additional Registry request is
|
|
370
|
+
needed. The check applies to both the default and legacy Manager implementations,
|
|
371
|
+
including CNR version changes, updates, and snapshot restores. Legacy batch
|
|
372
|
+
reinstallation checks the target before removing the existing nodepack, and a
|
|
373
|
+
policy refusal preserves the current installation. For flagged-policy denials,
|
|
374
|
+
the UI reports that the current security configuration does not allow the action
|
|
375
|
+
and directs users to the terminal. Only the terminal provides loopback-only
|
|
376
|
+
`--listen` examples, the private network override setting, the pack whitelist,
|
|
377
|
+
and restart instructions.
|
|
378
|
+
|
|
379
|
+
* Active versions continue through the normal install flow. New HTTP requests
|
|
380
|
+
to install CNR releases use the `middle` security level, so they are available
|
|
381
|
+
on non-local listeners with `security_level = normal`, `normal-`, or `weak`.
|
|
382
|
+
`strong` denies these new requests, including requests for whitelisted packs.
|
|
383
|
+
* Flagged versions (`NodeVersionStatusFlagged`) must satisfy the same installation
|
|
384
|
+
conditions as Active versions. In addition, **all** addresses in `--listen`
|
|
385
|
+
must resolve to loopback, such as `127.0.0.1` and `::1`, unless the explicit
|
|
386
|
+
override below is enabled or the pack ID is whitelisted.
|
|
387
|
+
* To allow specific packs on any listener without enabling all flagged installs,
|
|
388
|
+
edit `nodepack-whitelist.list` beside Manager's `config.ini`
|
|
389
|
+
(normally `<USER_DIRECTORY>/__manager/nodepack-whitelist.list`).
|
|
390
|
+
At server startup, Manager creates a commented template if the file is missing;
|
|
391
|
+
existing files are preserved. The template grants no exceptions by default.
|
|
392
|
+
Enter one Registry pack ID per line:
|
|
393
|
+
|
|
394
|
+
```text
|
|
395
|
+
# Nodepack whitelist
|
|
396
|
+
# Add one Registry ID per line; each entry applies to all CNR versions.
|
|
397
|
+
# Registry IDs are case-insensitive.
|
|
398
|
+
|
|
399
|
+
comfyui-impact-pack
|
|
400
|
+
comfyui-inspire-pack # Inline comments are supported.
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
Entries are case-insensitive and apply to all CNR versions of that pack. Use
|
|
404
|
+
Registry IDs, not display names, Git URLs, or `id@version`; wildcards are not
|
|
405
|
+
expanded. Blank lines and `#` comments are ignored. Delete an entry or comment
|
|
406
|
+
out its line with `#` to revoke that exception. Manager reads the file
|
|
407
|
+
for each installation check, so edits and removals apply without restarting.
|
|
408
|
+
A missing, unreadable, or NUL-containing file grants no whitelist exceptions.
|
|
409
|
+
If mixed encodings introduce NUL characters, Manager logs a warning to save
|
|
410
|
+
the file as UTF-8. Whitelist-based permission is logged at WARNING level with
|
|
411
|
+
the Registry ID, including in snapshot restore children. This records the policy
|
|
412
|
+
decision, not successful installation. Packs absent from the list continue to
|
|
413
|
+
use the listener and global option rules.
|
|
414
|
+
* To allow flagged versions on a non-local listener in a **trusted private
|
|
415
|
+
network**, an administrator can explicitly opt in:
|
|
416
|
+
|
|
417
|
+
```ini
|
|
418
|
+
[default]
|
|
419
|
+
allow_flagged_nodepack_install = true
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
* The option defaults to `false`. Only `true` (case-insensitive) enables it;
|
|
423
|
+
missing or invalid values are treated as `false`. Restart ComfyUI after editing it.
|
|
424
|
+
* With this option enabled, the flagged-version check allows installation
|
|
425
|
+
regardless of the listen address. Manager does not automatically detect a
|
|
426
|
+
private network. This option does not require `network_mode = private`, and
|
|
427
|
+
`network_mode = personal_cloud` alone does not allow flagged versions.
|
|
428
|
+
* CNR API refusals, including banned or unavailable packages, still prevent
|
|
429
|
+
installation. Neither the option nor the whitelist bypasses the `strong`
|
|
430
|
+
restriction on new HTTP install requests or the separate Git/nightly and pip
|
|
431
|
+
installation policies.
|
|
432
|
+
* Enabling an already installed version does not query the Registry or reinstall it.
|
|
433
|
+
* Older deferred switches without a stored status require loopback-only listeners,
|
|
434
|
+
the override, or a whitelisted pack ID. Otherwise they are rejected without
|
|
435
|
+
changing the installed pack; request the installation again so Manager can
|
|
436
|
+
check its current Registry status.
|
|
437
|
+
* Newly scheduled deferred version switches retain the returned version status
|
|
438
|
+
and check it against the current listen address, option, and whitelist again
|
|
439
|
+
at restart.
|
|
440
|
+
This uses the saved status; it does not query CNR again for later status changes.
|
|
441
|
+
Server-scheduled snapshot restores inherit the permission computed from the
|
|
442
|
+
server's current listener and setting, and read the whitelist from the server's
|
|
443
|
+
Manager configuration directory.
|
|
444
|
+
* Startup execution of deferred CNR switches and server-scheduled snapshot
|
|
445
|
+
restores does not recheck `security_level`. Changing it to `strong` does not
|
|
446
|
+
cancel previously scheduled work. For example, a flagged version switch
|
|
447
|
+
scheduled under `normal` can still run after restarting with `strong` if the
|
|
448
|
+
pack remains whitelisted. The startup flagged-version checks described above
|
|
449
|
+
still apply. This is existing behavior of scheduled execution.
|
|
450
|
+
* Standalone `cm-cli` commands remain local administrator operations and do not
|
|
451
|
+
use the server listener policy.
|
|
452
|
+
|
|
362
453
|
|
|
363
454
|
# Disclaimer
|
|
364
455
|
|
|
@@ -1541,9 +1541,8 @@ async def _force_update_cache(channel):
|
|
|
1541
1541
|
|
|
1542
1542
|
json_obj = await manager_util.get_data(uri, silent=True)
|
|
1543
1543
|
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
json.dump(json_obj, file, indent=4, sort_keys=True)
|
|
1544
|
+
if not manager_util.write_cache_file(cache_uri, json_obj):
|
|
1545
|
+
raise OSError("the cache file is in use")
|
|
1547
1546
|
|
|
1548
1547
|
print(f" [CACHED] {filename}")
|
|
1549
1548
|
except Exception as e:
|
|
@@ -134,6 +134,7 @@ class NodeVersion:
|
|
|
134
134
|
id: str
|
|
135
135
|
version: str
|
|
136
136
|
download_url: str
|
|
137
|
+
status: str = ''
|
|
137
138
|
|
|
138
139
|
|
|
139
140
|
def map_node_version(api_node_version):
|
|
@@ -165,6 +166,7 @@ def map_node_version(api_node_version):
|
|
|
165
166
|
download_url=api_node_version.get(
|
|
166
167
|
"downloadUrl", ""
|
|
167
168
|
), # Provide a default value if 'downloadUrl' is missing
|
|
169
|
+
status=api_node_version.get('status', ''),
|
|
168
170
|
)
|
|
169
171
|
|
|
170
172
|
|
|
@@ -257,4 +259,3 @@ def read_cnr_id(fullpath):
|
|
|
257
259
|
pass
|
|
258
260
|
|
|
259
261
|
return None
|
|
260
|
-
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""Shared settings-file writer for glob and legacy."""
|
|
2
|
+
import configparser
|
|
3
|
+
import os
|
|
4
|
+
import tempfile
|
|
5
|
+
|
|
6
|
+
from rich import print
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DirtyTrackingConfig(dict):
|
|
10
|
+
"""Track keys assigned after loading the startup configuration."""
|
|
11
|
+
|
|
12
|
+
def __init__(self, *args, **kwargs):
|
|
13
|
+
super().__init__(*args, **kwargs)
|
|
14
|
+
self.dirty_keys = set()
|
|
15
|
+
|
|
16
|
+
def __setitem__(self, key, value):
|
|
17
|
+
self.dirty_keys.add(key)
|
|
18
|
+
super().__setitem__(key, value)
|
|
19
|
+
|
|
20
|
+
def update(self, *args, **kwargs):
|
|
21
|
+
incoming = dict(*args, **kwargs)
|
|
22
|
+
self.dirty_keys.update(incoming)
|
|
23
|
+
super().update(incoming)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def write_config_merged(config_path, cached, written_config_keys):
|
|
27
|
+
"""Merge changed owned keys onto the latest settings on disk.
|
|
28
|
+
|
|
29
|
+
Preserve parsed keys and values, not INI comments or formatting."""
|
|
30
|
+
config = configparser.ConfigParser(strict=False)
|
|
31
|
+
try:
|
|
32
|
+
loaded = config.read(config_path)
|
|
33
|
+
except (configparser.Error, UnicodeDecodeError) as e:
|
|
34
|
+
# Preserve the existing fallback for malformed files.
|
|
35
|
+
print(f"[ComfyUI-Manager] Warning: '{config_path}' could not be parsed ({e}); rewriting it from the current settings.")
|
|
36
|
+
config = configparser.ConfigParser(strict=False)
|
|
37
|
+
else:
|
|
38
|
+
# ConfigParser.read silently skips unreadable files; do not overwrite one.
|
|
39
|
+
if not loaded and os.path.exists(config_path):
|
|
40
|
+
raise OSError(f"'{config_path}' exists but could not be read; refusing to overwrite it with default settings. Fix the file's permissions, then retry.")
|
|
41
|
+
|
|
42
|
+
if config.has_section('default'):
|
|
43
|
+
keys = [key for key in written_config_keys if key in cached.dirty_keys]
|
|
44
|
+
else:
|
|
45
|
+
config['default'] = {}
|
|
46
|
+
keys = list(written_config_keys)
|
|
47
|
+
|
|
48
|
+
section = config['default']
|
|
49
|
+
for key in keys:
|
|
50
|
+
section[key] = str(cached[key]).replace('\r', '').replace('\n', '').replace('\x00', '')
|
|
51
|
+
|
|
52
|
+
directory = os.path.dirname(config_path)
|
|
53
|
+
if directory and not os.path.exists(directory):
|
|
54
|
+
os.makedirs(directory)
|
|
55
|
+
|
|
56
|
+
# Replace from the same directory so readers never see a partial write.
|
|
57
|
+
tmp_path = None
|
|
58
|
+
try:
|
|
59
|
+
with tempfile.NamedTemporaryFile(
|
|
60
|
+
'w', dir=directory or '.', prefix='.config-', suffix='.tmp', delete=False
|
|
61
|
+
) as configfile:
|
|
62
|
+
tmp_path = configfile.name
|
|
63
|
+
config.write(configfile)
|
|
64
|
+
configfile.flush()
|
|
65
|
+
os.fsync(configfile.fileno())
|
|
66
|
+
# Retain the existing mode instead of the temporary file's 0600.
|
|
67
|
+
if os.path.exists(config_path):
|
|
68
|
+
os.chmod(tmp_path, os.stat(config_path).st_mode & 0o777)
|
|
69
|
+
os.replace(tmp_path, config_path)
|
|
70
|
+
tmp_path = None
|
|
71
|
+
finally:
|
|
72
|
+
if tmp_path is not None and os.path.exists(tmp_path):
|
|
73
|
+
os.remove(tmp_path)
|
|
74
|
+
|
|
75
|
+
# Clear only persisted keys, and only after a successful write.
|
|
76
|
+
cached.dirty_keys.difference_update(keys)
|
|
@@ -18,6 +18,7 @@ DO NOT add the gate to body-reading handlers (redundant + UX-breaking).
|
|
|
18
18
|
DO NOT remove the gate from no-body handlers (this is the bypass vector).
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
+
import logging
|
|
21
22
|
import os
|
|
22
23
|
from enum import Enum
|
|
23
24
|
from typing import Optional
|
|
@@ -27,6 +28,27 @@ from aiohttp import web
|
|
|
27
28
|
is_personal_cloud_mode = False
|
|
28
29
|
handler_policy = {}
|
|
29
30
|
|
|
31
|
+
FLAGGED_NODEPACK_WHITELIST_FILE = 'nodepack-whitelist.list'
|
|
32
|
+
|
|
33
|
+
FLAGGED_NODEPACK_INSTALL_ERROR = (
|
|
34
|
+
'This action is not allowed by the current security configuration. '
|
|
35
|
+
'See the terminal for details.'
|
|
36
|
+
)
|
|
37
|
+
FLAGGED_NODEPACK_INSTALL_GUIDANCE = (
|
|
38
|
+
'Installation of this flagged CNR version is blocked. To satisfy the additional '
|
|
39
|
+
'flagged-version requirement, choose one of the following:\n'
|
|
40
|
+
'1. Run ComfyUI with loopback-only listeners, for example --listen 127.0.0.1 '
|
|
41
|
+
'or --listen ::1. All configured listen addresses must be loopback.\n'
|
|
42
|
+
' Do not use bare --listen or any non-loopback address, such as 0.0.0.0 or ::.\n'
|
|
43
|
+
'2. For a trusted private network, set allow_flagged_nodepack_install = true '
|
|
44
|
+
'in the [default] section of ComfyUI-Manager\'s config.ini.\n'
|
|
45
|
+
'3. To allow specific packs, add their Registry pack IDs (case-insensitive), one per line, '
|
|
46
|
+
f'to {FLAGGED_NODEPACK_WHITELIST_FILE} beside ComfyUI-Manager\'s config.ini. '
|
|
47
|
+
'Whitelist changes apply to subsequent installations without a restart.\n'
|
|
48
|
+
'Restart ComfyUI after changing the listener or config.ini. '
|
|
49
|
+
'All other installation security checks still apply.'
|
|
50
|
+
)
|
|
51
|
+
|
|
30
52
|
|
|
31
53
|
# CORS "simple request" Content-Type set per Fetch spec §3.2.3. Browsers send
|
|
32
54
|
# <form method=POST> submissions with one of these three MIME types and do NOT
|
|
@@ -83,6 +105,85 @@ def is_loopback(address):
|
|
|
83
105
|
return False
|
|
84
106
|
|
|
85
107
|
|
|
108
|
+
def is_loopback_listener(listen_address: Optional[str]) -> bool:
|
|
109
|
+
"""All addresses bound by --listen must resolve exclusively to loopback."""
|
|
110
|
+
import socket
|
|
111
|
+
|
|
112
|
+
if not isinstance(listen_address, str) or not listen_address:
|
|
113
|
+
return False
|
|
114
|
+
for address in listen_address.split(','):
|
|
115
|
+
address = address.strip()
|
|
116
|
+
if not address:
|
|
117
|
+
return False
|
|
118
|
+
if is_loopback(address):
|
|
119
|
+
continue
|
|
120
|
+
try:
|
|
121
|
+
resolved = socket.getaddrinfo(address, None, type=socket.SOCK_STREAM)
|
|
122
|
+
except OSError:
|
|
123
|
+
return False
|
|
124
|
+
if not resolved or any(not is_loopback(item[4][0]) for item in resolved):
|
|
125
|
+
return False
|
|
126
|
+
return True
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def ensure_nodepack_whitelist(manager_files_path):
|
|
130
|
+
"""Create a commented template without replacing an existing whitelist."""
|
|
131
|
+
path = os.path.join(manager_files_path, FLAGGED_NODEPACK_WHITELIST_FILE)
|
|
132
|
+
try:
|
|
133
|
+
os.makedirs(manager_files_path, exist_ok=True)
|
|
134
|
+
with open(path, 'x', encoding='utf-8') as file:
|
|
135
|
+
file.write(
|
|
136
|
+
'# Allow selected flagged CNR nodepacks on non-local listeners.\n'
|
|
137
|
+
'# One Registry ID per line; IDs are case-insensitive and apply to all versions.\n'
|
|
138
|
+
'# Blank lines and # comments are ignored. Changes apply without restarting.\n'
|
|
139
|
+
'# Other installation security checks still apply.\n'
|
|
140
|
+
'#\n'
|
|
141
|
+
'# Example entries (commented out; uncomment to allow):\n'
|
|
142
|
+
'# comfyui-impact-pack\n'
|
|
143
|
+
'# comfyui-inspire-pack # Optional inline comment\n'
|
|
144
|
+
)
|
|
145
|
+
except OSError as exc:
|
|
146
|
+
if isinstance(exc, FileExistsError) and os.path.isfile(path):
|
|
147
|
+
return
|
|
148
|
+
logging.warning('[ComfyUI-Manager] Cannot create nodepack whitelist %s: %s', path, exc)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def is_flagged_nodepack_whitelisted(node_id: str, manager_files_path) -> bool:
|
|
152
|
+
"""Match a whole Registry ID, ignoring case, in the current Manager whitelist."""
|
|
153
|
+
if not manager_files_path:
|
|
154
|
+
return False
|
|
155
|
+
path = os.path.join(manager_files_path, FLAGGED_NODEPACK_WHITELIST_FILE)
|
|
156
|
+
try:
|
|
157
|
+
with open(path, encoding='utf-8-sig') as file:
|
|
158
|
+
contents = file.read()
|
|
159
|
+
if '\x00' in contents:
|
|
160
|
+
raise UnicodeError('NUL characters found; save the file as UTF-8')
|
|
161
|
+
entries = (line.split('#', 1)[0].strip() for line in contents.split('\n'))
|
|
162
|
+
if node_id.lower() in {entry.lower() for entry in entries if entry}:
|
|
163
|
+
logging.warning('[ComfyUI-Manager] CNR installation of %r permitted by nodepack whitelist (%s).', node_id, path)
|
|
164
|
+
return True
|
|
165
|
+
return False
|
|
166
|
+
except FileNotFoundError:
|
|
167
|
+
return False
|
|
168
|
+
except (OSError, UnicodeError) as exc:
|
|
169
|
+
logging.warning('[ComfyUI-Manager] Cannot read flagged nodepack whitelist %s: %s', path, exc)
|
|
170
|
+
return False
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def is_cnr_install_allowed(
|
|
174
|
+
status: str, allow_flagged: bool, listen_address: Optional[str], *,
|
|
175
|
+
node_id: Optional[str] = None, manager_files_path=None,
|
|
176
|
+
) -> bool:
|
|
177
|
+
"""Flagged versions require loopback, explicit permission, or a whitelisted ID.
|
|
178
|
+
|
|
179
|
+
Restore children pass their parent's resolved permission and no listener.
|
|
180
|
+
"""
|
|
181
|
+
return (status != 'NodeVersionStatusFlagged'
|
|
182
|
+
or bool(allow_flagged)
|
|
183
|
+
or is_loopback_listener(listen_address)
|
|
184
|
+
or (node_id is not None and is_flagged_nodepack_whitelisted(node_id, manager_files_path)))
|
|
185
|
+
|
|
186
|
+
|
|
86
187
|
def is_dedicated_install_allowed(flag_value: bool, listen_address: str, network_mode: str) -> bool:
|
|
87
188
|
"""P-direct predicate for the dedicated install flags (goal265-spec.md §1.2).
|
|
88
189
|
|