STAGE 3: F12 Pattern Expansion Complete Changes: 1. Added 7 community pattern JSON files (35 patterns total) - patterns/community/controlnet.json (8 ControlNet patterns) - patterns/community/lora.json (6 LoRA patterns) - patterns/community/vae.json (5 VAE patterns) - patterns/community/animatediff.json (4 AnimateDiff patterns) - patterns/community/ipadapter.json (4 IPAdapter patterns) - patterns/community/facerestore.json (3 FaceRestore patterns) - patterns/community/misc.json (5 misc patterns) 2. Updated ERROR_KEYS in i18n.py - Added 35 new error keys - Total patterns: 57 (22 builtin + 35 community) 3. Added translations for all new patterns - English (en): Complete ✅ - 繁體中文 (zh_TW): Complete ✅ - 简体中文 (zh_CN): Complete ✅ - Other languages (ja, de, fr, it, es, ko): Fallback to English Pattern Categories: - ControlNet: 8 patterns (model loading, preprocessing, sizing) - LoRA: 6 patterns (loading, compatibility, memory) - VAE: 5 patterns (encoding/decoding, precision, tiling) - AnimateDiff: 4 patterns (model, frames, context, memory) - IPAdapter: 4 patterns (model, encoding, compatibility) - FaceRestore: 3 patterns (model, detection, memory) - Miscellaneous: 5 patterns (checkpoint, image format, sampler, scheduler, CLIP) Testing: - ✅ All 9 PatternLoader unit tests pass - ✅ 57 patterns load successfully - ✅ Pattern matching works correctly - ✅ Translations verified for en/zh_TW/zh_CN
66 lines
2.1 KiB
JSON
66 lines
2.1 KiB
JSON
{
|
|
"version": "1.0.0",
|
|
"patterns": [
|
|
{
|
|
"id": "lora_not_found",
|
|
"regex": "LoRA.*not found|Could not find lora|lora_name.*does not exist",
|
|
"error_key": "LORA_NOT_FOUND",
|
|
"has_groups": false,
|
|
"priority": 80,
|
|
"category": "model_loading",
|
|
"tags": ["lora", "model", "missing"],
|
|
"notes": "LoRA model file not found in loras directory"
|
|
},
|
|
{
|
|
"id": "lora_incompatible",
|
|
"regex": "LoRA.*incompatible|LoRA.*does not match|LoRA keys.*don't align",
|
|
"error_key": "LORA_INCOMPATIBLE",
|
|
"has_groups": false,
|
|
"priority": 85,
|
|
"category": "model_loading",
|
|
"tags": ["lora", "compatibility", "model"],
|
|
"notes": "LoRA incompatible with current base model architecture"
|
|
},
|
|
{
|
|
"id": "lora_corrupted",
|
|
"regex": "LoRA.*corrupted|LoRA.*invalid format|Error loading LoRA",
|
|
"error_key": "LORA_CORRUPTED",
|
|
"has_groups": false,
|
|
"priority": 80,
|
|
"category": "model_loading",
|
|
"tags": ["lora", "corrupted", "format"],
|
|
"notes": "LoRA file corrupted or has invalid format"
|
|
},
|
|
{
|
|
"id": "lora_strength_invalid",
|
|
"regex": "LoRA strength.*invalid|lora_strength.*out of range",
|
|
"error_key": "LORA_STRENGTH_INVALID",
|
|
"has_groups": false,
|
|
"priority": 60,
|
|
"category": "workflow",
|
|
"tags": ["lora", "parameter", "strength"],
|
|
"notes": "LoRA strength/weight value is invalid"
|
|
},
|
|
{
|
|
"id": "lora_oom",
|
|
"regex": "Out of memory.*LoRA|OOM.*loading LoRA|CUDA out of memory.*lora",
|
|
"error_key": "LORA_OOM",
|
|
"has_groups": false,
|
|
"priority": 90,
|
|
"category": "memory",
|
|
"tags": ["lora", "oom", "memory"],
|
|
"notes": "Out of memory when loading or applying LoRA"
|
|
},
|
|
{
|
|
"id": "lora_key_mismatch",
|
|
"regex": "LoRA key.*mismatch|LoRA.*unexpected keys|missing keys in LoRA",
|
|
"error_key": "LORA_KEY_MISMATCH",
|
|
"has_groups": false,
|
|
"priority": 75,
|
|
"category": "model_loading",
|
|
"tags": ["lora", "keys", "structure"],
|
|
"notes": "LoRA weight keys don't match model structure"
|
|
}
|
|
]
|
|
}
|