Spaces:
Sleeping
Sleeping
Lcmind commited on
Commit ·
0e36c16
1
Parent(s): 41fbbc9
feat: switch to 9:16 vertical format with optimized Flux settings (768x1344, steps=28, guidance=3.5)
Browse files- app/services/flux.py +5 -5
app/services/flux.py
CHANGED
|
@@ -27,7 +27,7 @@ async def generate_poster(analysis: dict) -> str:
|
|
| 27 |
keywords = ', '.join(analysis.get('keywords', ['modern', 'minimal']))
|
| 28 |
|
| 29 |
prompt = f"""
|
| 30 |
-
A high-fashion
|
| 31 |
|
| 32 |
VISUAL CONCEPT:
|
| 33 |
- Brand essence: {title}
|
|
@@ -65,10 +65,10 @@ STYLE & QUALITY:
|
|
| 65 |
"inputs": prompt,
|
| 66 |
"parameters": {
|
| 67 |
"negative_prompt": negative_prompt,
|
| 68 |
-
"num_inference_steps":
|
| 69 |
-
"guidance_scale":
|
| 70 |
-
"width":
|
| 71 |
-
"height":
|
| 72 |
}
|
| 73 |
}
|
| 74 |
|
|
|
|
| 27 |
keywords = ', '.join(analysis.get('keywords', ['modern', 'minimal']))
|
| 28 |
|
| 29 |
prompt = f"""
|
| 30 |
+
A high-fashion vertical poster design (9:16 ratio, 768x1344px).
|
| 31 |
|
| 32 |
VISUAL CONCEPT:
|
| 33 |
- Brand essence: {title}
|
|
|
|
| 65 |
"inputs": prompt,
|
| 66 |
"parameters": {
|
| 67 |
"negative_prompt": negative_prompt,
|
| 68 |
+
"num_inference_steps": 28, # Higher steps for better quality
|
| 69 |
+
"guidance_scale": 3.5, # Optimal balance for detail and prompt adherence
|
| 70 |
+
"width": 768, # 9:16 ratio width
|
| 71 |
+
"height": 1344, # 9:16 ratio height (optimal for Flux Dev)
|
| 72 |
}
|
| 73 |
}
|
| 74 |
|