fix: update model type checks to include LoCon and lycoris in API routes. Fixes https://github.com/willmiao/ComfyUI-Lora-Manager/issues/159

This commit is contained in:
Will Miao
2025-05-05 07:48:08 +08:00
parent a3d8261686
commit 1ff2019dde
3 changed files with 8 additions and 13 deletions

View File

@@ -386,10 +386,10 @@ class ApiRoutes:
versions = response.get('modelVersions', [])
model_type = response.get('type', '')
# Check model type - should be LORA
if model_type.lower() != 'lora':
# Check model type - should be LORA or LoCon
if model_type.lower() not in ['lora', 'locon']:
return web.json_response({
'error': f"Model type mismatch. Expected LORA, got {model_type}"
'error': f"Model type mismatch. Expected LORA or LoCon, got {model_type}"
}, status=400)
# Check local availability for each version