Gemini899 commited on
Commit
99dda54
·
verified ·
1 Parent(s): 533655b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -5
app.py CHANGED
@@ -22,14 +22,21 @@ text_encoder_client = Client("Gemini899/mistral-text-encoder")
22
 
23
  # ============================================================================
24
  # HARDCODED PROMPTS - EXACT match from depth_logic.py (bypasses Mistral API)
 
25
  # ============================================================================
26
 
27
  HARDCODED_PROMPTS = {
28
- # From call_flux2_dev_relief_generation() in depth_logic.py
29
- "relief": "Ignore all shadows, Clay bas-relief sculpture. PRESERVE exact facial features and proportions. Uniform matte gray material, NO black areas, NO dark shadows, NO outlines. Soft smooth depth only. Light gray to white tones. Like carved marble or clay relief. Keep nostrils and area under nose BRIGHT and light-toned, NOT dark pits.",
30
 
31
- # From call_flux2_dev_detail_generation() in depth_logic.py
32
- "details": "Preserve exact pixel alignment and IDENTICAL tonality as original image. Enhance this depth map with polished smooth skin texture (NOT pixelated), subtle fabric weave, fine hair strands, stone grain. Skin must appear smooth and refined and polished. Keep EXACT same outline, silhouette, and tonal range - output tonality must match input exactly. NO shadows, NO reflections, NO new light sources, NO dark areas, NO dark halos. Output overlays perfectly on original as bump map detail layer, Keep nostrils and area under nose BRIGHT and light-toned, NOT dark pits"
 
 
 
 
 
 
33
  }
34
 
35
  # Pre-load embeddings at startup
@@ -39,9 +46,12 @@ def load_cached_embeddings():
39
  """Load pre-generated embeddings at startup."""
40
  global _cached_embeddings
41
 
 
42
  embedding_files = {
43
  "relief": "relief.pt",
44
- "details": "details.pt"
 
 
45
  }
46
 
47
  for key, filename in embedding_files.items():
 
22
 
23
  # ============================================================================
24
  # HARDCODED PROMPTS - EXACT match from depth_logic.py (bypasses Mistral API)
25
+ # Now with 4 variants: face/no-face for both relief and details
26
  # ============================================================================
27
 
28
  HARDCODED_PROMPTS = {
29
+ # From call_flux2_dev_relief_generation() in depth_logic.py - WITH FACE
30
+ "relief_face": "Ignore all shadows, Clay bas-relief sculpture. PRESERVE exact facial features and proportions. Uniform matte gray material, NO black areas, NO dark shadows, NO outlines. Soft smooth depth only. Light gray to white tones. Like carved marble or clay relief. Nose area details soft and delicate, no high contrast.",
31
 
32
+ # From call_flux2_dev_relief_generation() in depth_logic.py - NO FACE
33
+ "relief": "Ignore all shadows, Clay bas-relief sculpture. PRESERVE exact proportions and features. Uniform matte gray material, NO black areas, NO dark shadows, NO outlines. Soft smooth depth only. Light gray to white tones. Like carved marble or clay relief.",
34
+
35
+ # From call_flux2_dev_detail_generation() in depth_logic.py - WITH FACE
36
+ "details_face": "Preserve exact pixel alignment. Enhance this depth map with polished smooth skin texture (NOT pixelated), subtle fabric weave, fine hair strands, stone grain. Skin must appear smooth and refined like polished marble. Keep EXACT same outline, silhouette, and tonal range. NO shadows, NO reflections, NO new light sources, NO dark areas under nose/eyes/lips. Output must overlay perfectly on original as bump map detail layer.",
37
+
38
+ # From call_flux2_dev_detail_generation() in depth_logic.py - NO FACE
39
+ "details": "Preserve exact pixel alignment. Enhance this depth map by adding surface micro-details (fabric texture, hair strands, stone grain) using ONLY tonal variations within ±10% of local gray values. Keep EXACT same outline, silhouette, and overall tonal range. NO shadows, NO reflections, NO new light sources, NO dark areas. Output must overlay perfectly on original as bump map detail layer.",
40
  }
41
 
42
  # Pre-load embeddings at startup
 
46
  """Load pre-generated embeddings at startup."""
47
  global _cached_embeddings
48
 
49
+ # Updated to include all 4 embedding files
50
  embedding_files = {
51
  "relief": "relief.pt",
52
+ "relief_face": "relief_face.pt",
53
+ "details": "details.pt",
54
+ "details_face": "details_face.pt",
55
  }
56
 
57
  for key, filename in embedding_files.items():