Files
oliverswitzer-ComfyUI-Lora-…/tests
Oliver Switzer 5db1910e02 feat: add comprehensive PRD for LoRA Prompt Composer node
- Define technical architecture using sentence-transformers embeddings
- Specify content support for creative content creation
- Detail LoRA discovery and prompt composition features
- Include weight optimization and style mimicry requirements

Update .cursorrules

feat: extend LoRA metadata utils with discovery and analysis functions

- Add discover_all_loras() for scanning LoRA directory
- Add extract_embeddable_content() for creating searchable text
- Add extract_example_prompts() for style analysis
- Add classify_lora_type() to differentiate image vs video LoRAs
- Add extract_recommended_weight() with pattern matching
- Comprehensive test coverage for all new functions
- Maintains backward compatibility with existing nodes

feat: implement LoRA Prompt Composer node with semantic search

- Create PromptComposerNode with natural language scene description input
- Implement intelligent LoRA discovery using sentence-transformers embeddings
- Support separate limits for image and video LoRAs
- Add automatic weight optimization based on metadata analysis
- Include trigger word integration and style mimicry from examples
- Register node in ComfyUI with proper display name mapping
- Comprehensive test coverage with mocked dependencies
- Full content support without filtering
- Follows ComfyUI architectural patterns and code standards

docs: add development status summary for LoRA Prompt Composer

- Document completed implementation with all features
- Include technical specifications and usage instructions
- Highlight performance characteristics and architecture
- Confirm readiness for deployment and testing

feat: add required dependencies for LoRA Prompt Composer

- Add sentence-transformers>=2.2.0 for embeddings model
- Add scikit-learn>=1.0.0 for cosine similarity calculations
- Update test expectations to match actual requests module usage
- All 79 tests passing with new dependencies installed

Add cursorrule for using SOLID principles

debug: add detailed logging to LoRA classification and relevance scoring

- Add classification logs to see which LoRAs are found and how they're categorized
- Add relevance scoring logs to debug similarity thresholds
- Add summary logs to understand filtering results
- Fix base_model matching for 'SD 1.5' format in metadata

fix: lower default relevance threshold from 0.7 to 0.3

- 0.7 threshold was too high for semantic similarity scores
- Even highly relevant LoRAs typically score 0.3-0.5 with sentence transformers
- Remove debug logging now that issue is identified and fixed
- Based on testing: pose LoRAs scored appropriate similarity ranges

fix: add defensive programming for None trigger_words and metadata

- Handle case where trigger_words might be None instead of empty list
- Add proper None checking for metadata in extract_example_prompts
- Prevent 'argument of type NoneType is not iterable' runtime error
- Add error logging for invalid trigger_words data

fix: handle None meta field in LoRA image metadata

- Fix 'argument of type NoneType is not iterable' error in extract_example_prompts
- Add explicit None check for image['meta'] before accessing prompt field
- Some LoRAs have images with meta: None (e.g., video LoRAs)
- Add comprehensive debug logging to identify exact error location

feat: prioritize LoRA title/filename words in semantic matching

- Extract meaningful words from file_name and repeat 3x for higher weight
- Extract and include words from model_name for additional context
- Filter out common technical terms (lora, wan, lownoise, i2v, etc.)
- This should improve position-specific matching for pose LoRAs
- Example: pose terms now appear 4x in relevant LoRA embeddings

debug: add comprehensive logging for embedding generation and similarity scoring

- Log file name extraction and word filtering process
- Show which words get 3x priority boost from title
- Display final embeddable content and word counts
- Log base similarity scores and content boost applications
- This will help debug why pose LoRAs aren't ranking higher

fix: expand content boost criteria for pose-specific LoRAs

- Add 'pose', 'position', 'style', 'concept' and related terms to content_tags
- This ensures pose LoRAs get content boost like other specialized LoRAs
- Pose LoRAs now correctly get prioritized for relevant queries
- Refactor long lines for pylint compliance

refactor: remove verbose debug logging in prompt composition

- Remove 'Processing image/video LoRA X: {full_dict}' logs that dumped entire metadata
- Remove individual trigger word processing logs that created noise
- Keep high-level progress logs for debugging
- Significantly reduces log noise during prompt composition

feat: add keyword-specific boosting for position matching

- Implement _get_keyword_boost() method for exact position/concept matches
- 30% boost when LoRA name matches position keywords
- 20% boost when LoRA tags match position keywords
- Increase default content_boost from 1.0 to 1.2 (20% base boost)
- Now pose queries should prioritize relevant LoRAs over generic ones
- Supports various pose and style keyword matching

debug: add detailed logging for keyword boost debugging

- Add step-by-step logs to understand why keyword boost isn't applying
- Show scene text, LoRA name, and position matching checks
- This will help identify why pose LoRAs aren't getting keyword boost

enhance: improve keyword boost scoring and add comprehensive logging

- Increase title match boost to 1.5x (50% boost)
- Increase tag match boost to 1.3x (30% boost)
- Add detailed logging for debugging keyword boost application
- Show step-by-step position matching for LoRA names, tags, and civitai tags

fix: prevent stacking multiple keyword boosts for same position

- Replace multiple boost stacking with single best boost selection
- Title matches get highest priority (1.5x) over tag matches (1.3x)
- Prevents style LoRAs from getting excessive boost stacking
- Now specific LoRAs should correctly rank for targeted queries
- Add detailed logging to show which boost source is selected

fix: prevent duplicate LoRA tags by cleaning scene description

- Strip existing <lora:> and <wanlora:> tags from scene description before processing
- Apply cleaning at 3 key points: embedding generation, keyword boost, and final prompt
- Prevents duplicate LoRAs like '<lora:StyleLora:0.8> + <lora:StyleLora:1>'
- Users can now input prompts with existing LoRA tags without duplication
- Add detailed logging to show original vs cleaned scene descriptions

refactor: remove noisy debug logs from LoRA visualizer

- Remove 'DEBUG: Sending LoRA data to frontend' log that dumps entire data structure
- Remove 'DEBUG: Parsed X standard LoRAs' logs with full LoRA lists
- Keep essential error logging but reduce console noise during normal operation
- Improves log readability for users
2025-08-11 13:18:53 -04:00
..
2025-08-06 16:20:43 -04:00