| # CompI Phase 2.E: Style Reference/Example Image to AI Art - User Guide | |
| ## π¨ Transform Any Image into AI Art Guidance | |
| Phase 2.E allows you to use **any reference image** (from your device or the web) to guide the style, mood, and composition of your AI-generated art. Upload local files or paste URLs from Google Images, Pinterest, Instagram, or any other source! | |
| ## π Quick Start | |
| ### 1. **Launch the Application** | |
| ```bash | |
| streamlit run src/ui/compi_phase2e_streamlit_ui.py | |
| ``` | |
| ### 2. **Basic Workflow** | |
| 1. **Enter your text prompt** - Describe what you want to create | |
| 2. **Add reference image** - Upload file or paste web URL | |
| 3. **Review AI suggestions** - See automatic style analysis | |
| 4. **Adjust settings** - Control reference strength and parameters | |
| 5. **Generate art** - Create AI art guided by your reference | |
| 6. **Download results** - Save images with full metadata | |
| ## πΈ Reference Image Sources | |
| ### **Supported Input Methods** | |
| #### πΌοΈ **Local File Upload** | |
| - **Formats**: PNG, JPG, JPEG, BMP, TIFF, WebP | |
| - **Size Limit**: Up to 10MB per file | |
| - **Quality**: Higher resolution = better style analysis | |
| #### π **Web URL Input** | |
| - **Google Images**: Right-click β "Copy image address" | |
| - **Pinterest**: Click image β Copy URL from address bar | |
| - **Instagram**: Use image direct links | |
| - **Art Websites**: DeviantArt, ArtStation, Behance | |
| - **Any Website**: Direct image URLs (.jpg, .png, etc.) | |
| ### **URL Examples** | |
| ``` | |
| β Good URLs: | |
| https://example.com/artwork.jpg | |
| https://pinterest.com/pin/123456789/ | |
| https://images.unsplash.com/photo-123/image.jpg | |
| β Avoid: | |
| https://website.com/gallery-page (not direct image) | |
| https://social-media.com/post/123 (post page, not image) | |
| ``` | |
| ## ποΈ Interface Guide | |
| ### **Main Controls** | |
| #### **Text Input Section** | |
| - **Main Prompt**: Primary description of what you want to generate | |
| - **Style Keywords**: Additional artistic style descriptors | |
| - **Mood/Atmosphere**: Emotional tone and feeling | |
| #### **Reference Image Section** | |
| - **Upload Tab**: Drag & drop or browse for local files | |
| - **URL Tab**: Paste any web image URL | |
| - **Analysis Display**: Real-time style analysis and suggestions | |
| #### **Generation Settings** | |
| - **Reference Strength**: How closely to follow the reference (0.1-0.9) | |
| - **Number of Images**: Generate 1-4 variations | |
| - **Quality Settings**: Inference steps and guidance scale | |
| - **Seed Control**: Random or fixed for reproducibility | |
| ### **AI Style Analysis** | |
| When you load a reference image, the AI automatically analyzes: | |
| - **Visual Properties**: Brightness, contrast, color distribution | |
| - **Style Characteristics**: Artistic technique, complexity, mood | |
| - **Suggested Keywords**: Automatically generated style descriptors | |
| - **Enhancement Options**: One-click addition to your prompt | |
| ## βοΈ Settings Guide | |
| ### **Reference Strength Control** | |
| The reference strength determines how closely your generated art follows the reference image: | |
| | Strength | Effect | Best For | | |
| |----------|--------|----------| | |
| | **0.1-0.3** | Loose inspiration, high creativity | Abstract concepts, creative freedom | | |
| | **0.4-0.6** | Balanced style transfer | Most use cases, artistic guidance | | |
| | **0.7-0.9** | Close adherence to reference | Style mimicking, specific looks | | |
| ### **Quality vs Speed Settings** | |
| | Setting | Fast (10-15 steps) | Balanced (20-30 steps) | High Quality (40-50 steps) | | |
| |---------|-------------------|------------------------|---------------------------| | |
| | **Time** | 30-60 seconds | 1-2 minutes | 3-5 minutes | | |
| | **Quality** | Good for testing | Recommended | Best results | | |
| | **Use Case** | Quick iterations | Final generation | Professional work | | |
| ### **Guidance Scale** | |
| | Scale | Effect | Best For | | |
| |-------|--------|----------| | |
| | **5-10** | More creative, loose interpretation | Artistic freedom, abstract art | | |
| | **10-15** | Balanced prompt following | Most use cases | | |
| | **15-20** | Strict prompt adherence | Precise requirements | | |
| ## π¨ Creative Techniques | |
| ### **Effective Reference Selection** | |
| #### β **Good References** | |
| - **Clear artistic style** (paintings, digital art, photography styles) | |
| - **Strong visual identity** (distinctive colors, techniques, moods) | |
| - **Good composition** (well-balanced, not cluttered) | |
| - **High contrast** (clear light/dark areas) | |
| #### β **Challenging References** | |
| - **Cluttered images** with too many elements | |
| - **Low contrast** or very dark/bright images | |
| - **Screenshots** or UI elements | |
| - **Text-heavy** images | |
| ### **Prompt Enhancement Tips** | |
| #### **Combine Multiple Styles** | |
| ``` | |
| Base: "A serene mountain landscape" | |
| + Style: "oil painting, impressionist" | |
| + Mood: "golden hour, peaceful" | |
| + AI Suggestions: "soft brushstrokes, warm colors" | |
| = Enhanced: "A serene mountain landscape, oil painting, impressionist, golden hour, peaceful, soft brushstrokes, warm colors" | |
| ``` | |
| #### **Layer Your Descriptions** | |
| 1. **Subject**: What you want to see | |
| 2. **Style**: Artistic technique or medium | |
| 3. **Mood**: Emotional atmosphere | |
| 4. **Details**: Specific elements or effects | |
| ### **Reference Strength Strategies** | |
| #### **Creative Exploration** (Low Strength: 0.2-0.4) | |
| - Use reference for general mood/color inspiration | |
| - Allow AI maximum creative freedom | |
| - Good for abstract or conceptual art | |
| #### **Style Transfer** (Medium Strength: 0.5-0.7) | |
| - Balance between reference and creativity | |
| - Maintain reference style while changing content | |
| - Most versatile approach | |
| #### **Style Mimicking** (High Strength: 0.7-0.9) | |
| - Close adherence to reference technique | |
| - Minimal creative deviation | |
| - Good for specific artistic styles | |
| ## π Output Management | |
| ### **File Naming Convention** | |
| Generated files follow a comprehensive naming pattern: | |
| ``` | |
| {prompt}_{style}_{mood}_{timestamp}_seed{number}_{REFIMG|NOREFIMG}_v{variation}.png | |
| ``` | |
| **Example:** | |
| ``` | |
| magical_forest_fantasy_mystical_20250701_143022_seed12345_REFIMG_v1.png | |
| ``` | |
| ### **Metadata Files** | |
| Each image includes a JSON metadata file with: | |
| - Complete generation parameters | |
| - Reference image information | |
| - AI style analysis results | |
| - Reproducibility data | |
| ### **Organization Tips** | |
| - **Create project folders** for different art series | |
| - **Use consistent naming** for easy searching | |
| - **Save metadata** for reproducing successful results | |
| - **Export favorites** to separate collections | |
| ## π§ Troubleshooting | |
| ### **Common Issues** | |
| #### **"Failed to load image from URL"** | |
| - β Check URL is a direct image link | |
| - β Try right-clicking image β "Copy image address" | |
| - β Ensure URL ends with .jpg, .png, etc. | |
| - β Test URL in browser first | |
| #### **"Generation taking too long"** | |
| - β Reduce inference steps (try 15-20) | |
| - β Lower image count (try 1-2 images) | |
| - β Check GPU memory availability | |
| - β Restart application if needed | |
| #### **"Poor quality results"** | |
| - β Increase inference steps (try 30-40) | |
| - β Adjust reference strength | |
| - β Improve prompt specificity | |
| - β Try different reference images | |
| #### **"Out of memory errors"** | |
| - β Enable memory optimizations in settings | |
| - β Reduce batch size to 1 image | |
| - β Close other applications | |
| - β Use CPU mode if necessary | |
| ### **Performance Optimization** | |
| #### **For Better Speed** | |
| - Use GPU if available | |
| - Enable memory optimizations | |
| - Start with lower inference steps | |
| - Generate fewer images per batch | |
| #### **For Better Quality** | |
| - Use high-resolution reference images | |
| - Increase inference steps (30-50) | |
| - Fine-tune reference strength | |
| - Use descriptive, specific prompts | |
| ## π― Best Practices | |
| ### **Reference Image Selection** | |
| 1. **Choose clear, high-quality images** | |
| 2. **Match the style you want to achieve** | |
| 3. **Consider color palette and mood** | |
| 4. **Test different reference strengths** | |
| ### **Prompt Writing** | |
| 1. **Be specific about desired elements** | |
| 2. **Use artistic terminology** | |
| 3. **Describe lighting and atmosphere** | |
| 4. **Combine multiple style keywords** | |
| ### **Iterative Improvement** | |
| 1. **Start with medium reference strength** | |
| 2. **Generate multiple variations** | |
| 3. **Adjust settings based on results** | |
| 4. **Save successful parameter combinations** | |
| ### **Workflow Efficiency** | |
| 1. **Prepare reference images in advance** | |
| 2. **Use consistent naming conventions** | |
| 3. **Save metadata for reproducibility** | |
| 4. **Organize outputs by project/style** | |
| ## π Advanced Tips | |
| ### **Multi-Style Blending** | |
| - Use reference for base style | |
| - Add contrasting style keywords | |
| - Experiment with different strengths | |
| ### **Series Creation** | |
| - Use same reference with different prompts | |
| - Maintain consistent style across images | |
| - Vary only specific elements | |
| ### **Style Evolution** | |
| - Start with high reference strength | |
| - Gradually reduce for more creativity | |
| - Create progression series | |
| This guide provides everything you need to master CompI Phase 2.E and create stunning AI art guided by any reference image! | |