Malaji71 commited on
Commit
7a0ecee
·
verified ·
1 Parent(s): ffcc74e

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +76 -21
config.py CHANGED
@@ -124,28 +124,69 @@ FLUX_RULES = {
124
  ],
125
 
126
  "camera_configs": {
127
- "portrait": ", Shot on Hasselblad X2D 100C, 90mm f/2.5 lens at f/2.8, professional portrait photography",
128
- "landscape": ", Shot on Phase One XT, 40mm f/4 lens at f/8, epic landscape photography",
129
- "street": ", Shot on Leica M11, 35mm f/1.4 lens at f/2.8, documentary street photography",
130
- "cinematic": ", Shot on ARRI Alexa LF, 35mm anamorphic lens, cinematic lighting",
131
- "architectural": ", Shot on Canon EOS R5, 24-70mm f/2.8 lens at f/8, architectural photography",
132
- "default": ", Shot on Phase One XF IQ4, 80mm f/2.8 lens at f/4, professional photography"
 
133
  },
134
 
135
  "lighting_enhancements": {
136
- "dramatic": ", dramatic cinematic lighting",
137
- "portrait": ", professional studio lighting with subtle rim light",
138
- "cinematic": ", moody cinematic lighting with practical lights",
139
- "natural": ", natural lighting with soft shadows",
140
- "default": ", masterful natural lighting"
141
  },
142
 
143
  "style_enhancements": {
144
- "photorealistic": ", photorealistic, ultra-detailed",
145
- "cinematic": ", cinematic composition, film grain",
146
- "commercial": ", commercial photography style",
147
- "editorial": ", editorial photography style",
148
- "fine_art": ", fine art photography"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  }
150
  }
151
 
@@ -172,11 +213,13 @@ SCORING_CONFIG = {
172
  "professional_criteria": {
173
  "camera_equipment": ["Canon", "Sony", "Leica", "Hasselblad", "Phase One", "ARRI"],
174
  "lens_specifications": ["f/", "mm", "anamorphic", "telephoto", "wide-angle"],
175
- "lighting_techniques": ["cinematic", "dramatic", "natural", "studio", "rim light"],
176
- "composition_rules": ["rule of thirds", "leading lines", "depth of field", "bokeh"],
177
- "technical_settings": ["aperture", "ISO", "shutter speed", "exposure"]
 
178
  }
179
  }
 
180
 
181
  # Environment Configuration
