Compare commits

..
Author SHA1 Message Date
Dr.Lt.Data 00e04062c6 Show a model in a subfolder of an extra model path as installed
The Model Manager looked for the file of a model whose save_path has a
subfolder, such as checkpoints/SD1.5, at the top of each folder that
ComfyUI has for checkpoints and in models/checkpoints/SD1.5. A file in
checkpoints/SD1.5 of a folder that extra_model_paths.yaml adds was not
found, and the model was shown as not installed (#1844). 349 of the 569
rows of model-list.json have such a save_path under a folder of ComfyUI.

After those checks, check_model_installed now asks
folder_paths.get_full_path for the rest of the save_path and the file
name, under the first folder of the save_path. ComfyUI looks in every
folder it has for that name, the extra ones included, and finds nothing
for a name it does not have. The check only adds a way to be found, so a
model that was shown as installed still is.
2026-12-01 00:22:53 +09:00
5 changed files with 70 additions and 85 deletions
+9
View File
@@ -2,6 +2,15 @@
## Unreleased
### The Model Manager finds a model in a subfolder of an extra model path
A model whose folder in the list has a subfolder, such as `checkpoints/SD1.5`,
was shown as not installed when its file was in that subfolder of a folder
that `extra_model_paths.yaml` adds (#1844). The Model Manager now also asks
ComfyUI where the file is. ComfyUI looks in every folder it has for the first
part of the path, the extra ones included, so the model is shown as installed.
A model that was shown as installed before still is.
### The PyTorch restore after a nodepack installs the builds that were installed before
When a nodepack changed torch or torchvision and the torch from before had
-42
View File
@@ -61902,28 +61902,6 @@
"install_type": "git-clone",
"description": "Generate Wan videos and retrieve task results. Requires an Ace Data Cloud API key. Generation is metered."
},
{
"author": "AceDataCloud",
"title": "ACE Music",
"id": "ace-acemusic",
"reference": "https://github.com/AceDataCloud/ACEMusicComfyUI",
"files": [
"https://github.com/AceDataCloud/ACEMusicComfyUI"
],
"install_type": "git-clone",
"description": "Generate ACE Music songs and lyrics, import reference assets, and retrieve results by task ID. Requires an Ace Data Cloud API key. Generation and reference imports are metered."
},
{
"author": "AceDataCloud",
"title": "GPT Image",
"id": "gpt-image",
"reference": "https://github.com/AceDataCloud/GPTImageComfyUI",
"files": [
"https://github.com/AceDataCloud/GPTImageComfyUI"
],
"install_type": "git-clone",
"description": "Generate and edit images with GPT Image, retrieve task results, and load the resulting images in ComfyUI. Requires an Ace Data Cloud API key. Generation and editing are metered."
},
{
"author": "NotUsingGithub",
"title": "Wan27",
@@ -62810,26 +62788,6 @@
"install_type": "git-clone",
"description": "Find misspelled text in photos and AI-generated images with Gemini, then use an image-editing workflow to fix localized text and review spelling and style. Includes check-only and SenseNova U1.6 examples."
},
{
"author": "Raykosan (RaykoStudio)",
"title": "ComfyUI-RS_WorkspaceManager",
"reference": "https://github.com/Raykosan/ComfyUI-RS_WorkspaceManager",
"files": [
"https://github.com/Raykosan/ComfyUI-RS_WorkspaceManager"
],
"install_type": "git-clone",
"description": "Workflow Preset Manager and Interface Settings Backup for ComfyUI."
},
{
"author": "assetfeed",
"title": "AssetFeed",
"reference": "https://github.com/assetfeed/comfyui-assetfeed",
"files": [
"https://github.com/assetfeed/comfyui-assetfeed"
],
"install_type": "git-clone",
"description": "Nodes for the AssetFeed API: AssetFeed OCR reads the text in an image, and AssetFeed AI Text Check estimates the AI-written share of an English text. Needs an ASSETFEED_API_KEY environment variable; images and text are sent to api.assetfeed.com; data handling is in the README."
},
{
"author": "ntdviet",
"title": "ntdviet/comfyui-ext",
+3 -1
View File
@@ -1145,8 +1145,10 @@ def check_model_installed(json_obj):
filename = item['filename']
fullpath = os.path.join(folder_paths.models_dir, item['save_path'], filename)
subpath = os.path.join(item['save_path'].partition('/')[2], filename)
found = os.path.exists(fullpath) or folder_paths.get_full_path(model_dir_name, subpath)
item['installed'] = 'True' if os.path.exists(fullpath) else 'False'
item['installed'] = 'True' if found else 'False'
with concurrent.futures.ThreadPoolExecutor(8) as executor:
for item in json_obj['models']:
-42
View File
@@ -1,47 +1,5 @@
{
"custom_nodes": [
{
"author": "AceDataCloud",
"title": "GPT Image",
"id": "gpt-image",
"reference": "https://github.com/AceDataCloud/GPTImageComfyUI",
"files": [
"https://github.com/AceDataCloud/GPTImageComfyUI"
],
"install_type": "git-clone",
"description": "Generate and edit images with GPT Image, retrieve task results, and load the resulting images in ComfyUI. Requires an Ace Data Cloud API key. Generation and editing are metered."
},
{
"author": "AceDataCloud",
"title": "ACE Music",
"id": "ace-acemusic",
"reference": "https://github.com/AceDataCloud/ACEMusicComfyUI",
"files": [
"https://github.com/AceDataCloud/ACEMusicComfyUI"
],
"install_type": "git-clone",
"description": "Generate ACE Music songs and lyrics, import reference assets, and retrieve results by task ID. Requires an Ace Data Cloud API key. Generation and reference imports are metered."
},
{
"author": "assetfeed",
"title": "AssetFeed",
"reference": "https://github.com/assetfeed/comfyui-assetfeed",
"files": [
"https://github.com/assetfeed/comfyui-assetfeed"
],
"install_type": "git-clone",
"description": "Nodes for the AssetFeed API: AssetFeed OCR reads the text in an image, and AssetFeed AI Text Check estimates the AI-written share of an English text. Needs an ASSETFEED_API_KEY environment variable; images and text are sent to api.assetfeed.com; data handling is in the README."
},
{
"author": "Raykosan (RaykoStudio)",
"title": "ComfyUI-RS_WorkspaceManager",
"reference": "https://github.com/Raykosan/ComfyUI-RS_WorkspaceManager",
"files": [
"https://github.com/Raykosan/ComfyUI-RS_WorkspaceManager"
],
"install_type": "git-clone",
"description": "Workflow Preset Manager and Interface Settings Backup for ComfyUI."
},
{
"author": "bewizsky",
"title": "Eyes4AI Text Repair",
+58
View File
@@ -0,0 +1,58 @@
import ast
import concurrent.futures
import os
from types import SimpleNamespace
import pytest
from manager_test_utils import GLOB_DIR
KEYS = ("checkpoints", "controlnet")
def installed(tmp_path, save_path, file):
folders = {key: [str(tmp_path / "models" / key), str(tmp_path / "extra" / key)] for key in KEYS}
path = tmp_path / file
path.parent.mkdir(parents=True)
path.write_bytes(b"")
def get_full_path(key, name):
return next((os.path.join(folder, name) for folder in folders.get(key, [])
if os.path.isfile(os.path.join(folder, name))), None)
def get_filename_list(key):
return [os.path.relpath(os.path.join(root, name), folder)
for folder in folders.get(key, []) for root, _, names in os.walk(folder) for name in names]
folder_paths = SimpleNamespace(models_dir=str(tmp_path / "models"),
folder_names_and_paths={key: (paths, set()) for key, paths in folders.items()},
get_folder_paths=lambda key: folders[key],
get_filename_list=get_filename_list, get_full_path=get_full_path)
source = (GLOB_DIR / "manager_server.py").read_text(encoding="utf-8")
nodes = [node for node in ast.parse(source).body
if isinstance(node, ast.FunctionDef) and node.name == "check_model_installed"]
assert len(nodes) == 1
namespace = {"os": os, "concurrent": concurrent, "folder_paths": folder_paths, "model_dir_name_map": {}}
exec(compile(ast.Module(nodes, []), "<check_model_installed>", "exec"), namespace)
row = {"name": "m", "type": "checkpoint", "base": "SD1.5", "save_path": save_path,
"filename": "model.safetensors", "url": "https://example.invalid/model.safetensors"}
namespace["check_model_installed"]({"models": [row]})
return row.get("installed")
def test_model_in_a_subfolder_of_an_extra_model_path_is_installed(tmp_path):
assert installed(tmp_path, "checkpoints/SD1.5", "extra/checkpoints/SD1.5/model.safetensors") == "True"
@pytest.mark.parametrize("save_path, file, expected", [
("checkpoints/SD1.5", "models/checkpoints/SD1.5/model.safetensors", "True"),
("checkpoints/SD1.5", "extra/checkpoints/model.safetensors", "True"),
("RGT/RGT", "models/RGT/RGT/model.safetensors", "True"),
("checkpoints/SD1.5", "extra/checkpoints/SDXL/model.safetensors", "False"),
("checkpoints/SD1.5", "extra/controlnet/SD1.5/model.safetensors", "False"),
("RGT/RGT", "extra/RGT/RGT/model.safetensors", "False"),
], ids=["install folder", "top of an extra folder", "folder of no key", "other subfolder", "folder of another key",
"extra folder of no key"])
def test_other_layouts_keep_their_state(tmp_path, save_path, file, expected):
assert installed(tmp_path, save_path, file) == expected