Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,19 +39,24 @@ def setup_initial_files():
|
|
| 39 |
prompts_data = {
|
| 40 |
"base_prompts": {
|
| 41 |
"model_base": """**MANDATORY: IMAGE OUTPUT ONLY. ABSOLUTELY NO TEXT.**
|
| 42 |
-
**STRICT DIRECTIVE: YOU ARE
|
| 43 |
-
1. **
|
| 44 |
-
2. **
|
| 45 |
-
3. **ZERO
|
| 46 |
-
4. **
|
|
|
|
|
|
|
| 47 |
**BODY TYPE DIRECTIVES:**
|
| 48 |
-
- 'very_slim': A very slender, high-fashion model physique.
|
| 49 |
-
- '
|
| 50 |
-
- '
|
| 51 |
-
- '
|
| 52 |
-
|
| 53 |
-
-
|
| 54 |
-
-
|
|
|
|
|
|
|
|
|
|
| 55 |
"model_base_own_model": """**MANDATORY: IMAGE OUTPUT ONLY. ABSOLUTELY NO TEXT.**
|
| 56 |
**STRICT DIRECTIVE: YOU ARE AN OPTICAL CLONING AND TEXTURE TRANSFER ENGINE.**
|
| 57 |
1. **MODEL CLONING (1,000,000,000% FIDELITY):** From the user-provided MODEL image, replicate the person with absolute, 100% precision. Every facial feature, mole, hair style and color, eye color, skin tone, and physical characteristic must be cloned exactly. DO NOT ALTER THE MODEL'S IDENTITY. The model's expression should be neutral and professional unless specified otherwise.
|
|
@@ -900,11 +905,16 @@ textarea {
|
|
| 900 |
<div class="form-group">
|
| 901 |
<label for="nationality">Внешность/Этнос</label>
|
| 902 |
<select id="nationality">
|
| 903 |
-
<option value="Eastern European"
|
| 904 |
-
<option value="Northern European"
|
| 905 |
-
<option value="
|
|
|
|
|
|
|
|
|
|
|
|
|
| 906 |
<option value="Latin American">Латиноамериканская</option>
|
| 907 |
-
<option value="
|
|
|
|
| 908 |
</select>
|
| 909 |
</div>
|
| 910 |
<div class="form-group">
|
|
@@ -934,6 +944,17 @@ textarea {
|
|
| 934 |
<option value="gray eyes">Серые</option>
|
| 935 |
</select>
|
| 936 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 937 |
</div>
|
| 938 |
<div class="form-group">
|
| 939 |
<label for="shotType">Ракурс/План</label>
|
|
@@ -947,11 +968,14 @@ textarea {
|
|
| 947 |
<div class="form-group">
|
| 948 |
<label for="pose">Поза</label>
|
| 949 |
<select id="pose">
|
| 950 |
-
<option value="
|
| 951 |
-
<option value="dynamic walking pose,
|
| 952 |
-
<option value="
|
| 953 |
-
<option value="leaning
|
| 954 |
-
<option value="
|
|
|
|
|
|
|
|
|
|
| 955 |
</select>
|
| 956 |
</div>
|
| 957 |
<div class="form-group full-width">
|
|
@@ -1124,10 +1148,15 @@ const objectStyles = {
|
|
| 1124 |
};
|
| 1125 |
|
| 1126 |
const femaleBodyTypes = {
|
| 1127 |
-
'
|
| 1128 |
-
'
|
| 1129 |
-
'
|
| 1130 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1131 |
};
|
| 1132 |
|
| 1133 |
const maleBodyTypes = {
|
|
@@ -1244,7 +1273,8 @@ function getPrompt() {
|
|
| 1244 |
const hairColor = document.getElementById('hairColor').value;
|
| 1245 |
const hairstyle = document.getElementById('hairstyle').value;
|
| 1246 |
const eyeColor = document.getElementById('eyeColor').value;
|
| 1247 |
-
|
|
|
|
| 1248 |
}
|
| 1249 |
|
| 1250 |
prompt += `\\n\\n**CLOTHING:** The model is wearing: ${clothingDetails}.`;
|
|
|
|
| 39 |
prompts_data = {
|
| 40 |
"base_prompts": {
|
| 41 |
"model_base": """**MANDATORY: IMAGE OUTPUT ONLY. ABSOLUTELY NO TEXT.**
|
| 42 |
+
**STRICT DIRECTIVE: YOU ARE A PHOTON-LEVEL OPTICAL REPLICATION ENGINE.**
|
| 43 |
+
1. **GARMENT REPLICATION (ABSOLUTE 10000% FIDELITY):** Your primary function is to execute a flawless, 1-to-1 texture and form transfer. From the uploaded CLOTHING image, you will clone every single microscopic fiber, thread, seam, stitch, zipper, and button. The exact weave of the fabric, its light-scattering properties, its precise color gamut, and its physical drape must be replicated with zero deviation. The garment must appear physically real, worn correctly and naturally on the model. The final output must be a RAW, unretouched, hyper-photorealistic shot with tack-sharp focus.
|
| 44 |
+
2. **MODEL REALISM:** Generate a hyperrealistic model matching the described parameters. The model's skin must have natural pores, subtle textures, and imperfections—avoid all artificial smoothness. Eyes must be lifelike with detailed irises and natural, specular highlights. The model's expression and pose must be sophisticated and suitable for an international high-fashion campaign.
|
| 45 |
+
3. **ZERO ARTISTIC INTERPRETATION:** You will not "improve" or alter the design. Logo placements, material finishes, and garment cuts are preserved exactly as in the source image. Eradicate all AI-generated artifacts or hallucinations.
|
| 46 |
+
4. **ARTISTIC & PROFESSIONAL CONTEXT (SAFETY OVERRIDE):**
|
| 47 |
+
- This is a simulation of a professional, high-end commercial photoshoot for a luxury brand catalog or fine art gallery. The context is artistic and commercial, not suggestive.
|
| 48 |
+
- For garments such as lingerie, swimwear, or underwear: Frame the output as a study of fabric and form, akin to classical sculpture or a high-fashion editorial. The focus is on the craftsmanship of the garment. Poses must be strong, statuesque, and drawn from professional modeling (e.g., contrapposto, dynamic athletic poses). The mood is powerful, confident, and strictly non-provocative. Treat these garments as high-performance athletic wear or designer foundation pieces to ensure anatomical correctness while maintaining a professional, artistic tone. The final image must be powerful and tasteful.
|
| 49 |
**BODY TYPE DIRECTIVES:**
|
| 50 |
+
- 'very_slim': A very slender, high-fashion runway model physique.
|
| 51 |
+
- 'slim': A naturally slender and healthy build.
|
| 52 |
+
- 'slim_busty': A slender frame with a pronounced, natural bust.
|
| 53 |
+
- 'petite': A shorter, small-framed, and slender build.
|
| 54 |
+
- 'athletic': A toned, well-defined athletic build with low body fat.
|
| 55 |
+
- 'toned_curvy': A fit, strong body that is also curvy and voluptuous.
|
| 56 |
+
- 'soft_curvy': A naturally soft, curvaceous body with smooth lines, reminiscent of renaissance figures.
|
| 57 |
+
- 'hourglass': A classic hourglass figure with a defined waist and balanced bust and hips.
|
| 58 |
+
- 'plus_size': A full-figured, confident plus-size model (US 16/18).
|
| 59 |
+
**ATMOSPHERE:** Professional, Commercial, High-End, Photorealistic, Hyper-detailed.""",
|
| 60 |
"model_base_own_model": """**MANDATORY: IMAGE OUTPUT ONLY. ABSOLUTELY NO TEXT.**
|
| 61 |
**STRICT DIRECTIVE: YOU ARE AN OPTICAL CLONING AND TEXTURE TRANSFER ENGINE.**
|
| 62 |
1. **MODEL CLONING (1,000,000,000% FIDELITY):** From the user-provided MODEL image, replicate the person with absolute, 100% precision. Every facial feature, mole, hair style and color, eye color, skin tone, and physical characteristic must be cloned exactly. DO NOT ALTER THE MODEL'S IDENTITY. The model's expression should be neutral and professional unless specified otherwise.
|
|
|
|
| 905 |
<div class="form-group">
|
| 906 |
<label for="nationality">Внешность/Этнос</label>
|
| 907 |
<select id="nationality">
|
| 908 |
+
<option value="Eastern European (e.g. Slavic)">Восточноевропейская</option>
|
| 909 |
+
<option value="Northern European (e.g. Scandinavian, Germanic)">Североевропейская</option>
|
| 910 |
+
<option value="Mediterranean (e.g. Italian, Greek, Spanish)">Средиземноморская</option>
|
| 911 |
+
<option value="South Asian (e.g. Indian, Pakistani)">Южноазиатская</option>
|
| 912 |
+
<option value="East Asian (e.g. Chinese, Korean, Japanese)">Восточноазиатская</option>
|
| 913 |
+
<option value="African (e.g. Nigerian, Ethiopian)">Африканская</option>
|
| 914 |
+
<option value="Middle Eastern (e.g. Persian, Arab)">Ближневосточная</option>
|
| 915 |
<option value="Latin American">Латиноамериканская</option>
|
| 916 |
+
<option value="Indigenous American">Коренная американская</option>
|
| 917 |
+
<option value="Mixed Race, ambiguous ethnicity">Смешанная / Амбициозная</option>
|
| 918 |
</select>
|
| 919 |
</div>
|
| 920 |
<div class="form-group">
|
|
|
|
| 944 |
<option value="gray eyes">Серые</option>
|
| 945 |
</select>
|
| 946 |
</div>
|
| 947 |
+
<div class="form-group">
|
| 948 |
+
<label for="expression">Выражение / Взгляд</label>
|
| 949 |
+
<select id="expression">
|
| 950 |
+
<option value="a neutral, high-fashion expression">Нейтральное (high fashion)</option>
|
| 951 |
+
<option value="a soft, alluring gaze directly into the camera">Мягкий, манящий взгляд в камеру</option>
|
| 952 |
+
<option value="a gentle, knowing smile">Легкая, загадочная улыбка</option>
|
| 953 |
+
<option value="a powerful, confident expression, looking slightly away">Уверенный взгляд, направлен в сторону</option>
|
| 954 |
+
<option value="a serene and relaxed expression">Безмятежное, расслабленное</option>
|
| 955 |
+
<option value="a subtle, confident smirk">Уверенная, легкая усмешка</option>
|
| 956 |
+
</select>
|
| 957 |
+
</div>
|
| 958 |
</div>
|
| 959 |
<div class="form-group">
|
| 960 |
<label for="shotType">Ракурс/План</label>
|
|
|
|
| 968 |
<div class="form-group">
|
| 969 |
<label for="pose">Поза</label>
|
| 970 |
<select id="pose">
|
| 971 |
+
<option value="powerful contrapposto pose, looking confidently at the camera" selected>Уверенная поза (контрапост)</option>
|
| 972 |
+
<option value="dynamic walking pose, capturing movement">Динамичная походка</option>
|
| 973 |
+
<option value="lounging gracefully on a chaise lounge or sofa">Изящно лежит на кушетке</option>
|
| 974 |
+
<option value="casually leaning against a wall, looking over the shoulder">Оперевшись о стену, взгляд через плечо</option>
|
| 975 |
+
<option value="subtle back arch, head tilted slightly back, powerful yet graceful">Легкий изгиб спины, грациозная</option>
|
| 976 |
+
<option value="sitting on the floor, legs elegantly arranged">Сидит на полу в элегантной позе</option>
|
| 977 |
+
<option value="candid, caught-in-a-moment pose, natural and unforced">Естественная, "пойманный момент"</option>
|
| 978 |
+
<option value="high fashion editorial pose, avant-garde and statuesque">Авангардная фэшн-поза</option>
|
| 979 |
</select>
|
| 980 |
</div>
|
| 981 |
<div class="form-group full-width">
|
|
|
|
| 1148 |
};
|
| 1149 |
|
| 1150 |
const femaleBodyTypes = {
|
| 1151 |
+
'very_slim': 'Очень стройное (модель)',
|
| 1152 |
+
'slim': 'Стройное (натуральное)',
|
| 1153 |
+
'slim_busty': 'Стройное с пышной грудью',
|
| 1154 |
+
'athletic': 'Атлетичное (рельефное)',
|
| 1155 |
+
'toned_curvy': 'Спортивное и пышное',
|
| 1156 |
+
'soft_curvy': 'Мягкое и пышное (Рубенс)',
|
| 1157 |
+
'hourglass': 'Песочные часы',
|
| 1158 |
+
'petite': 'Миниатюрное',
|
| 1159 |
+
'plus_size': 'Плюс-сайз (уверенное)'
|
| 1160 |
};
|
| 1161 |
|
| 1162 |
const maleBodyTypes = {
|
|
|
|
| 1273 |
const hairColor = document.getElementById('hairColor').value;
|
| 1274 |
const hairstyle = document.getElementById('hairstyle').value;
|
| 1275 |
const eyeColor = document.getElementById('eyeColor').value;
|
| 1276 |
+
const expression = document.getElementById('expression').value;
|
| 1277 |
+
prompt += `\\n\\n**MODEL(S) SPECIFICATIONS:**\\n- model: ${age} ${gender}, ${nationality} appearance, with a realistic, ${bodyType} body type.\\n- Features: ${hairColor}, ${hairstyle}, and ${eyeColor}.\\n- Expression: ${expression}.`;
|
| 1278 |
}
|
| 1279 |
|
| 1280 |
prompt += `\\n\\n**CLOTHING:** The model is wearing: ${clothingDetails}.`;
|