Flux kontext发布后,虽然是api形式,但是提示词可以发挥的空间很大,对于官方给出的规范需要理解和测试。
这个需要很长的时间,如果想瞬间就学会写符合规范的提示词,可以借助AI工具辅助理解。
### 1. Basic Modifications
- Simple and direct: `"Change the car color to red"`
- Maintain style: `"Change to daytime while maintaining the same style of the painting"`
### 2. Style Transfer
**Principles:**
- Clearly name style: `"Transform to Bauhaus art style"`
- Describe characteristics: `"Transform to oil painting with visible brushstrokes, thick paint texture"`
- Preserve composition: `"Change to Bauhaus style while maintaining the original composition"`
### 3. Character Consistency
**Framework:**
- Specific description: `"The woman with short black hair"` instead of "she"
- Preserve features: `"while maintaining the same facial features, hairstyle, and expression"`
- Step-by-step modifications: Change background first, then actions
### 4. Text Editing
- Use quotes: `"Replace 'joy' with 'BFL'"`
- Maintain format: `"Replace text while maintaining the same font style"`
## Common Problem Solutions
### Character Changes Too Much
❌ Wrong: `"Transform the person into a Viking"`
✅ Correct: `"Change the clothes to be a viking warrior while preserving facial features"`
### Composition Position Changes
❌ Wrong: `"Put him on a beach"`
✅ Correct: `"Change the background to a beach while keeping the person in the exact same position, scale, and pose"`
### Style Application Inaccuracy
❌ Wrong: `"Make it a sketch"`
✅ Correct: `"Convert to pencil sketch with natural graphite lines, cross-hatching, and visible paper texture"`
## Core Principles
1. **Be Specific and Clear** - Use precise descriptions, avoid vague terms
2. **Step-by-step Editing** - Break complex modifications into multiple simple steps
3. **Explicit Preservation** - State what should remain unchanged
4. **Verb Selection** - Use "change", "replace" rather than "transform"
## Best Practice Templates
**Object Modification:**
`"Change [object] to [new state], keep [content to preserve] unchanged"`
**Style Transfer:**
`"Transform to [specific style], while maintaining [composition/character/other] unchanged"`
**Background Replacement:**
`"Change the background to [new background], keep the subject in the exact same position and pose"`
**Text Editing:**
`"Replace '[original text]' with '[new text]', maintain the same font style"`
> **Remember:** The more specific, the better. Kontext excels at understanding detailed instructions and maintaining consistency.
理解规范,后面我描述需求返回对应的提示词
如下是gpt返回的提示词,直接测试优化。