182
  ENVIRONMENT = {
@@ -249,6 +292,7 @@ PROFESSIONAL_PHOTOGRAPHY_CONFIG = {
249
  "knowledge_base_integration": True,
250
  "technical_enhancement": True,
251
  "composition_guidance": True,
 
252
 
253
  "scene_detection_keywords": {
254
  "portrait": ["person", "face", "portrait", "headshot", "model"],
@@ -264,8 +308,19 @@ PROFESSIONAL_PHOTOGRAPHY_CONFIG = {
264
  "professional_terminology",
265
  "equipment_specifications",
266
  "lighting_description",
267
- "composition_analysis"
268
- ]
 
 
 
 
 
 
 
 
 
 
 
269
  }
270
 
271
  # Flash Attention Installation Command
 
124
  ],
125
 
126
  "camera_configs": {
127
+ "portrait": ", Shot on Hasselblad X2D 100C, 85mm f/1.4 lens at f/2.8, ISO 200, rule of thirds composition, professional portrait photography",
128
+ "landscape": ", Shot on Phase One XT, 24-70mm f/4 lens at f/8, ISO 100, hyperfocal distance, leading lines composition, epic landscape photography",
129
+ "street": ", Shot on Leica M11, 35mm f/1.4 lens at f/2.8, ISO 800, decisive moment, candid composition, documentary street photography",
130
+ "cinematic": ", Shot on ARRI Alexa LF, 35mm anamorphic lens at f/2.8, ISO 400, cinematic framing, film grain, dramatic composition",
131
+ "architectural": ", Shot on Canon EOS R5, 24-70mm f/2.8 lens at f/8, ISO 100, symmetrical composition, perspective correction, architectural photography",
132
+ "commercial": ", Shot on Hasselblad X2D 100C, 90mm f/2.5 lens at f/4, ISO 100, centered composition, product photography",
133
+ "default": ", Shot on Phase One XF IQ4, 80mm f/2.8 lens at f/4, ISO 200, balanced composition, professional photography"
134
  },
135
 
136
  "lighting_enhancements": {
137
+ "dramatic": ", dramatic key lighting with rim light, chiaroscuro lighting ratio 4:1",
138
+ "portrait": ", soft key light with fill light, 3-point lighting setup, lighting ratio 2:1",
139
+ "cinematic": ", moody cinematic lighting with practical lights, dramatic shadows, film noir lighting",
140
+ "natural": ", natural window lighting, soft diffused light, even lighting ratio",
141
+ "default": ", professional lighting setup, balanced exposure"
142
  },
143
 
144
  "style_enhancements": {
145
+ "photorealistic": ", photorealistic rendering, ultra-detailed, sharp focus, high resolution",
146
+ "cinematic": ", cinematic composition, film grain, anamorphic bokeh, color grading",
147
+ "commercial": ", commercial photography style, clean composition, product focus",
148
+ "editorial": ", editorial photography style, storytelling composition, magazine quality",
149
+ "fine_art": ", fine art photography, artistic composition, gallery quality"
150
+ },
151
+
152
+ # NEW: Text condensation patterns
153
+ "condensation_patterns": {
154
+ "remove_redundant_phrases": [
155
+ r'This image depicts',
156
+ r'The image shows',
157
+ r'appears to be',
158
+ r'seems to be',
159
+ r'which adds',
160
+ r'The setting appears to be',
161
+ r'The scene is',
162
+ r'The composition is carefully',
163
+ r'The technical photographic qualities include',
164
+ r'The artistic elements include'
165
+ ],
166
+ "simplify_lighting_descriptions": [
167
+ (r'The sun is setting, casting a warm, orange glow over the scene', 'golden hour lighting'),
168
+ (r'soft and warm.*?light', 'soft warm lighting'),
169
+ (r'dramatic contrast with the dark, shadowy areas', 'dramatic shadows'),
170
+ (r'long shadows and creating a sense of depth', 'deep shadows')
171
+ ],
172
+ "condense_mood_descriptions": [
173
+ (r'The mood is somber and melancholic.*?contrast to the dark, desolate environment', 'melancholic mood with dramatic contrast'),
174
+ (r'sense of contemplation or longing', 'contemplative mood'),
175
+ (r'sense of desolation and abandonment', 'desolate atmosphere')
176
+ ]
177
+ },
178
+
179
+ # NEW: Mandatory generative keywords
180
+ "mandatory_keywords": {
181
+ "quality": ["photorealistic", "ultra-detailed", "sharp focus"],
182
+ "technical": ["professional photography", "high resolution"],
183
+ "style_by_scene": {
184
+ "cinematic": ["cinematic composition", "film grain"],
185
+ "portrait": ["shallow depth of field", "bokeh"],
186
+ "landscape": ["wide shot", "epic scale"],
187
+ "street": ["candid moment", "documentary style"],
188
+ "architectural": ["geometric composition", "clean lines"]
189
+ }
190
  }
191
  }
192
 
 
213
  "professional_criteria": {
214
  "camera_equipment": ["Canon", "Sony", "Leica", "Hasselblad", "Phase One", "ARRI"],
215
  "lens_specifications": ["f/", "mm", "anamorphic", "telephoto", "wide-angle"],
216
+ "technical_settings": ["ISO", "aperture", "f/", "shutter speed", "exposure"],
217
+ "lighting_techniques": ["key light", "rim light", "fill light", "3-point lighting", "lighting ratio"],
218
+ "composition_rules": ["rule of thirds", "leading lines", "depth of field", "bokeh", "symmetrical", "centered"],
219
+ "cinematography_terms": ["cinematic", "dramatic", "film grain", "anamorphic bokeh", "color grading"]
220
  }
221
  }
222
+ }
223
 
224
  # Environment Configuration
225
  ENVIRONMENT = {
 
292
  "knowledge_base_integration": True,
293
  "technical_enhancement": True,
294
  "composition_guidance": True,
295
+ "prompt_condensation": True, # NEW
296
 
297
  "scene_detection_keywords": {
298
  "portrait": ["person", "face", "portrait", "headshot", "model"],
 
308
  "professional_terminology",
309
  "equipment_specifications",
310
  "lighting_description",
311
+ "composition_analysis",
312
+ "prompt_optimization" # NEW
313
+ ],
314
+
315
+ # NEW: Prompt optimization settings
316
+ "prompt_optimization": {
317
+ "max_length": 150, # words
318
+ "remove_redundancy": True,
319
+ "add_technical_specs": True,
320
+ "include_composition_terms": True,
321
+ "mandatory_iso_settings": True,
322
+ "enforce_aperture_format": True
323
+ }
324
  }
325
 
326
  # Flash Attention Installation Command