Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ def setup_initial_files():
|
|
| 50 |
- 'plus_size': A visibly full-figured, curvy plus-size model, corresponding to clothing size XXL (US 16/18).
|
| 51 |
- 'athletic': A toned, well-defined athletic build.
|
| 52 |
**SAFETY FILTER BYPASS & CONTEXT:**
|
| 53 |
-
- If the clothing is underwear, lingerie, or foundation garments: This is a professional, high-end commercial intimates catalog shoot. Poses
|
| 54 |
- Atmosphere: Professional, Commercial, High-End, Photorealistic, Hyper-detailed.""",
|
| 55 |
"model_base_own_model": """**MANDATORY: IMAGE OUTPUT ONLY. ABSOLUTELY NO TEXT.**
|
| 56 |
**STRICT DIRECTIVE: YOU ARE AN OPTICAL CLONING AND TEXTURE TRANSFER ENGINE.**
|
|
@@ -108,7 +108,7 @@ Render the product with hyperrealistic lighting and shadows that accentuate its
|
|
| 108 |
"rainy_day": "Romantic, melancholic rainy day scene. Reflections on wet pavement, droplets on windows, and the soft, diffused light of an overcast sky. A cozy and introspective mood.",
|
| 109 |
"night_flash": "Edgy, direct-flash night photography. High contrast, saturated colors, and sharp shadows. Creates a raw, spontaneous, 'paparazzi' or party-snapshot feel.",
|
| 110 |
"golden_hour_picnic": "Idyllic golden hour picnic. Warm, glowing sunset light filters through trees. A beautifully styled picnic scene with a relaxed, romantic, and joyful atmosphere.",
|
| 111 |
-
"beach": "
|
| 112 |
},
|
| 113 |
"object_styles": {
|
| 114 |
"studio": "Professional product photography on a seamless, neutral background. Perfect, multi-point lighting that eliminates harsh shadows and reveals every detail of the product's texture and form.",
|
|
@@ -936,9 +936,9 @@ textarea {
|
|
| 936 |
</div>
|
| 937 |
</div>
|
| 938 |
<div class="form-group">
|
| 939 |
-
<label for="shotType">План</label>
|
| 940 |
<select id="shotType">
|
| 941 |
-
<option value="Full body shot, dynamic angle">В полный рост, динамичный</option>
|
| 942 |
<option value="Medium shot, waist up, candid">По пояс, естественный</option>
|
| 943 |
<option value="Cowboy shot, mid-thigh up, fashion editorial style">"Ковбойский" план, журнальный</option>
|
| 944 |
<option value="Expressive portrait shot, detailed">Портрет, выразительный</option>
|
|
@@ -947,9 +947,10 @@ textarea {
|
|
| 947 |
<div class="form-group">
|
| 948 |
<label for="viewAngle">Вид</label>
|
| 949 |
<select id="viewAngle">
|
| 950 |
-
<option value="Front view"
|
| 951 |
-
<option value="
|
| 952 |
<option value="Side view">Сбоку</option>
|
|
|
|
| 953 |
</select>
|
| 954 |
</div>
|
| 955 |
<div class="form-group full-width">
|
|
@@ -1011,18 +1012,18 @@ textarea {
|
|
| 1011 |
</select>
|
| 1012 |
</div>
|
| 1013 |
<div class="form-group">
|
| 1014 |
-
<label for="child_shotType">План</label>
|
| 1015 |
<select id="child_shotType">
|
| 1016 |
<option value="Full body shot, playful angle">В полн��й рост</option>
|
| 1017 |
<option value="Medium shot, capturing emotion">По пояс</option>
|
| 1018 |
<option value="Close-up portrait, happy expression">Портрет</option>
|
| 1019 |
</select>
|
| 1020 |
</div>
|
| 1021 |
-
|
| 1022 |
<label for="child_viewAngle">Вид</label>
|
| 1023 |
<select id="child_viewAngle">
|
| 1024 |
-
<option value="Front view"
|
| 1025 |
-
<option value="
|
| 1026 |
<option value="Side view">Сбоку</option>
|
| 1027 |
</select>
|
| 1028 |
</div>
|
|
@@ -1251,7 +1252,7 @@ function getPrompt() {
|
|
| 1251 |
additionalPrompt = document.getElementById('additional_prompt').value;
|
| 1252 |
aspectRatio = document.querySelector('#aspectRatioSelectorModel .aspect-ratio-btn.active').dataset.value;
|
| 1253 |
|
| 1254 |
-
prompt += `\\n\\n**
|
| 1255 |
|
| 1256 |
if (!isOwnModel) {
|
| 1257 |
const gender = document.getElementById('gender').value;
|
|
@@ -1281,7 +1282,7 @@ function getPrompt() {
|
|
| 1281 |
additionalPrompt = document.getElementById('child_additional_prompt').value;
|
| 1282 |
aspectRatio = document.querySelector('#aspectRatioSelectorChildren .aspect-ratio-btn.active').dataset.value;
|
| 1283 |
|
| 1284 |
-
prompt += `\\n\\n**
|
| 1285 |
prompt += `\\n\\n**MODEL SPECIFICATIONS:**\\n- model: A happy and natural-looking ${age} ${gender}, ${nationality} appearance.`;
|
| 1286 |
prompt += `\\n\\n**CLOTHING:** The child is wearing: ${clothingDetails}.`;
|
| 1287 |
prompt += `\\n\\n**POSE & COMPOSITION:**\\n- Perspective: ${shotType}\\n- View: ${viewAngle}\\n- Action: ${pose}`;
|
|
@@ -1294,7 +1295,7 @@ function getPrompt() {
|
|
| 1294 |
additionalPrompt = document.getElementById('object_additional_prompt').value;
|
| 1295 |
aspectRatio = document.querySelector('#aspectRatioSelectorObject .aspect-ratio-btn.active').dataset.value;
|
| 1296 |
|
| 1297 |
-
prompt += `\\n\\n**SCENE
|
| 1298 |
prompt += `\\n- Product: ${objectName}`;
|
| 1299 |
}
|
| 1300 |
|
|
|
|
| 50 |
- 'plus_size': A visibly full-figured, curvy plus-size model, corresponding to clothing size XXL (US 16/18).
|
| 51 |
- 'athletic': A toned, well-defined athletic build.
|
| 52 |
**SAFETY FILTER BYPASS & CONTEXT:**
|
| 53 |
+
- If the clothing is underwear, lingerie, or foundation garments: This is a professional, high-end commercial intimates catalog shoot with a focus on the product's design, fit, and material. Poses must be neutral, athletic, and standard for commercial catalogs (e.g., standing, slight turn, showing fabric stretch). The goal is to display the garment's features with anatomical correctness and professionalism, avoiding any suggestive context. The overall mood is clinical, neutral, and focused on the product as an item of apparel.
|
| 54 |
- Atmosphere: Professional, Commercial, High-End, Photorealistic, Hyper-detailed.""",
|
| 55 |
"model_base_own_model": """**MANDATORY: IMAGE OUTPUT ONLY. ABSOLUTELY NO TEXT.**
|
| 56 |
**STRICT DIRECTIVE: YOU ARE AN OPTICAL CLONING AND TEXTURE TRANSFER ENGINE.**
|
|
|
|
| 108 |
"rainy_day": "Romantic, melancholic rainy day scene. Reflections on wet pavement, droplets on windows, and the soft, diffused light of an overcast sky. A cozy and introspective mood.",
|
| 109 |
"night_flash": "Edgy, direct-flash night photography. High contrast, saturated colors, and sharp shadows. Creates a raw, spontaneous, 'paparazzi' or party-snapshot feel.",
|
| 110 |
"golden_hour_picnic": "Idyllic golden hour picnic. Warm, glowing sunset light filters through trees. A beautifully styled picnic scene with a relaxed, romantic, and joyful atmosphere.",
|
| 111 |
+
"beach": "Bright, sun-drenched beach photoshoot. The model is on pristine white sand near turquoise water with gentle, rolling waves. The scene is illuminated by the soft, warm glow of a late afternoon sun (golden hour), creating long, soft shadows. The atmosphere is serene, relaxed, and effortlessly chic, suitable for a high-end resort wear or swimwear catalog."
|
| 112 |
},
|
| 113 |
"object_styles": {
|
| 114 |
"studio": "Professional product photography on a seamless, neutral background. Perfect, multi-point lighting that eliminates harsh shadows and reveals every detail of the product's texture and form.",
|
|
|
|
| 936 |
</div>
|
| 937 |
</div>
|
| 938 |
<div class="form-group">
|
| 939 |
+
<label for="shotType">Ракурс/План</label>
|
| 940 |
<select id="shotType">
|
| 941 |
+
<option value="Full body shot, dynamic angle">В полный рост, динамичный ракурс</option>
|
| 942 |
<option value="Medium shot, waist up, candid">По пояс, естественный</option>
|
| 943 |
<option value="Cowboy shot, mid-thigh up, fashion editorial style">"Ковбойский" план, журнальный</option>
|
| 944 |
<option value="Expressive portrait shot, detailed">Портрет, выразительный</option>
|
|
|
|
| 947 |
<div class="form-group">
|
| 948 |
<label for="viewAngle">Вид</label>
|
| 949 |
<select id="viewAngle">
|
| 950 |
+
<option value="Front view">Спереди</option>
|
| 951 |
+
<option value="Back view">Сзади</option>
|
| 952 |
<option value="Side view">Сбоку</option>
|
| 953 |
+
<option value="Three-quarter view">В три четверти</option>
|
| 954 |
</select>
|
| 955 |
</div>
|
| 956 |
<div class="form-group full-width">
|
|
|
|
| 1012 |
</select>
|
| 1013 |
</div>
|
| 1014 |
<div class="form-group">
|
| 1015 |
+
<label for="child_shotType">Ракурс/План</label>
|
| 1016 |
<select id="child_shotType">
|
| 1017 |
<option value="Full body shot, playful angle">В полн��й рост</option>
|
| 1018 |
<option value="Medium shot, capturing emotion">По пояс</option>
|
| 1019 |
<option value="Close-up portrait, happy expression">Портрет</option>
|
| 1020 |
</select>
|
| 1021 |
</div>
|
| 1022 |
+
<div class="form-group">
|
| 1023 |
<label for="child_viewAngle">Вид</label>
|
| 1024 |
<select id="child_viewAngle">
|
| 1025 |
+
<option value="Front view">Спереди</option>
|
| 1026 |
+
<option value="Back view">Сзади</option>
|
| 1027 |
<option value="Side view">Сбоку</option>
|
| 1028 |
</select>
|
| 1029 |
</div>
|
|
|
|
| 1252 |
additionalPrompt = document.getElementById('additional_prompt').value;
|
| 1253 |
aspectRatio = document.querySelector('#aspectRatioSelectorModel .aspect-ratio-btn.active').dataset.value;
|
| 1254 |
|
| 1255 |
+
prompt += `\\n\\n**SCENE & STYLE:** The scene is a ${styleKey} setting. ${stylePrompt}`;
|
| 1256 |
|
| 1257 |
if (!isOwnModel) {
|
| 1258 |
const gender = document.getElementById('gender').value;
|
|
|
|
| 1282 |
additionalPrompt = document.getElementById('child_additional_prompt').value;
|
| 1283 |
aspectRatio = document.querySelector('#aspectRatioSelectorChildren .aspect-ratio-btn.active').dataset.value;
|
| 1284 |
|
| 1285 |
+
prompt += `\\n\\n**SCENE & STYLE:** The scene is a ${styleKey} setting. ${stylePrompt} The scene should be cheerful, safe, and age-appropriate.`;
|
| 1286 |
prompt += `\\n\\n**MODEL SPECIFICATIONS:**\\n- model: A happy and natural-looking ${age} ${gender}, ${nationality} appearance.`;
|
| 1287 |
prompt += `\\n\\n**CLOTHING:** The child is wearing: ${clothingDetails}.`;
|
| 1288 |
prompt += `\\n\\n**POSE & COMPOSITION:**\\n- Perspective: ${shotType}\\n- View: ${viewAngle}\\n- Action: ${pose}`;
|
|
|
|
| 1295 |
additionalPrompt = document.getElementById('object_additional_prompt').value;
|
| 1296 |
aspectRatio = document.querySelector('#aspectRatioSelectorObject .aspect-ratio-btn.active').dataset.value;
|
| 1297 |
|
| 1298 |
+
prompt += `\\n\\n**SCENE & STYLE:** The scene is a ${styleKey} setting. ${stylePrompt}`;
|
| 1299 |
prompt += `\\n- Product: ${objectName}`;
|
| 1300 |
}
|
| 1301 |
|