Skip to content

fix: include searched model directories in missing-model errors#13352

Open
LeonSGP43 wants to merge 1 commit intoComfy-Org:masterfrom
LeonSGP43:fix/model-error-search-paths
Open

fix: include searched model directories in missing-model errors#13352
LeonSGP43 wants to merge 1 commit intoComfy-Org:masterfrom
LeonSGP43:fix/model-error-search-paths

Conversation

@LeonSGP43
Copy link
Copy Markdown

Summary

  • include the actual searched model directories in get_full_path_or_raise errors
  • mention legacy folder aliases when a requested folder name is remapped internally
  • add unit coverage for both direct search path hints and legacy mapping messages

Why

Issue #13310 asks for missing-model errors to show users where the corresponding model should be placed. Today the error only says the model was not found, which forces users to inspect source or guess the right directory.

Testing

  • pytest tests-unit/comfy_test/folder_path_test.py
  • pytest tests-unit/comfy_test/folder_path_test.py tests-unit/folder_paths_test

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b7c20914-5394-4af9-b831-4219d56ba041

📥 Commits

Reviewing files that changed from the base of the PR and between e6be419 and c636f24.

📒 Files selected for processing (2)
  • folder_paths.py
  • tests-unit/comfy_test/folder_path_test.py

📝 Walkthrough

Walkthrough

The changes enhance get_full_path_or_raise() to canonicalize folder names using map_legacy() before path lookup, and improve error messages when files are not found. The error messages now include the mapped folder name and list configured search directories if available, or indicate when no search paths are registered. Two unit tests verify the enhanced error reporting for missing model files and legacy folder key mappings.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: enhancing error messages to include searched model directories when a model is not found.
Description check ✅ Passed The description is directly related to the changeset, explaining what was changed (adding searched directories and legacy folder mentions to errors), why it was needed (Issue #13310), and how it was tested.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant