72 Commits
Author SHA1 Message Date
Dr.Lt.Data 7ab6b39cd7 Recognize a nodepack folder with neither .git nor .tracking as an invalid installation and fix it by reinstalling (#3565)
A folder in custom_nodes with neither .git nor .tracking, left by an
install that broke midway or by a download unpacked by hand, was taken for
a git nodepack: Update All logged "ERROR: An error occurred while updating
..." for it, and its nodepack showed as not installed (#3330).

It is now an invalid installation. Update All and cm-cli update all leave
it alone, the Custom Nodes Manager marks its row INVALID INSTALLATION and
offers Reinstall, /customnode/installed lists it with
invalid_installation: true, and the startup notice names it. By its folder
name it is enabled, disabled and uninstalled as before. An update of the
nodepack alone fails with the guidance to reinstall it, and the console
line of a failed update says why the update failed.

A reinstall, of any nodepack, keeps the folders it replaces until the new
installation is in place, and puts them back when the install fails. It
deleted them first, so a failed download lost the nodepack. cm-cli
reinstall makes the same reinstall and prints [REINSTALLED].

What is in the way of a reinstall, such as a clone of a fork at the install
path or under the name of the nodepack, is moved to
custom_nodes/.disabled/.archived/ and the log says where it is. It is not
deleted and no longer loaded, and it goes back when the install fails. The
reinstall failed there with "Install path already exists".
2026-11-22 18:11:46 +09:00
Dr.Lt.Data 31d8ecea27 Do not install a URL requirement again at startup when it is installed, and install it by force on a fix (#3578)
A requirement that is a URL, as git+https://github.com/owner/repo or the
URL of a wheel, names no package, so is_installed() of the startup script
never found it installed and pip was run for it at every reserved install
of its nodepack: for a repository, a clone and a build (#3575). On Windows,
or with always_lazy_install, every install, update and fix that the server
is asked for is reserved.

pip and uv record where a distribution came from in its direct_url.json
(PEP 610). installed_from() compares the URL with those records, and
is_installed() skips the requirement when a distribution installed from
that URL is there and no distribution of its name differs from it. The
repository is not asked, so a branch that has moved on is not followed, as
a name without a version is not upgraded.

A fix is the way to have such a package installed again. fix_cmd() builds
a forced command for a URL requirement: --force-reinstall --no-deps, and
without the cache of the installer, since with it uv installs the wheel it
has built of a commit before, forced or not, and so does pip for a name
with a commit. The command is run at once or reserved as any other.
Wherever it is run, reinstall() runs it in two steps: the requirement as
an install does it, which brings what the package needs now, and then the
forced command, which puts a clean copy there. When only the forced step
fails, what is installed stays. When the first step fails and the
repository does not answer `git ls-remote`, uv is asked for the installed
commit with --offline: the one use of a cache.

A fix is no longer held back by what the session has processed, only by
what the same fix has done, and one `cm-cli fix` of several nodepacks
shares that between them.
2026-11-22 01:17:31 +09:00
Dr.Lt.Data a288523cd3 On an old ComfyUI, serve only the update of ComfyUI
Five changes, each in the CHANGELOG.

- On a ComfyUI without the System User API, refuse every route but the
  update of ComfyUI, leave a scheduled restore and the pip files of the
  unprotected directory alone, and migrate only the settings that are
  preferences
- Refuse there in the security gate, not by changing the security level
  that was read
- After the update, install the requirements of ComfyUI in prestartup,
  and keep a backup of the legacy directory that is already there
- Read config.ini values as plain text and default the invalid ones
- Report a failed legacy backup without its error text

Reported by:
- anir0y
2026-11-19 20:43:37 +09:00
Dr.Lt.Data de1c60c962 Fix the scheduled snapshot restore, the steps of a snapshot restore and reserved install scripts (#3554)
Three fixes. The CHANGELOG has an entry for each.

- Give the scheduled snapshot restore the directories of the server
- Report the failed steps of a snapshot restore, check a cloned node pack
  out at the pinned commit and run the install step of the node packs it
  installs
- Write what is reserved for the next start as UTF-8, and remove the files of
  an old version from the node pack, and from nowhere else, when a version is
  switched; read the list of those files as UTF-8
2026-11-19 07:14:01 +09:00
Dr.Lt.Data 8a75836a7b Fix git_exe, .git/config reading, the commit and submodules of a node pack and an update whose git step fails (#3552)
Four fixes. The CHANGELOG has an entry for each.

- Use the git executable set as git_exe
- Read the commit of a node pack whose refs are packed, and bring its
  submodules to the commit that is checked out
- Start with a node pack whose .git/config cannot be read
- Fail an update whose pull or submodule update failed, and undo the pull
2026-11-18 22:54:23 +09:00
Dr.Lt.Data 1ad89f69cd Apply pip blacklists however a requirement is written (#3521)
Port the pip requirement checks of manager-v4 (#3489) to main, so that
both branches decide with the same code. #3431 had only replaced the
version class in main's own checks, which left ">" and "~=" answered
differently from v4.

- Parse requirements with packaging and share one parser and one
  downgrade decision between manager_core and the startup check
- Treat '-', '_' and '.' as one separator in package names, in the
  installed-package lookup, both lists, requirements and
  pip_auto_fix.list (#3458)
- Read every version clause, so a lower bound written first no longer
  hides an upper bound; read spaces, parentheses, markers, '===' and
  direct references
- Install a requirement with extras unless it would downgrade the
  protected package
- Check the requirement of every pip install command form, including
  those with --index-url, on the immediate and reserved paths
- Skip a protected package when the requirement cannot be compared and
  log why and how to install it
- At startup, recognize an installed package however its requirement
  spells the name, install one older than its '~=' version or at the
  version that '>' excludes, and stop reinstalling the '~=' version
  itself
- Read downgrade_blacklist from config.ini in cm-cli, which read a
  path attribute that does not exist and so protected only the
  built-in packages
- Remove the unused is_installed copy from manager_core and the
  pip_version helper that #3431 added
- Import packaging where it is used, because prestartup_script imports
  manager_util before it installs missing dependencies
- Add the tests of #3489, adapted to main, and tests for the startup
  loop, '>', pip_auto_fix.list names and the cm-cli setting; update
  README and CHANGELOG

manager-v4 needs no counterpart: it has this code since #3489.
2026-11-14 18:14:54 +09:00
Dr.Lt.Data 785268efa6 modified: By default, do not forcefully downgrade numpy to below version 2. I believe enough of a grace period has now been given.
https://github.com/Comfy-Org/ComfyUI-Manager/issues/1981#issuecomment-3058772842
2025-07-12 06:07:10 +09:00
Dr.Lt.Data 166debfabb modified: In Python 3.13, the functionality to forcibly downgrade the numpy version below 3.13 is disabled.
- Starting from Python 3.13, prebuilt wheels for `numpy` 1.26.4 are no longer provided.

https://github.com/comfyanonymous/ComfyUI/discussions/8187
2025-05-19 05:13:40 +09:00
VitoChenLYandchenyijian ca078e54b9 Add 'exit-on-fail' parameter to control failure behavior (#1807)
Co-authored-by: chenyijian <chenyijian@infini-ai.com>
2025-05-09 07:08:41 +09:00
Dr.Lt.Data 72a61a9966 modified: pipfixer/blacklisting - add torchaudio 2025-04-22 01:17:22 +09:00
Dr.Lt.Data 908a1009d2 fixed: cm-cli.py - save-snapshot: use default path if --output is not given
https://github.com/Comfy-Org/comfy-cli/issues/254#issuecomment-2758584763
2025-03-28 12:49:09 +09:00
Dr.Lt.Data 39eaa76b8a fixed: remove migration code completely
https://github.com/ltdrdata/ComfyUI-Manager/issues/1659
2025-03-14 18:24:30 +09:00
Dr.Lt.Data e8c782c8e1 feat: pip_auto_fix.list for custom PIPFixer
fixed: always reinstall comfyui-frontend-package

https://github.com/ltdrdata/ComfyUI-Manager/discussions/980#discussioncomment-12400709
2025-03-05 22:27:24 +09:00
Alexander Piskun 27706f37f6 Fixed typo in "update" cli command (#1609) 2025-03-05 17:00:19 +09:00
Dr.Lt.Data 3de17b2fa6 improve: pip fixer - support missing comfyui_frontend_package fixing 2025-03-05 12:55:39 +09:00
Dr.Lt.Data 0bd1bf2605 fixed: cm-cli - crash when comfyui doesn't have .git dir.
(support for desktop version)
2025-03-04 21:35:24 +09:00
Dr.Lt.Data d3d613cca9 improved: cm-cli.sh - add --restore-to option to restore-snapshot command 2025-02-25 12:38:29 +09:00
Dr.Lt.Data cee4fdcbb0 fixed: apply ConfigParser(strict=False) to other callsites
https://github.com/ltdrdata/ComfyUI-Manager/pull/1561
2025-02-19 22:07:47 +09:00
Dr.Lt.Data 36f48b8656 feat: custom pip_blacklist
https://github.com/ltdrdata/ComfyUI-Manager/issues/1560
2025-02-17 22:32:26 +09:00
Dr.Lt.Data 2c3f44a3f8 fixed: cm-cli.py - missing 'utils' module if COMYUI_PatH is set
https://github.com/ltdrdata/ComfyUI-Manager/issues/1556
2025-02-17 07:43:35 +09:00
Dr.Lt.Data fa1b514440 improved: Update All - Show link on the result board
fixed: Update All - Updates for unknown nodes were not being applied
fixed: corner case crash whilte install/updating

https://github.com/ltdrdata/ComfyUI-Manager/issues/1168
2025-02-16 14:25:57 +09:00
Dr.Lt.Data 3b0709f5f2 improved: cm-cli.py save-snapshot - validate output path
fixed: Update all - Properly display the results of the ComfyUI update.
fixed: Update all - An issue where the action results of the custom nodes manager were reflected in the main dialog.

https://github.com/ltdrdata/ComfyUI-Manager/issues/1548
2025-02-15 09:23:04 +09:00
Robin Huangandpythongosssss eebace1652 Add support for custom node only snapshots (#4) (#1542)
* Add support for custom node only snapshots (#4)

* Fix ruff lint.

---------

Co-authored-by: pythongosssss <125205205+pythongosssss@users.noreply.github.com>
2025-02-14 07:26:35 +09:00
Dr.Lt.Data 41998565db add support COMFYUI_FOLDERS_BASE_PATH 2025-01-26 18:01:34 +09:00
Dr.Lt.Data 3274885803 * FIXED: cm-cli.py - mode doesn't work
* FIXED: get_cnr_data - use timeout fallback
2025-01-19 02:41:38 +09:00
Matvey Kashkinov 93dde4c985 add manager_files_directory to Ctx (#1461) 2025-01-18 13:19:35 +09:00
Dr.Lt.Data 5e5867528d improved: cm-cli.py - apply PIPFixer 2025-01-14 12:19:46 +09:00
Dr.Lt.Data b532a3e784 fixed: cm-cli.py - too many values to unpack error
https://github.com/ltdrdata/ComfyUI-Manager/issues/1446
2025-01-13 12:20:46 +09:00
Dr.Lt.Data 897debb106 improved: prevent hang UI while CNR loading
fixed: normalize id for pyproject.toml
2025-01-13 06:10:59 +09:00
Dr.Lt.Data fd164862f3 fixed: invalid config.ini path
fixed: invalid environment setup for git_helper.py
fixed: default pip overrides doesn't work
modified: git_helper.py - use GIT_EXE_PATH env instead of config.ini
improved: print user_directory and ComfyUI-Manager config path on startup
2025-01-09 22:47:02 +09:00
PONOTECHandyhayano-ponotech 2710d72e07 Fix NameError in get_custom_nodes_paths method (#1393)
This commit addresses the NameError that occurs in the get_custom_nodes_paths method of the Ctx class. The error was caused by the folder_paths module not being properly imported or accessible within the static method. The fix involves the following changes:

1. Add a class variable folder_paths to the Ctx class.
2. Import the folder_paths module in the __init__ method using importlib.
3. Update the get_custom_nodes_paths method to use the class variable.
4. Add error handling to gracefully handle cases where the folder_paths module cannot be imported.

These changes ensure that the folder_paths module is properly imported and accessible within the Ctx class, resolving the NameError and improving the overall stability of the ComfyUI-Manager CLI tool.

Co-authored-by: yhayano-ponotech <yhayano.biz@gmail.com>
2025-01-04 09:02:45 +09:00
Dr.Lt.Data 5e5235f5d1 remove suffix for enabled custom nodes 2024-12-22 01:42:32 +09:00
huchenlei 9d1ef85af8 Add NodePackage 2024-12-20 14:09:07 -08:00
Dr.Lt.Data 31de8ffc3d implement: support --user-directory 2024-12-19 15:27:31 +09:00
Dr.Lt.Data 46a6afcc19 refactor: ruff 2024-12-18 12:30:47 +09:00
Dr.Lt.Data 222254896c Merge branch 'main' into feat/cnr 2024-12-18 12:00:16 +09:00
Chenlei Hu 7b812dee75 Enable pyflake ruff lint rules (#1340) 2024-12-18 11:46:51 +09:00
Dr.Lt.Data a32e551fd0 Revert "Bypass ComfyUI version check when in electron env (#1303)" (#1316)
This reverts commit 6f1bfae957.
2024-12-11 03:41:21 +09:00
6f1bfae957 Bypass ComfyUI version check when in electron env (#1303)
* Hacky: hide the features we do not want to ship with electron app

* Backup

* Take install path for cm-cli.

* Remove unused.

* Add no deps.

* Add no deps.

* Bypass ComfyUI version check when in electron env

* Fix exception when comfyui is not repo

* Fix version reporting always skipped

* Log unhandled errors

---------

Co-authored-by: Yoland Y <4950057+yoland68@users.noreply.github.com>
Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
2024-12-11 03:02:58 +09:00
morikuni 8c2563e64a Fix SyntaxError: invalid syntax (#1013) 2024-08-28 13:29:28 +09:00
Dr.Lt.Data 06b79287e2 Merge branch 'main' into feat/cnr 2024-08-16 00:10:02 +09:00
Dr.Lt.Data 61efd60681 feat: complete pip freezing for torch, torchsde, torchvision 2024-08-16 00:07:19 +09:00
Dr.Lt.Data cddd000848 Merge branch 'main' into feat/cnr 2024-08-02 03:25:30 +09:00
Dr.Lt.Data cdb400d32b implement: invalid installation handling
- print invalid installation nodes on terminal
(installed by `comfy registryinstall`)

- show only 'reinstall' menu if invalid installation node in gui
(and show INVALID marker)
2024-07-31 02:08:30 +09:00
Dr.Lt.Data 8e1f792cd1 fix: crash by version handling 2024-07-27 22:08:19 +09:00
Dr.Lt.Data 15ef9b9760 hotfix: Temporarily pin numpy installation to numpy<2
numpy 2 is breaking many package dependencies
2024-07-27 11:25:08 +09:00
Max Klein f0299e07f9 added support for --no-deps option to node install and reinstall (#886)
* added support for `--no-deps` option to node install and reinstall

* post rebase fixup

* fixup help msg for --no-deps option
2024-07-27 01:52:07 +09:00
Dr.Lt.Data b3be556837 support CNR 2024-07-25 00:24:58 +09:00
guill 7e84de1ba0 Add support for SSH-style git repo addresses (#835)
This allows nodes to be pulled from git repositories that:
1. Require authentication
2. Are located on a computer that does not have any special software
   beyond an SSH server to serve up git repos
3. Are hosted on sites that exclusively allow SSH access

I have also cleaned up the JavaScript regex for identifying valid HTTP
addresses. Due to an unescaped '.' and the lack of a count on the first
group, it wasn't doing a whole lot anyway -- just checking that the very
first character wasn't invalid.
2024-07-04 21:29:40 +09:00
Dr.Lt.Data 012fe6cd7a feat: cm-cli - post-install 2024-05-25 16:47:54 +09:00