Commit Graph
3 Commits
Author SHA1 Message Date
slahiriandClaude Opus 4.5 ec05fb561f fix: detect and clean garbage LLM output
- Add remove_runaway_repetitions() to clean "dark, dark, dark..." patterns
- Add is_garbage_output() to detect LLM generation failures
- LLM mode now falls back to NLP output when garbage is detected
- Limits any word to max 3 repetitions in output

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 20:52:01 +05:30
slahiriandClaude Opus 4.5 d11328ff90 feat: add STRUCTURED prompt style with category-segregated output
- Add STRUCTURED style that outputs each category on separate lines
- Fix '3d' token stripping - only strip booru patterns (1girl, 2boys)
- Increase max_tokens_per_category to 50 (was 5)
- Increase validator limits to preserve more information
- Preserve newlines throughout validation pipeline
- Disable truncation and duplicate removal by default

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 19:05:47 +05:30
slahiriandClaude Opus 4.5 700607305b feat(compose): implement Phase 5 - Prompt Validation
Adds the validator module for quality analysis of assembled prompts:
- base.py: ValidatorConfig, ValidationResult, ValidationIssue classes
- rules.py: Conflict detection, duplicate finding, quality checks
- standard.py: StandardValidator with auto-correction

Validates:
- Length constraints (CLIP token limits)
- Duplicate words/phrases detection
- Conflicting terms (e.g., girl vs woman)
- Missing required categories
- Quality issues (punctuation, spacing)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:41:40 +05:30