Files
rookiestar28 d589717f5a feat(stage3): add 35 community error patterns with i18n support
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
2026-01-03 04:56:10 +08:00

36 lines
1.2 KiB
JSON

{
"version": "1.0.0",
"patterns": [
{
"id": "facerestore_model_not_found",
"regex": "FaceRestore.*model not found|face_model.*not found|CodeFormer.*not found|GFPGAN.*not found",
"error_key": "FACERESTORE_MODEL_NOT_FOUND",
"has_groups": false,
"priority": 80,
"category": "model_loading",
"tags": ["facerestore", "model", "missing"],
"notes": "Face restoration model (CodeFormer/GFPGAN) not found"
},
{
"id": "facerestore_detection_failed",
"regex": "No faces detected|face detection.*failed|Could not detect.*face",
"error_key": "FACERESTORE_DETECTION_FAILED",
"has_groups": false,
"priority": 70,
"category": "workflow",
"tags": ["facerestore", "detection", "faces"],
"notes": "No faces detected in input image"
},
{
"id": "facerestore_oom",
"regex": "Out of memory.*face.*restore|OOM.*FaceRestore|CUDA out of memory.*face",
"error_key": "FACERESTORE_OOM",
"has_groups": false,
"priority": 90,
"category": "memory",
"tags": ["facerestore", "oom", "memory"],
"notes": "Out of memory during face restoration"
}
]
}