diff --git a/custom_routes.py b/custom_routes.py index 3fbab8b..f3a6a91 100755 --- a/custom_routes.py +++ b/custom_routes.py @@ -159,9 +159,17 @@ async def shellagent_export(request): # with open(os.path.join(save_root, fname), "w") as f: # json.dump(dict_to_save, f, indent=2) + if dependency_results.get("black_list_nodes", []): + warning_message = "The following nodes cannot be deployed to myshell:\n" + for item in dependency_results["black_list_nodes"]: + warning_message += f" {item['name']}: {item['reason']}\n" + else: + warning_message = "" + return_dict = { "success": True, - "dependencies": dependency_results, + "dependencies": dependency_results["dependencies"], + "warning_message": warning_message, "schemas": schemas } except Exception as e: diff --git a/dependency_checker.py b/dependency_checker.py index acaa788..64677fb 100644 --- a/dependency_checker.py +++ b/dependency_checker.py @@ -91,7 +91,7 @@ def inspect_repo_version(module_path): def fetch_model_searcher_results(model_ids): import requests - url = "https://shellagent.myshell.ai/models_searcher/search_urls" + url = "https://models-searcher.myshell.life/search_urls" headers = { "Content-Type": "application/json" } @@ -145,12 +145,12 @@ def resolve_dependencies(prompt, custom_dependencies): # resolve custom nodes an matching_files = [] # Walk through all subdirectories and files in the directory for possible_folder_name in folder_paths.folder_names_and_paths: - full_path = folder_paths.get_full_path(possible_folder_name) + full_path = folder_paths.get_full_path(possible_folder_name, filename) if full_path is None: continue matching_files.append(full_path) print(f"matched files: {matching_files}") - if len(matching_files) == 1: + if len(set(matching_files)) == 1: ckpt_paths.append(matching_files[0]) list(map(partial(collect_local_file, mapping_dict=file_mapping_dict), node_info["inputs"].values())) @@ -231,4 +231,4 @@ def resolve_dependencies(prompt, custom_dependencies): # resolve custom nodes an "dependencies": depencencies, "black_list_nodes": black_list_nodes, } - return return_dict \ No newline at end of file + return return_dict diff --git a/node_blacklist.json b/node_blacklist.json new file mode 100644 index 0000000..4fca91b --- /dev/null +++ b/node_blacklist.json @@ -0,0 +1,5 @@ +{ + "comfyui-ollama": { + "reason": "this node requires installing an extra software on linux, which is currently unsupported" + } +} \ No newline at end of file