update file path
This commit is contained in:
@@ -46,7 +46,7 @@ def handle_model_info(ckpt_path):
|
||||
|
||||
item = {
|
||||
"filename": filename,
|
||||
"save_path": save_path,
|
||||
"save_path": windows_to_linux_path(save_path),
|
||||
"urls": urls,
|
||||
}
|
||||
return model_id, item
|
||||
@@ -192,7 +192,7 @@ def resolve_dependencies(prompt, custom_dependencies): # resolve custom nodes an
|
||||
|
||||
# step 3: handle local files
|
||||
process_local_file_path_async(file_mapping_dict, max_workers=20)
|
||||
files_dict = {v[0]: {"filename": os.path.relpath(v[2], BASE_PATH), "urls": [v[1]]} for v in file_mapping_dict.values()}
|
||||
files_dict = {v[0]: {"filename": windows_to_linux_path(os.path.relpath(v[2], BASE_PATH)), "urls": [v[1]]} for v in file_mapping_dict.values()}
|
||||
|
||||
results = {
|
||||
"comfyui_version": comfyui_version,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import hashlib
|
||||
import time
|
||||
from pathlib import PurePosixPath, Path
|
||||
from pathlib import PurePosixPath, Path, PureWindowsPath
|
||||
|
||||
def windows_to_linux_path(windows_path):
|
||||
return str(PurePosixPath(Path(windows_path)))
|
||||
return PureWindowsPath(windows_path).as_posix()
|
||||
|
||||
def compute_sha256(file_path, chunk_size=1024 ** 2):
|
||||
# Create a new sha256 hash object
|
||||
|
||||
Reference in New Issue
Block a user