This commit is contained in:
comfyanonymous 2026-01-01 21:59:29 -05:00
parent 16a64ab328
commit df1a436e1b
2 changed files with 6 additions and 4 deletions

View File

@ -44,7 +44,7 @@ class ModelFileManager:
@routes.get("/experiment/models/{folder}") @routes.get("/experiment/models/{folder}")
async def get_all_models(request): async def get_all_models(request):
folder = request.match_info.get("folder", None) folder = request.match_info.get("folder", None)
if not folder in folder_paths.folder_names_and_paths: if folder not in folder_paths.folder_names_and_paths:
return web.Response(status=404) return web.Response(status=404)
files = self.get_model_file_list(folder) files = self.get_model_file_list(folder)
return web.json_response(files) return web.json_response(files)
@ -55,7 +55,7 @@ class ModelFileManager:
path_index = int(request.match_info.get("path_index", None)) path_index = int(request.match_info.get("path_index", None))
filename = request.match_info.get("filename", None) filename = request.match_info.get("filename", None)
if not folder_name in folder_paths.folder_names_and_paths: if folder_name not in folder_paths.folder_names_and_paths:
return web.Response(status=404) return web.Response(status=404)
folders = folder_paths.folder_names_and_paths[folder_name] folders = folder_paths.folder_names_and_paths[folder_name]

View File

@ -2242,8 +2242,10 @@ async def init_external_custom_nodes():
for possible_module in possible_modules: for possible_module in possible_modules:
module_path = os.path.join(custom_node_path, possible_module) module_path = os.path.join(custom_node_path, possible_module)
if os.path.isfile(module_path) and os.path.splitext(module_path)[1] != ".py": continue if os.path.isfile(module_path) and os.path.splitext(module_path)[1] != ".py":
if module_path.endswith(".disabled"): continue continue
if module_path.endswith(".disabled"):
continue
if args.disable_all_custom_nodes and possible_module not in args.whitelist_custom_nodes: if args.disable_all_custom_nodes and possible_module not in args.whitelist_custom_nodes:
logging.info(f"Skipping {possible_module} due to disable_all_custom_nodes and whitelist_custom_nodes") logging.info(f"Skipping {possible_module} due to disable_all_custom_nodes and whitelist_custom_nodes")
continue continue