whispersound commited on
Commit
c93361f
·
verified ·
1 Parent(s): 5d4a71b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -18
app.py CHANGED
@@ -74,26 +74,20 @@ def generate_prompt_with_gemini(
74
  item_description += f" and (From image #3)"
75
 
76
  # 프롬프트 생성 요청
77
- prompt_request = f"""Create an advanced Midjourney prompt that:
78
- - Precisely recreates the photorealistic essence of (Reference Image #1)
79
- - Transforms the subject's entire ensemble with {item_description}
80
- - Captures the most nuanced details of pose, lighting, and emotional atmosphere
81
 
82
- Deep Creative Brief:
83
- - Maintain the exact body positioning and subtle gestural qualities
84
- - Preserve the original image's dramatic lighting and color palette
85
- - Seamlessly integrate new fashion elements with hyperrealistic precision
86
- - Respect the original's emotional and aesthetic integrity
87
- - Focus on texture, fabric movement, and invisible stylistic transitions
88
 
89
- Styling Directive:
90
- - Holistic fashion transformation that transcends mere clothing replacement
91
- - Subtle accessories and styling elements from (image #2) and (image #3)
92
- - Maintaining the original's contemplative, ethereal mood
93
 
94
- Additional Contextual Notes: {translated_custom if translated_custom else 'Preserve intrinsic emotional landscape'}
95
-
96
- Render with cinematic depth, 8k ultra-detailed resolution, professional studio lighting, artstation-level quality. Focus on the intricate dialogue between form, texture, and emotional resonance."""
97
 
98
  model = genai.GenerativeModel('gemini-2.0-flash')
99
 
@@ -112,7 +106,7 @@ Render with cinematic depth, 8k ultra-detailed resolution, professional studio l
112
  # 필수 파라미터 추가
113
  required_params = "--ar 9:16 --seed 123456 --q 3 --v 5.2 --style raw"
114
  if required_params not in enhanced_prompt:
115
- enhanced_prompt = f"/imagine {enhanced_prompt.strip()} {required_params}"
116
 
117
  logger.info(f"생성된 프롬프트: {enhanced_prompt}")
118
  return enhanced_prompt
 
74
  item_description += f" and (From image #3)"
75
 
76
  # 프롬프트 생성 요청
77
+ prompt_request = f"""Create a precise Midjourney prompt that:
78
+ - Exactly recreates (Reference Image #1)
79
+ - Transforms ensemble with {item_description}
80
+ - Preserves original emotional essence
81
 
82
+ Key Requirements:
83
+ - Match original pose and body positioning
84
+ - Maintain specific lighting and mood
85
+ - Seamlessly integrate new styling
86
+ - Ensure hyperrealistic transformation
 
87
 
88
+ Contextual Notes: {translated_custom if translated_custom else 'Preserve intrinsic image character'}
 
 
 
89
 
90
+ Render with cinematic precision, 8k ultra-detail."""
 
 
91
 
92
  model = genai.GenerativeModel('gemini-2.0-flash')
93
 
 
106
  # 필수 파라미터 추가
107
  required_params = "--ar 9:16 --seed 123456 --q 3 --v 5.2 --style raw"
108
  if required_params not in enhanced_prompt:
109
+ enhanced_prompt = f"/imagine Precise photorealistic recreation of (Reference Image #1) with meticulous transformation:\n- Exact pose and ethereal mood preserved\n- Seamless ensemble replacement from (image #2) and (image #3)\n- Original silhouette and body positioning maintained\n- Dramatic side-lighting matching reference image\n- Hyper-detailed fabric textures and subtle accessory integration\n- Soft, contemplative emotional landscape\n- Invisible stylistic transitions\n\nCinematic rendering focusing on form, texture, and emotional resonance, 8k ultra-detailed, professional studio lighting, artstation aesthetic. {required_params}"
110
 
111
  logger.info(f"생성된 프롬프트: {enhanced_prompt}")
112
  return enhanced_prompt