5 Commits

Author SHA1 Message Date
hayden
f9b0afcbf5 chore: prepare publish 2.0.1 2024-11-05 09:34:14 +08:00
Hayden
1f4c55ab89 Merge pull request #42 from hayden-fr/hotfix
fix: Cross-device movement
2024-11-04 12:05:28 +08:00
hayden
da1ec3a52c fix: Cross-device movement 2024-11-04 12:01:27 +08:00
Hayden
79b106d986 Merge pull request #41 from sansmoraxz/patch-1
Fix image path resolution for windows
2024-11-04 11:13:20 +08:00
Souyama
4c1af63d0d Update utils.py
Fix image resolution for windows
2024-11-03 18:16:45 +05:30
2 changed files with 5 additions and 4 deletions

View File

@@ -137,6 +137,7 @@ def file_list_to_name_dict(files: list[str]):
file_dict: dict[str, str] = {}
for file in files:
filename = os.path.splitext(file)[0]
filename = filename.replace(os.path.sep, "/")
file_dict[filename] = file
return file_dict
@@ -272,7 +273,7 @@ def rename_model(model_path: str, new_model_path: str):
os.makedirs(new_model_dirname)
# move model
os.rename(model_path, new_model_path)
shutil.move(model_path, new_model_path)
# move preview
previews = get_model_all_images(model_path)
@@ -287,14 +288,14 @@ def rename_model(model_path: str, new_model_path: str):
new_model_dirname, new_model_name + ".preview" + preview_ext
)
)
os.rename(preview_path, new_preview_path)
shutil.move(preview_path, new_preview_path)
# move description
description = get_model_description_name(model_path)
description_path = os.path.join(model_dirname, description)
if os.path.isfile(description_path):
new_description_path = os.path.join(new_model_dirname, f"{new_model_name}.md")
os.rename(description_path, new_description_path)
shutil.move(description_path, new_description_path)
import pickle

View File

@@ -1,7 +1,7 @@
[project]
name = "comfyui-model-manager"
description = "Manage models: browsing, download and delete."
version = "2.0.0"
version = "2.0.1"
license = "LICENSE"
[project.urls]