mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-08 06:39:56 +00:00
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:
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user