File size: 8,790 Bytes
338d95d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# 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!
|