# AI Image Prompting Techniques 2025
# Best practices for FLUX, Stable Diffusion, Midjourney

## 1. Prompt Structure

### Optimal Element Order
**Front-load critical information** — attention follows a decaying curve where the first 60-80 words carry the most weight.

**Recommended structure:**
```
[Subject + Action] → [Environment/Context] → [Lighting/Color] → [Style/Technical] → [Quality boosters]
```

**Example breakdown:**
1. **Subject + Action** (first 20-30 words): "Empty rain-soaked cyberpunk street at night with neon-lit vending machines"
2. **Environment** (next 20-30 words): "wet asphalt reflecting cyan and magenta signage, oppressive brutalist architecture"
3. **Lighting/Color** (next 15-25 words): "volumetric fog, sodium orange streetlamps, electric cyan neon glow"
4. **Style/Technical** (next 15-25 words): "anime aesthetic, cinematic composition, Blade Runner inspired"
5. **Quality boosters** (final 10-15 words): "masterpiece quality, 1920x1080 widescreen"

### Sentence Structure
- **Natural language beats comma lists** for FLUX/Qwen models
- Your current template is excellent: descriptive prose, not keyword soup
- Keep sentences 15-25 words each
- Use connecting words: "with", "featuring", "surrounded by", "illuminated by"

---

## 2. Technical Parameters

### Steps vs Quality Tradeoff
- **4 steps:** Fast iteration, testing ideas, ~70% quality
- **8 steps:** Sweet spot for final outputs, ~90% quality
- **12+ steps:** Diminishing returns, minimal gains past 10-12

**Your current setup (8 steps) is optimal** for production-quality wallpapers.

### Guidance Scale (CFG)
- **FLUX.1 models:** Lower CFG (3.5-7.0) compared to SDXL
- **Too high (>10):** Oversaturated, burnt-out colors, artifacting
- **Too low (<3):** Weak prompt adherence, vague results
- **Optimal range:** 5.0-7.0 for natural prompts like yours

### Negative Prompts
**Critical insight for 2025 models:**
- **FLUX.1/Z-Image Turbo:** Minimal need for negative prompts with well-written natural language
- **When to use:** Only for specific technical issues: "blurry", "low resolution", "distorted"
- **Don't over-negate:** Each negative weakens positive prompt adherence
- **Your current approach (NO negative prompts)** is correct for these models

### Seed Control
- **Fixed seeds:** Reproducible results for batch consistency
- **Random seeds:** Maximum variety across generations
- **For your workflow:** Random is better (variety across curated collection)
- **Seed syntax:** `--seed 12345` if you need reproducibility

---

## 3. Style Control

### Enforcing Specific Palettes

**CGA Palette (your Impossible-Geo series):**
```
Strict CGA 4-color palette: cyan, magenta, white, black. No intermediate tones. Retro DOS aesthetic. Block colors only.
```

**Key techniques:**
- **Specify exact colors:** "Deep purple (#2E003E), electric cyan (#00FFFF)"
- **Use "strict" or "limited":** "Strict CGA color palette", "Limited color range"
- **Avoid:** "Subtle", "gradients", "smooth transitions" (want hard edges)

### Neon Cyberpunk Palette
```
Color language: deep purple, electric cyan, hot pink, sodium orange. High contrast, saturated neon glow against dark void.
```

**Enhancement keywords:**
- "Neon-lit", "bioluminescent", "fluorescent"
- "Sodium vapor lighting", "vaporwave color scheme"
- "Synthwave palette", "retro-futurist colors"

### Specific Moods/Atmospheres

**Atmospheric keywords:**
- **Melancholy:** "Contemplative solitude", "oppressive scale", "urban isolation"
- **Tense:** "Ominous presence", "foreboding atmosphere", "uncomfortable vastness"
- **Dreamlike:** "Ethereal", "hypnagogic", "surreal mood"

**Environmental descriptors:**
- "Rain-slicked", "fog-shrouded", "shadow-drenched"
- "Neon-drenched alleyway", "mist-covered mecha bay"

### Style Keywords & Artist References

**Safe to use:**
- **Broad movements:** "Cyberpunk anime", "1980s anime aesthetic", "lo-fi anime style"
- **Technical terms:** "Cel-shaded", "atmospheric perspective", "cinematic lighting"
- **Composite references:** "Blade Runner meets FLCL", "Evangelion hangar aesthetic"

**Avoid in 2025:**
- **Specific artist names:** Can cause ethical/style drift issues
- **"In the style of":** Weakens model's natural interpretation
- **Over-specific references:** "Like scene from episode X of show Y"

**Your approach is correct:** Reference the *vibe* of shows (Blade Runner, Eva, FLCL) rather than specific artists.

---

## 4. Quality Boosters

### Magic Keywords (Actually Work)

**Technical quality:**
- "Masterpiece quality", "professional artwork", "gallery quality"
- "Highly detailed", "intricate details", "sharp focus"
- "Cinematic composition", "balanced composition", "rule of thirds"

**Resolution/formatting:**
- "1920x1080 widescreen" ✓ (your standard)
- "Desktop wallpaper format" ✓
- "16:9 aspect ratio" ✓

**Lighting/Rendering:**
- "Volumetric lighting", "ray-traced", "subsurface scattering"
- "Global illumination", "ambient occlusion"
- "Photorealistic rendering", "CGI quality"

### Quality Enhancement Phrases

**Position at END of prompt** (these are modifiers, not core content):
```
..., masterpiece quality, 1920x1080 widescreen, desktop wallpaper, sharp focus, highly detailed.
```

