Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9b0afcbf5 | ||
|
|
1f4c55ab89 | ||
|
|
da1ec3a52c | ||
|
|
79b106d986 | ||
|
|
4c1af63d0d |
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user