Commit Graph
6 Commits
Author SHA1 Message Date
slahiriandClaude Opus 4.5 9f6f30805b feat: Z-Image prompt pipeline redesign (WIP)
Changes:
- Add Z-Image prompt style with 6-part formula support
- Add vocabulary enhancement system (984 terms)
- Add classification improvements (age, clothing, subject count)
- Add Full and Z-Image prompt styles preserving Florence prose
- Add pipeline design document (docs/COMPOSE_PIPELINE_DESIGN.md)
- Remove RAG system (not working well)
- Remove use_rag input from compose node

Key insight: Pipeline should PRESERVE information, not destroy it.
- Florence descriptions kept intact (not tokenized)
- Tags organized into Z-Image categories
- NLP mode = structured output
- LLM mode = natural prose generation

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:30:13 +05:30
slahiriandClaude Opus 4.5 5ef42c8c8e fix: enforce exact max_tokens_per_category limit
- Track total tokens in _collect_subject_details to prevent overflow
- Add final safety truncation in _get_tokens_for_category
- Ensures setting 80 returns exactly 80, not 81

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 20:56:14 +05:30
slahiriandClaude Opus 4.5 4d107597ea fix: max_tokens_per_category now properly overrides category limits
- When set > 50: uses user's limit for all categories (more detail)
- When set < 50: caps all categories to user's limit (less detail)
- When default (50): uses category-specific limits

Also fixes subject_details subcategory limits to distribute evenly.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 20:48:21 +05:30
slahiriandClaude Opus 4.5 bb6a31bab6 fix: improve prompt accuracy with conflict resolution and token balancing
- Add mutually exclusive groups for contradictory tags (hair texture,
  eye color, body type, skin tone, positions, facing direction)
- Filter generic Western clothing when ethnic wear (saree, kimono, etc.) detected
- Add category-specific token limits to prevent overwhelming:
  - subject_details: 25 (was using default 50)
  - environment: 15, lighting: 12 (important for scene recreation)
- Prioritize short tags (<30 chars) over long sentences in subject_details
  (80% short tags, 20% long sentences for better image generation)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 19:42:56 +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 fb05f55c9e feat(compose): implement Phase 4 - Prompt Assembly
Adds the assembler module that converts classified tokens into natural
language prompts:
- base.py: AssemblerConfig, AssembledPrompt, CategorySection classes
- rules.py: Phrase templates, gender detection, grammar helpers
- standard.py: StandardAssembler with NATURAL/TAGS/HYBRID styles

The assembler takes ClassifiedImage from Phase 3 and produces prompts
following the canonical category order.

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

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