-
Notifications
You must be signed in to change notification settings - Fork 6
Enhance model management by adding support for multiple model types a… #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nd improving API interactions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces version 4.1.0, which significantly enhances model management by supporting a broader range of model types, improves metadata parsing for complex recipes, and fixes a network bug related to the China Mirror endpoint.
- Expanded support for multiple model types including checkpoints, loras, vae, embeddings, diffusion_models, text_encoders, and hypernetworks
- Enhanced metadata parsing engine to handle new complex formats from ComfyUI workflows
- Added diagnostic features with clickable Civitai links for missing checkpoints
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| utils.py | Extended SUPPORTED_MODEL_TYPES, enhanced metadata parsing with new hash format support, and added VAE extraction |
| pyproject.toml | Updated version from 4.0.2 to 4.1.0 |
| nodes.py | Refactored model selection to support separate model type and filename widgets |
| js/local_manager.js | Added support for additional model types in the UI |
| js/global_settings.js | Fixed quote formatting in help text |
| js/gallery.js | Improved model filtering and widget initialization with async loading |
| api.py | Updated API endpoint to handle separate model_type and model_filename parameters |
| init.py | Updated version to 4.1.0 |
| README_ZH.md | Added Chinese changelog for version 4.1.0 |
| README.md | Added English changelog for version 4.1.0 |
| CHANGELOG.md | Added comprehensive changelog entries in both languages |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| HASH_CACHE_REFRESH_INTERVAL = 3600 | ||
| SUPPORTED_MODEL_TYPES = { "checkpoints": "checkpoints", "loras": "Lora", "vae": "VAE", "embeddings": "embeddings", "hypernetworks": "hypernetworks" } | ||
| SUPPORTED_MODEL_TYPES = { "checkpoints": "checkpoints", "loras": "Lora", "vae": "VAE", "embeddings": "embeddings", "diffusion_models":"diffusion_models", "text_encoders":"text_encoders","hypernetworks": "hypernetworks" } |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing spaces around colons in dictionary definition. The entries 'diffusion_models':'diffusion_models' and 'text_encoders':'text_encoders' should have spaces around the colons for consistency with the rest of the code.
| SUPPORTED_MODEL_TYPES = { "checkpoints": "checkpoints", "loras": "Lora", "vae": "VAE", "embeddings": "embeddings", "diffusion_models":"diffusion_models", "text_encoders":"text_encoders","hypernetworks": "hypernetworks" } | |
| SUPPORTED_MODEL_TYPES = { "checkpoints": "checkpoints", "loras": "Lora", "vae": "VAE", "embeddings": "embeddings", "diffusion_models": "diffusion_models", "text_encoders": "text_encoders", "hypernetworks": "hypernetworks" } |
| # 每个线程独立调用 get_model_version_info_by_hash。 | ||
| # 该函数内部会自己处理数据库的写入和提交操作。 | ||
| CivitaiAPIUtils.get_model_version_info_by_hash(model_hash, force_refresh=False) | ||
| CivitaiAPIUtils.get_model_version_info_by_hash(model_hash,more_info= True) |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent spacing around the keyword argument. Should be more_info=True without the space before the equals sign.
| CivitaiAPIUtils.get_model_version_info_by_hash(model_hash,more_info= True) | |
| CivitaiAPIUtils.get_model_version_info_by_hash(model_hash, more_info=True) |
This pull request introduces version 4.1.0, which significantly enhances model management by supporting a broader range of model types, improves metadata parsing (especially for complex recipes), and fixes a key network bug related to the China Mirror endpoint. The updates are reflected in both English and Chinese documentation, and the UI for model selection and diagnostics is now more robust and user-friendly.
Major feature and compatibility improvements:
Expanded support for model types in both the
Local Managersidebar andRecipe Gallery, now includingcheckpoints,loras,vae,embeddings,diffusion_models,text_encoders, andhypernetworksthroughout the backend, UI, and API. [1] [2] [3] [4] [5] [6] [7] [8] [9]The model selection widgets and API endpoints have been refactored to allow users to choose model type and filename separately, enabling more flexible and accurate model management in the UI and API. [1] [2] [3] [4]
Metadata parsing and diagnostics:
The metadata parsing engine has been upgraded to better handle new, complex formats (e.g., from ComfyUI workflows), ensuring all recipe components (Checkpoints, LoRAs, VAEs) are reliably identified and reported. [1] [2] [3] [4] [5] [6]
The diagnostic report in the Recipe Gallery now provides direct, clickable links to Civitai pages for any missing Checkpoints, matching the feature for missing LoRAs. [1] [2] [3] [4] [5] [6] [7]
Bug fixes and UI/UX improvements:
Fixed a bug where selecting the "China Mirror" network did not correctly apply the endpoint for all API requests; now all browser and API features use the selected network as expected. [1] [2] [3] [4]
Improved UI responsiveness and usability in the Recipe Gallery and Local Manager, including front-end filtering, initialization, and better handling of model lists and widget callbacks. [1] [2] [3] [4] [5] [6]
Version bump and documentation: