Improve model path matching and refresh HuggingFace author index

core/path_templates.py: allow model alias tokens to match when suffixed
with a version string or plural form, reducing false negatives in
single-folder path resolution.

metadata/huggingface-author-index.json: update Comfy-Org index timestamp
and repository ordering.
This commit is contained in:
Dariusz L
2026-07-12 21:00:18 +02:00
parent 8baf3871d0
commit 6451d9bcf4
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -119,7 +119,10 @@ def _match_base_model_segment(
):
if len(alias_token) < 4:
continue
if token.startswith(alias_token) or alias_token in token:
remainder = token[len(alias_token) :] if token.startswith(alias_token) else ""
has_version_suffix = bool(re.fullmatch(r"v?\d+[a-z0-9]*", remainder))
is_plural = token in {f"{alias_token}s", f"{alias_token}es"}
if has_version_suffix or is_plural:
return dict(match)
return None
@@ -142,6 +145,9 @@ def _match_base_model_path(
match = _match_base_model_segment(
" ".join(span),
base_alias_index,
# A single folder may append a version or plural suffix to an
# alias (for example IDEOGRAM4 or Upscalers). Multi-folder spans
# remain exact to avoid guessing across unrelated path parts.
allow_partial=span_length == 1,
)
if not match:
File diff suppressed because one or more lines are too long