mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 14:42:11 -03:00
feat(model): add model type filtering support
- Add model_types parameter to ModelListingHandler to support filtering by model type
- Implement get_model_types endpoint in ModelQueryHandler to retrieve available model types
- Register new /api/lm/{prefix}/model-types route for model type queries
- Extend BaseModelService to handle model type filtering in queries
- Support both model_type and civitai_model_type query parameters for backward compatibility
This enables users to filter models by specific types, improving model discovery and organization capabilities.
This commit is contained in:
@@ -161,6 +161,12 @@ class ModelScanner:
|
||||
if trained_words:
|
||||
slim['trainedWords'] = list(trained_words) if isinstance(trained_words, list) else trained_words
|
||||
|
||||
civitai_model = civitai.get('model')
|
||||
if isinstance(civitai_model, Mapping):
|
||||
model_type_value = civitai_model.get('type')
|
||||
if model_type_value not in (None, '', []):
|
||||
slim['model'] = {'type': model_type_value}
|
||||
|
||||
return slim or None
|
||||
|
||||
def _build_cache_entry(
|
||||
|
||||
Reference in New Issue
Block a user