[PR #2652] fix: StrictVersion fails to parse semver pre-release versions (e.g. "0.6.2-b1") #2664

Open
opened 2026-10-28 21:11:37 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/2652
Author: @vvb7456
Created: 2/28/2026
Status: 🔄 Open

Base: main ← Head: main


📝 Commits (1)

  • 8b5ebfc fix: StrictVersion fails to parse semver pre-release versions (e.g. "0.6.2-b1")

📊 Changes

1 file changed (+11 additions, -4 deletions)

View changed files

📝 glob/manager_util.py (+11 -4)

📄 Description

Problem

StrictVersion.parse_version_string() splits the version string by . and calls int() on each part. This crashes on standard semver pre-release versions that use a hyphen separator (e.g. 0.6.2-b1), because int("2-b1") raises ValueError.

The exception is silently caught by read_cnr_info() in cnr_utils.py, causing the function to return None. This means identify_node_pack_from_path() also returns None, and the plugin disappears from the installed list — it cannot be updated, uninstalled, or managed through ComfyUI-Manager.

Root Cause

The Comfy Registry specification requires versions to be semantically versioned, and SemVer 2.0.0 §9 defines pre-release versions with a hyphen separator:

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version.
Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7

However, StrictVersion only handles the legacy 4-part dot notation (X.Y.Z.prerelease) and has no support for the hyphen format.

Affected Plugins

Currently 7 plugins in the CNR registry use hyphenated pre-release versions:

Plugin Version
comfyui-reactor 0.6.2-b1
comfyui-reactor-node 0.5.2-b1
comfyui-prompt-control 3.0.0-beta.2
TWanSigmaGraph 0.2.0-alpha
comfyui_play_traversal 2.0.0-inprogress
comfyui-dazzlenodes 0.5.1-alpha
ComfyUI-AssetsPlus 0.2.14-OBT

Fix

Extract the hyphen-separated pre-release suffix before splitting by ., while preserving backward compatibility with the legacy 4-part dot notation.

  • #1694 — "ReActor node isn't recognized in Manager as being installed" (same symptom, root cause now identified)

Testing

Verified with all 7 affected versions + normal versions + legacy dot notation + edge cases:

0.6.2-b1        → OK (was: ValueError)
3.0.0-beta.2    → OK (was: ValueError)
0.2.0-alpha     → OK (was: ValueError)
1.0.0           → OK (unchanged)
0.6.2.b1        → OK (legacy format, still works)

Comparison semantics preserved:

  • 0.6.2-b1 < 0.6.2 → True (pre-release < release, per semver)
  • 0.6.2-alpha < 0.6.2-b1 → True (lexical comparison)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/ComfyUI-Manager/pull/2652 **Author:** [@vvb7456](https://github.com/vvb7456) **Created:** 2/28/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`8b5ebfc`](https://github.com/Comfy-Org/ComfyUI-Manager/commit/8b5ebfc51e1d8bfab33f361b637047698307986e) fix: StrictVersion fails to parse semver pre-release versions (e.g. "0.6.2-b1") ### 📊 Changes **1 file changed** (+11 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `glob/manager_util.py` (+11 -4) </details> ### 📄 Description ## Problem `StrictVersion.parse_version_string()` splits the version string by `.` and calls `int()` on each part. This crashes on standard [semver](https://semver.org/) pre-release versions that use a hyphen separator (e.g. `0.6.2-b1`), because `int("2-b1")` raises `ValueError`. The exception is silently caught by `read_cnr_info()` in `cnr_utils.py`, causing the function to return `None`. This means `identify_node_pack_from_path()` also returns `None`, and the plugin **disappears from the installed list** — it cannot be updated, uninstalled, or managed through ComfyUI-Manager. ### Root Cause The [Comfy Registry specification](https://docs.comfy.org/registry/specifications) requires versions to be **semantically versioned**, and [SemVer 2.0.0 §9](https://semver.org/#spec-item-9) defines pre-release versions with a **hyphen** separator: > A pre-release version MAY be denoted by **appending a hyphen** and a series of dot separated identifiers immediately following the patch version. > Examples: `1.0.0-alpha`, `1.0.0-alpha.1`, `1.0.0-0.3.7` However, `StrictVersion` only handles the legacy 4-part dot notation (`X.Y.Z.prerelease`) and has no support for the hyphen format. ### Affected Plugins Currently **7 plugins** in the CNR registry use hyphenated pre-release versions: | Plugin | Version | |--------|---------| | comfyui-reactor | 0.6.2-b1 | | comfyui-reactor-node | 0.5.2-b1 | | comfyui-prompt-control | 3.0.0-beta.2 | | TWanSigmaGraph | 0.2.0-alpha | | comfyui_play_traversal | 2.0.0-inprogress | | comfyui-dazzlenodes | 0.5.1-alpha | | ComfyUI-AssetsPlus | 0.2.14-OBT | ### Fix Extract the hyphen-separated pre-release suffix before splitting by `.`, while preserving backward compatibility with the legacy 4-part dot notation. ### Related Issues - #1694 — "ReActor node isn't recognized in Manager as being installed" (same symptom, root cause now identified) ### Testing Verified with all 7 affected versions + normal versions + legacy dot notation + edge cases: ``` 0.6.2-b1 → OK (was: ValueError) 3.0.0-beta.2 → OK (was: ValueError) 0.2.0-alpha → OK (was: ValueError) 1.0.0 → OK (unchanged) 0.6.2.b1 → OK (legacy format, still works) ``` Comparison semantics preserved: - `0.6.2-b1 < 0.6.2` → True (pre-release < release, per semver) - `0.6.2-alpha < 0.6.2-b1` → True (lexical comparison) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#2664
No description provided.