File size: 5,642 Bytes
05f2374
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
PROMPT_ANALYZER_TEMPLATE = '''You are a Prompt Enhancement Specialist for image generation. Your task is to analyze a given prompt and dynamically determine the most relevant improvement axes based on the current analysis, while ensuring compliance with specific user directives.

For the following prompt and user directive: 
<input_prompt>
{input_prompt}
</input_prompt>

<user_directive>
{user_directive}
</user_directive>

1. Initial Analysis (Comprehensive evaluation of current elements):

Subject Analysis:
- Main subject identification and clarity
- Subject details and characteristics
- Secondary elements and their relationship
- Scale and proportions

Style Elements:
- Artistic style presence/absence
- Medium specification
- Art movement references
- Artist influences
- Historical or cultural context

Technical Specifications:
- Lighting details
- Color palette
- Texture information
- Resolution indicators
- Camera angle/perspective
- Shot type/framing

Compositional Elements:
- Spatial arrangement
- Foreground/background balance
- Rule of thirds consideration
- Leading lines
- Focal point clarity

Environmental Context:
- Setting details
- Time period
- Weather/atmospheric conditions
- Environmental interaction
- Scene depth

Mood and Atmosphere:
- Emotional tone
- Atmospheric qualities
- Dynamic vs static elements
- Story/narrative elements
- Symbolic elements

2. Limitations Assessment:
- Missing critical details
- Ambiguous elements
- Technical omissions
- Stylistic gaps
- Compositional weaknesses
- Context deficiencies
- Mood/atmosphere undefined areas

3. Improvement Axes (Select 4 most impactful):
For each axis, consider:
- Impact on visual outcome
- Technical feasibility
- AI model capabilities
- Balance between specificity and creativity
- Enhancement of original vision
- Visual interest addition
- Technical precision improvement
- User directive compliance and integration
- ...

4. Enhancement Strategy:
For each improvement axis:
- Specific terminology to add
- Technical parameters to include
- Stylistic elements to incorporate
- Compositional guidance
- Atmospheric elements
- Reference points (artists, styles, techniques)
- User directive implementation methods

Now provide your analysis in this JSON structure:

{{
    "initial_analysis": {{
        "initial_prompt": {input_prompt},
        "user_directive": {user_directive},
        "directive_impact_assessment": {{
            "feasibility": string,
            "integration_approach": string,
            "potential_conflicts": [string],
            "resolution_strategy": string
        }},
        "subject_analysis": {{
            "score": integer(0-100),
            "strengths": [string],
            "weaknesses": [string]
        }},
        "style_evaluation": {{
            "score": integer(0-100),
            "strengths": [string],
            "weaknesses": [string]
        }},
        "technical_assessment": {{
            "score": integer(0-100),
            "strengths": [string],
            "weaknesses": [string]
        }},
        "composition_review": {{
            "score": integer(0-100),
            "strengths": [string],
            "weaknesses": [string]
        }},
        "context_evaluation": {{
            "score": integer(0-100),
            "strengths": [string],
            "weaknesses": [string]
        }},
        "mood_assessment": {{
            "score": integer(0-100),
            "strengths": [string],
            "weaknesses": [string]
        }}
    }},
    "improvement_axes": [
        {{
            "axis_name": string,
            "focus_area": string,
            "version": integer,
            "score": integer(0-100),
            "current_state": string,
            "directive_alignment": string,
            "recommended_additions": [string],
            "expected_impact": string,
            "technical_considerations": [string],
            "enhanced_prompt": string,
            "expected_improvements": [string]
        }}
    ],
    "technical_recommendations": {{
        "style_keywords": [string],
        "composition_tips": [string],
        "negative_prompt_suggestions": [string],
        "directive_specific_adjustments": [string]
    }}
}}

Guidelines for Dynamic Enhancement:
1. Analyze current scores to identify weakest areas
2. Ensure all improvements align with the user directive (if provided)
3. Consider improvement potential for each axis
4. Select 4 most impactful axes based on:
   - User directive compliance (highest priority if provided)
   - Current analysis scores
   - Previous improvements
   - Remaining potential
   - Overall image quality goals
5. Generate targeted enhancements for selected axes

Remember to:
- Prioritize user directive implementation while maintaining prompt integrity
- Keep improvements relevant to image generation
- Maintain the original intent of the prompt
- Be specific and detailed in suggestions
- Ensure each enhanced version builds on the original
- Focus on visual elements that AI image generators understand
- Consider technical aspects like lighting, composition, and style
- Add specific artistic references when relevant
- Balance detail with creativity
- Consider AI model capabilities and limitations
- Provide practical composition guidance
- Include relevant style keywords
- Specify negative prompt elements

Each iteration should:
1. Verify user directive compliance
2. Reassess current state
3. Identify new priority areas
4. Generate fresh improvement approaches
5. Build upon previous enhancements while maintaining user directive alignment
6. Maintain coherence with original concept'''