New way to display models thumbnail preview images

This commit is contained in:
yolain
2025-01-17 22:17:56 +08:00
parent bf21bbfd93
commit 765462549c
5 changed files with 4 additions and 19 deletions
-12
View File
@@ -65,18 +65,6 @@ if not os.path.exists(example_path):
with open(example_path, 'w', encoding='utf-8') as f:
json.dump(data, f, indent=4, ensure_ascii=False)
# Model thumbnails
from .py.libs.add_resources import add_static_resource
from .py.libs.model import easyModelManager
model_config = easyModelManager().models_config
for model in model_config:
paths = folder_paths.get_folder_paths(model)
for path in paths:
if not Path(path).exists():
continue
add_static_resource(path, path, limit=True)
# get comfyui revision
from .py.libs.utils import compare_revision
+1 -4
View File
@@ -31,7 +31,4 @@ add_folder_path_and_extensions("mediapipe", [os.path.join(model_path, "mediapipe
add_folder_path_and_extensions("inpaint", [os.path.join(model_path, "inpaint")], folder_paths.supported_pt_extensions)
add_folder_path_and_extensions("prompt_generator", [os.path.join(model_path, "prompt_generator")], folder_paths.supported_pt_extensions)
add_folder_path_and_extensions("t5", [os.path.join(model_path, "t5")], folder_paths.supported_pt_extensions)
add_folder_path_and_extensions("llm", [os.path.join(model_path, "LLM")], folder_paths.supported_pt_extensions)
add_folder_path_and_extensions("checkpoints_thumb", [os.path.join(model_path, "checkpoints")], image_suffixs)
add_folder_path_and_extensions("loras_thumb", [os.path.join(model_path, "loras")], image_suffixs)
add_folder_path_and_extensions("llm", [os.path.join(model_path, "LLM")], folder_paths.supported_pt_extensions)
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long