Commit Graph
137 Commits
Author SHA1 Message Date
Dr.Lt.Data 9117bce3e1 Fix git_exe, the commit and submodules of a node pack and the git steps of install and update
Three 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
- Fail an update whose pull or submodule update failed, leave the node pack
  at its commit, remove what a clone that failed left, and refuse an install
  of a node pack that another install is working on
2026-11-18 00:10:04 +09:00
Dr.Lt.Data afd1b1e606 Leave the log file alone once it is closed (#3538)
Restarting through comfy-cli calls close_log() and then exits from the
request handler. asyncio logs the exit, the Manager's logging handler
passes the record to the logger for the log file, and the write to the
closed file raised ValueError: the console showed it twice at every
such restart.

- Write to the log file only while it is open; the console still gets
  what is written to it
- Close the log file under the lock of the writes, so that a write
  that has found it open is not overtaken by the close
- Add tests for writes to an open and to a closed log file, and for
  the lock around the close
- Add a CHANGELOG entry
2026-11-16 08:38:20 +09:00
Perfect Johny cd297dafa7 Report the console's terminal state from the logger (#3423)
With file logging on, the logger that captures stdout and stderr
answered isatty() with False for every caller and had no closed
attribute. After colorama.init(), colorama took the console for a pipe
and removed the colors of every print(), and tqdm and rich took a
terminal for a pipe (#3259).

- Answer isatty() from the stream the logger wraps, and False when
  that stream cannot answer
- Add closed, which colorama takes as True for a stream without it:
  the state of the wrapped stream, False for a stream that has no such
  attribute, and True for a detached stream
- Answer closed True once the log file is closed. Restarting through
  comfy-cli calls close_log() and then exits, and colorama's exit
  handler would write its reset through the logger
- Add tests for both answers on both streams, for streams that cannot
  answer, and for what colorama does with the answers
- Add a CHANGELOG entry

The same change for manager-v4 is #3465.
2026-11-15 23:47:30 +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
Perfect Johny 41b6f19931 Read node pack and pip versions that carry a suffix (#3431)
StrictVersion read each of the first three components of a version
with int(), so it raised on a suffix after the third number. On main
it read node pack versions and pip versions alike.

- Read a node pack version with a pre-release after the third number,
  following '.' or '-', and write it with '-' as before: a registry
  version such as 1.8.0-beta.1 is recognized, and 0.1.3.post1 no
  longer stops the scan of installed node packs
- Compare pip versions with packaging in is_blacklisted and
  is_installed of manager_core and in is_installed of
  prestartup_script: an installed 2.5.1+cu124 or 4.41.0rc1 no longer
  raises, which at the next start skipped the rest of a node pack's
  requirements and its install.py
- Ask a packaging Specifier for the entries of pip_auto_fix.list, as
  pip does; "~=" becomes a compatible-release clause
- Import packaging where it is used, because prestartup_script imports
  manager_util before it installs missing dependencies
- Add tests that run the real scan and the real pip checks
- Add a CHANGELOG entry

The same change for manager-v4 is #3516. Fixes #1755.
2026-11-14 15:32:01 +09:00
Pablo Apiolazza ecc09f1a12 Fix restart losing quotes around arguments that contain spaces (#3488)
os.execv on Windows joins its arguments with spaces and quotes nothing, so
only the interpreter and script path (quoted by hand) survived a restart.
Any other argument with a space, e.g. --browser-profile "Profile 1", was
split in two and ComfyUI failed to start with 'unrecognized arguments'.

Build the command in one helper, manager_util.build_restart_command, used by
both the reboot endpoint and the prestartup restart. On Windows every entry
is quoted with subprocess.list2cmdline; other platforms are unchanged.

Fixes #3339
2026-11-12 18:06:37 +09:00
Dr.Lt.Data 572f363696 v3: Prevent HTML and URL injection in the Manager UI (#3296) 2026-09-19 08:22:26 +09:00
Dr.Lt.Data ea7534fae8 v3: Restrict Flagged CNR installs on non-local listeners (#3298) 2026-09-19 07:47:20 +09:00
Akhil Narayanan 1fe90867a2 Ignore Windows stderr flush errors (#2462) 2026-01-08 01:22:02 +09:00
Dr.Lt.Data aaed1dc3d5 feat(security): Support System User Protection API with security migration (V3.38) (#2338)
- Migrate Manager data path: default/ComfyUI-Manager → __manager
- Force security_level=strong on outdated ComfyUI (block installations)
- Auto-migrate config.ini only; backup legacy files for manual verification
- Raise weak/normal- to normal during migration
- Add /manager/startup_alerts API for UI warnings
- Differentiate 403 responses: comfyui_outdated vs security_level
- Block startup scripts execution on old ComfyUI

Requires ComfyUI v0.3.76+ for full functionality.
Backward compatible with older versions (uses legacy path).
2025-12-03 00:42:12 +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 a0aee41f1a fixed: Support configuration with use_uv enabled in environments where only uv exists without pip.
https://github.com/Comfy-Org/ComfyUI-Manager/issues/1828
2025-06-25 12:44:26 +09:00
Dr.Lt.Data cac105b0d5 fixed: prevent halting when log flushing fails.
https://github.com/Comfy-Org/ComfyUI-Manager/issues/1794
2025-06-08 06:54:39 +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
Dr.Lt.Data 22a2bf1584 Apply https://github.com/Comfy-Org/ComfyUI-Manager/pull/1811 to prestartup_script as well. 2025-05-13 01:59:42 +09:00
Dr.Lt.Data 72a61a9966 modified: pipfixer/blacklisting - add torchaudio 2025-04-22 01:17:22 +09:00
Dr.Lt.Data 7b28bf608b modified: release pinning ultralytics version 2025-04-22 00:43:20 +09:00
Juggernaut 4b904934ef AttributeError fix (#1672) 2025-03-18 00:49:37 +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 f9990ca8eb fixed: make_pip_cmd - add '-s' option 2025-03-13 22:48:13 +09:00
Alexander Piskun 8b16ef641b small fix for running as py-module on windows (#1615) 2025-03-06 21:48:08 +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 2af66d7efc support of py-module in prestartup script (#1610) 2025-03-05 17:44:42 +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 1248bd0413 fixed: robust rmtree for windows environment
- reserve for deletion upon restart if a permission error occurs during rmtree

https://github.com/ltdrdata/ComfyUI-Manager/issues/1579
2025-03-03 21:34:38 +09:00
Dr.Lt.Data 86893d999a fixed: Added the Python executable path to the PATH environment variable, preventing potential issues caused by a missing PATH.
https://github.com/ltdrdata/ComfyUI-Manager/issues/1554
2025-02-25 12:18:31 +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 59fb63f1f7 ruff fix 2025-02-16 14:42:58 +09:00
Dr.Lt.Data 1579c58876 fixed: ensure chardet dependency
https://github.com/ltdrdata/ComfyUI-Manager/discussions/1553
2025-02-16 13:04:56 +09:00
Dr.Lt.Data 60a5e4f261 fixed: address abnormal encoding of 'requirements.txt'
improved: better error message

https://github.com/ltdrdata/ComfyUI-Manager/issues/1513
2025-02-16 10:05:29 +09:00
Dr.Lt.Data abc26cf906 fixed: pre_startup - restart if script is executed
fixed: normalize cnr versions via StrictVersion
- 2.5 and 2.5.0 were regarded as different version
2025-02-15 17:27:09 +09:00
Dr.Lt.Data bf57de85c3 fixed: datetime import error
https://github.com/ltdrdata/ComfyUI-Manager/issues/1517
2025-02-07 09:19:05 +09:00
Dr.Lt.Data 816a53a7b1 fixed: add uv to requirements.txt
fixed: invalid interpretation of use_uv config item on prestartup_script

https://github.com/ltdrdata/ComfyUI-Manager/issues/1511
2025-02-03 09:21:20 +09:00
Dr.Lt.Data ced93b0525 fixed: prestartup_script.py error when config.ini is not exists 2025-02-02 23:41:01 +09:00
Dr.Lt.Data df2a7ddca4 fixed: auto dependencies installation
- missing `rich` module
2025-02-02 21:17:35 +09:00
Dr.Lt.Data 33f931c0a4 feat: Support for uv has been added.
Set `use_uv` in `config.ini`.
2025-02-02 17:26:29 +09:00
Dr.Lt.Data 1a7edf7f0e fixed: datetime.datetime crash - use hasattr instead of exception handling
https://github.com/ltdrdata/ComfyUI-Manager/issues/1503
2025-02-01 11:37:53 +09:00
Dr.Lt.Data b5946344dc fixed: logging - ensure user_directory is created before start logging.
https://github.com/ltdrdata/ComfyUI-Manager/issues/1487
2025-01-28 07:35:13 +09:00
Dr.Lt.Data 41998565db add support COMFYUI_FOLDERS_BASE_PATH 2025-01-26 18:01:34 +09:00
Dr.Lt.Data 0eb1cbce43 feat: provide error messages for import failed custom node. 2025-01-18 13:04:33 +09:00
Wenyu.Li 4ad1c8a238 fix pattern (#1439) 2025-01-12 14:21:59 +09:00
Dr.Lt.Data 9578ce0820 fixed: robust datetime error
- support fallback timestamp mode

https://forum.comfy.org/t/restarting-comfyui-using-comfyui-manager-will-cause-it-to-fail-to-start/1090
2025-01-12 02:23:52 +09:00
Dr.Lt.Data 85a03e6249 FIXED: pip downgrade blacklisting doesn't work if ~= pattern
https://github.com/ltdrdata/ComfyUI-Manager/issues/1301
https://github.com/ltdrdata/ComfyUI-Manager/issues/1425
2025-01-12 01:22:26 +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
Dr.Lt.Data 585cc0d991 fixed: invalid skipping of pip dependencies installation if ==, ~=
removed: useless badge related code
2025-01-04 03:07:36 +09:00
Dr.Lt.Data 16db68aa8e updated: README.md
removed: useless scripts
fixed: robust installation of toml module
2025-01-03 18:55:05 +09:00
Dr.Lt.Data 31de8ffc3d implement: support --user-directory 2024-12-19 15:27:31 +09:00
Dr.Lt.Data 602d04e236 fix: prestartup - import error 2024-12-19 11:33:58 +09:00
Dr.Lt.Data 46a6afcc19 refactor: ruff 2024-12-18 12:30:47 +09:00