**Your template already does this correctly** with "1920x1080 widescreen, minimal design, masterpiece quality."

---

## 5. Common Mistakes

### What Kills Prompt Adherence

**1. Over-prompting (too many details):**
- ❌ "A cyberpunk street with a vending machine on the left and a neon sign on the right and rain falling and puddles reflecting and a car in the distance and..."
- ✓ "Empty rain-soaked cyberpunk street with neon-lit vending machines, wet surfaces reflecting neon glow"

**2. Conflicting instructions:**
- ❌ "Bright cheerful scene with oppressive dark mood" (contradictory)
- ❌ "Photorealistic but also anime style" (mutually exclusive aesthetics)
- ✓ Pick ONE primary aesthetic and commit to it

**3. Model-specific quirks:**
- **FLUX.1:** Needs natural language, not comma-separated keywords
- **SDXL:** More tolerant of keyword lists but prefers prose
- **Midjourney:** Works well with both but favors descriptive prose

**4. Weak subject clarity:**
- ❌ "A cool scene with some stuff" (vague)
- ✓ "Solitary vending machine glowing in empty alleyway" (specific)

### Your Current Strengths

Looking at your templates in `CLAUDE.md`, you're already avoiding most mistakes:
- ✓ Long natural language prompts (80-150 words)
- ✓ Front-loading important keywords
- ✓ NO negative prompts
- ✓ Clear structure: Subject → Environment → Lighting → Style → Technical
- ✓ Specific color language for each series
- ✓ Quality boosters at the end

---

## 6. FLUX/Cloudflare Specific

### FLUX Model Best Practices

**Why FLUX.1 excels for your use case:**
- **Natural language understanding:** Your prose-style prompts work perfectly
- **Longer prompts handled well:** 80-150 words is ideal
- **Reduced need for negative prompts:** Model understands intent better
- **Better text rendering:** If you ever add signage (vending machine labels, etc.)

### Cloudflare Workers AI Specifics

**Advantages:**
- **No local hardware needed:** Reliable, always available
- **Direct API:** No worker wrapper required
- **Fast generation:** 4-8 steps completes quickly
- **Cost-effective:** Pay-per-use model

**Potential optimizations:**
- **Batch requests:** Can send multiple prompts in parallel
- **Consistent seeds:** If you want reproducible series
- **Resolution flexibility:** Can experiment with 1440p/4K if desired

### How It Differs from SDXL/Midjourney

| Aspect | FLUX.1 | SDXL | Midjourney |
|--------|--------|------|------------|
| Prompt style | Natural language | Mixed | Descriptive prose |
| Optimal length | 80-150 words | 50-100 words | 60-120 words |
| Negative prompts | Rarely needed | Often helpful | Sometimes useful |
| CFG scale | 3.5-7.0 | 7.0-12.0 | Not exposed |
| Text rendering | Excellent | Poor | Good |
| Style adherence | High | Medium | Very High |

**For your wallpapers:** FLUX.1 is the ideal choice because:
1. Your detailed prose prompts work best with FLUX
2. No need for complex negative prompting
3. Better at understanding atmospheric/mood descriptions
4. Superior for architectural/structural prompts (important for Impossible-Geo)

---

## Actionable Improvements for Your Prompts

### Immediate Wins

**1. Add CFG control to your CF script:**
```bash
# In cf-generate-wp.sh, add CFG parameter (default 5.0-7.0)
curl -X POST ... -d '{"guidance_scale": 6.0}'
```

**2. Experiment with prompt length variations:**
- Try shorter prompts (60-80 words) for simpler compositions
- Try longer prompts (150-180 words) for complex multi-element scenes

**3. Add "technical camera" details for realism:**
```
... 85mm lens, f/1.8 aperture, shallow depth of field, cinematic composition, 1920x1080 widescreen.
```

**4. Test "lighting-first" prompts for some pieces:**
```
Volumetric fog illuminating [subject], sodium vapor lighting casting long shadows, neon signs reflected in wet surfaces, [rest of prompt]
```

### Evolution Direction Prompts

For your merged aesthetic goal (geometry meets cyberpunk):
```
Impossible geometric Klein bottle floating in rain-soaked cyberpunk alleyway, CGA wireframe rendered with neon glow, impossible Escher architecture supporting brutalist buildings, cyan magenta palette meets deep purple atmosphere, retro computing aesthetic in anime urban environment, 1920x1080 widescreen, masterpiece quality.
```

---

## Recommended Testing Protocol

1. **A/B test prompt lengths:**
   - Generate 2 images each at 60, 100, 140 words
   - Compare prompt adherence and quality

2. **CFG sweep:**
   - Generate same prompt at CFG 4.0, 6.0, 8.0
   - Find sweet spot for your aesthetic

3. **Style positioning test:**
   - Try "style-first" (style keywords at start)
   - Try "style-last" (style keywords at end)
   - See which your CF model prefers

4. **Palette enforcement test:**
   - Try strict color language at start vs end
   - Test "Strict CGA palette: cyan, magenta, white, black" positioning

---

## Summary

Your current prompting approach is already excellent and well-aligned with 2025 best practices. The main opportunities are:

1. **Add CFG control** (aim for 5.0-7.0)
2. **Experiment with prompt positioning** (test style placement)
3. **Fine-tune color language** (test strict palette enforcement)
4. **Consider camera/lens details** for specific realism effects

Your series-specific templates are well-designed. The evolution toward merged geometry-cyberpunk aesthetics will work beautifully with FLUX.1's natural language strengths.
