fix: use folder_paths to resolve model directory in placeholder text

Amp-Thread-ID: https://ampcode.com/threads/T-019ca1cb-0150-7549-8b1b-6713060d3408
This commit is contained in:
bymyself
2026-02-27 17:14:21 -08:00
parent bcaad9f117
commit c11a68bf79

View File

@@ -481,7 +481,15 @@ def get_model_placeholder(folder_name: str) -> str:
Returns:
A user-friendly placeholder string indicating where models should be placed.
"""
return f"No models found in ComfyUI/models/{folder_name} folder..."
folder_name = map_legacy(folder_name)
try:
paths = get_folder_paths(folder_name)
except KeyError:
paths = []
if paths:
return f"No models found — add to: {paths[0]}"
return f"No models found for '{folder_name}'..."
def get_input_subfolders() -> list[str]: