Comfy-Org/ComfyUI · error · FileNotFoundError
Model in folder '{folder_name}' with filename '{filename}' n
Error message
Model in folder '{folder_name}' with filename '{filename}' not found. What it means
get_full_path_or_raise looks up filename in the registered folder_name (models/checkpoints, models/upscale_models, etc.) via get_full_path and raises FileNotFoundError when the lookup returns None — the file is not present in any registered directory for that folder type, or its extension is filtered out by the folder's allowed extensions.
Source
Thrown at folder_paths.py:467
folders = folder_names_and_paths[folder_name]
filename = os.path.relpath(os.path.join("/", filename), "/")
for x in folders[0]:
full_path = os.path.join(x, filename)
if os.path.isfile(full_path):
return full_path
elif os.path.islink(full_path):
logging.warning("WARNING path {} exists but doesn't link anywhere, skipping.".format(full_path))
return None
def get_full_path_or_raise(folder_name: str, filename: str) -> str:
"""
Get the full path of a file in a folder, has to be a file
"""
full_path = get_full_path(folder_name, filename)
if full_path is None:
raise FileNotFoundError(f"Model in folder '{folder_name}' with filename '{filename}' not found.")
return full_path
def get_filename_list_(folder_name: str) -> tuple[list[str], dict[str, float], float]:
folder_name = map_legacy(folder_name)
global folder_names_and_paths
output_list = set()
folders = folder_names_and_paths[folder_name]
output_folders = {}
for x in folders[0]:
files, folders_all = recursive_search(x, excluded_dir_names=[".git"])
output_list.update(filter_files_extensions(files, folders[1]))
output_folders = {**output_folders, **folders_all}
return sorted(list(output_list)), output_folders, time.perf_counter()
def cached_filename_list_(folder_name: str) -> tuple[list[str], dict[str, float], float] | None:
strong_cache = cache_helper.get(folder_name)View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Verify the file exists under a registered directory for that folder type (check extra_paths.yaml / model paths config)
- Fix casing or filename to match exactly what the node requests
- Restart/refresh so the folder registrations and model caches rescan, then re-select the model in the node
Defensive patterns
Strategy: validation
Validate before calling
import folder_paths
if filename not in folder_paths.get_filename_list(folder_name):
raise SystemExit(f"{filename} missing from {folder_name}; check paths and refresh") Type guard
def model_exists(folder_name: str, filename: str) -> bool:
return filename in folder_paths.get_filename_list(folder_name) Try / catch
try:
path = folder_paths.get_full_path_or_raise(folder_name, filename)
except FileNotFoundError:
# rescan/re-register folders, then retry selection once
raise Prevention
- Verify model files exist under registered paths before running shared workflows
- Match filenames exactly, including case, on case-sensitive filesystems
When it happens
Trigger: Model file missing, renamed, or moved after the workflow was created; filename casing mismatch on case-sensitive filesystems; file present but with an extension not in the folder type's filter set; extra_path_config not loaded so the containing directory is not registered; model list cache stale.
Common situations: Sharing workflows between machines with different model layouts; downloading a model into the wrong subfolder; symlinks that point nowhere (logged and skipped); folder_names_and_paths registered with restricted extensions.
Related errors
- INVALID_TAG_FILTER
- ERROR: audio encoder file is invalid or unsupported embed_di
- ERROR: audio encoder not supported.
- Control type {max_type_name}({max_type}) is out of range for
- CORRUPTED MODEL: one of the q-k-v values for the text encode
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/1b5e1871f1dcf136.
Report an issue: GitHub.