Zeph27 commited on
Commit
61f0b81
Β·
1 Parent(s): 56d0f44

Add image files using Git LFS

Browse files
Files changed (33) hide show
  1. Movie Pose Style/Option 1/woman1.png +0 -3
  2. Movie Pose Style/Option 2/clip-f.png +0 -3
  3. Movie Pose Style/Option 2/clip-m.png +0 -3
  4. Movie Pose Style/Option 2/image.png +0 -3
  5. Movie Pose Style/Option 2/man2.png +0 -3
  6. Movie Pose Style/Option 2/woman2.png +0 -3
  7. Movie Pose Style/Option 3/clip-f.png +0 -3
  8. Movie Pose Style/Option 3/clip-m.png +0 -3
  9. Movie Pose Style/Option 3/image.png +0 -3
  10. Movie Pose Style/Option 3/man3.png +0 -3
  11. Movie Pose Style/Option 3/woman3.png +0 -3
  12. Movie Pose Style/Option 4/clip-f.png +0 -3
  13. Movie Pose Style/Option 4/clip-m.png +0 -3
  14. Movie Pose Style/Option 4/image.png +0 -3
  15. Movie Pose Style/Option 4/man4.png +0 -3
  16. Movie Pose Style/Option 4/woman4.png +0 -3
  17. Movie Pose Style/Option 5/clip-f.png +0 -3
  18. Movie Pose Style/Option 5/clip-m.png +0 -3
  19. Movie Pose Style/Option 5/image.png +0 -3
  20. Movie Pose Style/Option 5/man5.png +0 -3
  21. Movie Pose Style/Option 5/woman5.png +0 -3
  22. Movie Pose Style/Option 6/image.png +0 -3
  23. app copy.py +0 -94
  24. app.py +92 -48
  25. prompt.json +22 -0
  26. Movie Pose Style/Option 6/clip-m.png β†’ template/man_clip_mask.png +0 -0
  27. Movie Pose Style/Option 6/man6.png β†’ template/man_pose.png +0 -0
  28. Movie Pose Style/Option 6/clip-f.png β†’ template/woman_clip_mask.png +0 -0
  29. Movie Pose Style/Option 6/woman6.png β†’ template/woman_pose.png +0 -0
  30. Movie Pose Style/Option 1/clip-f.png β†’ thumbnail/Classy.png +2 -2
  31. Movie Pose Style/Option 1/clip-m.png β†’ thumbnail/Night Out.png +2 -2
  32. Movie Pose Style/Option 1/image.png β†’ thumbnail/Romantic.png +2 -2
  33. Movie Pose Style/Option 1/man1.png β†’ thumbnail/Winter.png +2 -2
Movie Pose Style/Option 1/woman1.png DELETED

Git LFS Details

  • SHA256: febd360321e4da555a66b6fce17567a8d1a380dd6903f35c1e684cd92535a50f
  • Pointer size: 131 Bytes
  • Size of remote file: 357 kB
Movie Pose Style/Option 2/clip-f.png DELETED

Git LFS Details

  • SHA256: 64f676549895202d23a2c323ce3b5c670f3e8ec5b8ac3e83f9b7842e03475839
  • Pointer size: 131 Bytes
  • Size of remote file: 252 kB
Movie Pose Style/Option 2/clip-m.png DELETED

Git LFS Details

  • SHA256: a1ce9d04872da780f3c409248dac964872591046971118c9d33fcc69557e3ad2
  • Pointer size: 131 Bytes
  • Size of remote file: 361 kB
Movie Pose Style/Option 2/image.png DELETED

Git LFS Details

  • SHA256: 35d731ac96a82814ccf7247e77442273727df149611d3f98aaec815bac0d0d93
  • Pointer size: 132 Bytes
  • Size of remote file: 1.12 MB
Movie Pose Style/Option 2/man2.png DELETED

Git LFS Details

  • SHA256: 20bb5d014b110d34bf9a9ec265bd0620ca04cbe745c8078f3438f151a3ff4a46
  • Pointer size: 131 Bytes
  • Size of remote file: 319 kB
Movie Pose Style/Option 2/woman2.png DELETED

Git LFS Details

  • SHA256: 17ef8f2db8aad874687c716fb146ce6cb4704741fb7924c0548daae87e67de1a
  • Pointer size: 131 Bytes
  • Size of remote file: 223 kB
Movie Pose Style/Option 3/clip-f.png DELETED

Git LFS Details

  • SHA256: 163d223321c2647df59bc99f4ace286a7a63bae60277048d15e7c84470ac992d
  • Pointer size: 131 Bytes
  • Size of remote file: 347 kB
Movie Pose Style/Option 3/clip-m.png DELETED

Git LFS Details

  • SHA256: b6e64bb189e6d6d28a8a8f13276984ea8844d74cc96466f08de6f2794cc9fbd6
  • Pointer size: 131 Bytes
  • Size of remote file: 358 kB
Movie Pose Style/Option 3/image.png DELETED

Git LFS Details

  • SHA256: d837a2e37e1e23b4c8512b4a29b932e9e5caae6e66e5405b8b57e17c66e11e74
  • Pointer size: 132 Bytes
  • Size of remote file: 1.17 MB
Movie Pose Style/Option 3/man3.png DELETED

Git LFS Details

  • SHA256: ba7cf388e4c2f86dfce5bc57184b00045b78eda831900ea730e70777a60e287b
  • Pointer size: 131 Bytes
  • Size of remote file: 316 kB
Movie Pose Style/Option 3/woman3.png DELETED

Git LFS Details

  • SHA256: d66b19d157754d8d4068d72360e56d8a9ed03d1ea2511d3e4201dcd8b3beb647
  • Pointer size: 131 Bytes
  • Size of remote file: 301 kB
Movie Pose Style/Option 4/clip-f.png DELETED

Git LFS Details

  • SHA256: 95628867bd048f50a00af9151fce9e46b053a8adbcd9659971ede29ec598df21
  • Pointer size: 131 Bytes
  • Size of remote file: 277 kB
Movie Pose Style/Option 4/clip-m.png DELETED

Git LFS Details

  • SHA256: 4f9688bc2c569c38860071156a1177000e930c7b561269b7b21caf5fbac8913a
  • Pointer size: 131 Bytes
  • Size of remote file: 358 kB
Movie Pose Style/Option 4/image.png DELETED

Git LFS Details

  • SHA256: be82326ee3a3108afdaaa8486c6e10b6e0b3503f468036dddb6432684c9d1f4f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.17 MB
Movie Pose Style/Option 4/man4.png DELETED

Git LFS Details

  • SHA256: 862e6ec010d3596d83942146564abafe9843d4b4529689f43af0f1e1b5a6c1f2
  • Pointer size: 131 Bytes
  • Size of remote file: 315 kB
Movie Pose Style/Option 4/woman4.png DELETED

Git LFS Details

  • SHA256: 4d877ce548d303d548233d677e34f321cd199771b2b8e4f3cf9bd81e6c4a6b33
  • Pointer size: 131 Bytes
  • Size of remote file: 242 kB
Movie Pose Style/Option 5/clip-f.png DELETED

Git LFS Details

  • SHA256: b6852a840a88dad0ed9dff646a94ade385bfe593aab305532cc9dc4dd8cca79b
  • Pointer size: 131 Bytes
  • Size of remote file: 175 kB
Movie Pose Style/Option 5/clip-m.png DELETED

Git LFS Details

  • SHA256: 491ab4a308693726ee8fa8eabc3eec5c787a64d795c59d8bb900d332922dd074
  • Pointer size: 131 Bytes
  • Size of remote file: 184 kB
Movie Pose Style/Option 5/image.png DELETED

Git LFS Details

  • SHA256: 7f23728a65aa03ea41dc87c4b1c1a3bfcd340d18f85b4b19a5ebcfe448e7aacb
  • Pointer size: 132 Bytes
  • Size of remote file: 1.06 MB
Movie Pose Style/Option 5/man5.png DELETED

Git LFS Details

  • SHA256: 9a6c956a13c1d63163df8b59a9d449a74649cd8feb23646da4ac9cd23201ec69
  • Pointer size: 131 Bytes
  • Size of remote file: 185 kB
Movie Pose Style/Option 5/woman5.png DELETED

Git LFS Details

  • SHA256: 5376c3565929ea187410a132ef53adc8cc80b905897170db7dce2ddb77cc121d
  • Pointer size: 131 Bytes
  • Size of remote file: 172 kB
Movie Pose Style/Option 6/image.png DELETED

Git LFS Details

  • SHA256: 6675d4e807c5b8a5fec7c1c21157ff83b7c3aef92f707f9cd357d1f1c2a5a314
  • Pointer size: 132 Bytes
  • Size of remote file: 1.26 MB
app copy.py DELETED
@@ -1,94 +0,0 @@
1
- import gradio as gr
2
- import asyncio
3
- import fal_client
4
- from dotenv import load_dotenv
5
- import os
6
- from pathlib import Path
7
- import time
8
-
9
- load_dotenv()
10
- os.environ["FAL_KEY"] = os.getenv("FAL_API_KEY")
11
-
12
- async def generate_paris_images(image1_path: str, image2_path: str, woman_prompt: str, man_prompt: str, batch_size: int, progress=gr.Progress()):
13
- start_time = time.time()
14
- print("Progress: 5% - Starting Paris image generation...")
15
- progress(0.05, desc="Starting Paris image generation...")
16
-
17
- # Upload all images in parallel
18
- upload_tasks = [
19
- fal_client.upload_file_async(str(image1_path)),
20
- fal_client.upload_file_async(str(image2_path)),
21
- fal_client.upload_file_async("test_images/woman.png"),
22
- fal_client.upload_file_async("test_images/man.png"),
23
- fal_client.upload_file_async("test_images/clipspace-mask-4736783.png"),
24
- fal_client.upload_file_async("test_images/clipspace-mask-4722992.png")
25
- ]
26
-
27
- [image1_url, image2_url, woman_img, man_img, mask1_img, mask2_img] = await asyncio.gather(*upload_tasks)
28
-
29
- print("Progress: 40% - Uploaded all images")
30
- progress(0.4, desc="Uploaded all images")
31
-
32
- handler = await fal_client.submit_async(
33
- "comfy/LVE/paris-couple",
34
- arguments={
35
- "loadimage_1": image1_url,
36
- "loadimage_2": image2_url,
37
- "loadimage_3": woman_img,
38
- "loadimage_4": mask1_img,
39
- "loadimage_5": mask2_img,
40
- "loadimage_6": man_img,
41
- "woman_prompt": woman_prompt,
42
- "man_prompt": man_prompt,
43
- "batch_size": batch_size
44
- }
45
- )
46
-
47
- print("Progress: 60% - Processing images...")
48
- progress(0.6, desc="Processing images...")
49
-
50
- result = await handler.get()
51
- print(result)
52
-
53
- end_time = time.time()
54
- processing_time = end_time - start_time
55
- print(f"Progress: 100% - Generation completed in {processing_time:.2f} seconds")
56
- progress(1.0, desc=f"Generation completed in {processing_time:.2f} seconds")
57
-
58
- # Return all generated image URLs and processing time
59
- # Get the first key from outputs dynamically
60
- return (
61
- [img["url"] for img in result["outputs"][next(iter(result["outputs"]))]["images"]] if "outputs" in result and result["outputs"] else [],
62
- f"Processing time: {processing_time:.2f} seconds"
63
- )
64
-
65
- with gr.Blocks() as demo:
66
- with gr.Row():
67
- image1_input = gr.Image(label="Upload Woman Image", type="filepath", value="test_images/user3-f.jpg")
68
- image2_input = gr.Image(label="Upload Man Image", type="filepath", value="test_images/user3.jpg")
69
-
70
- with gr.Row():
71
- woman_prompt = gr.Textbox(
72
- label="Woman Prompt",
73
- value="Close-up, portrait photo, a woman, Paris nighttime romance scene, wearing an elegant black dress with a shawl, standing beneath the same canopy of twinkling lights along the Champs-Γ‰lysΓ©es, the Eiffel Tower glowing bright in the distance, soft mist rising from the street, looking at the camera."
74
- )
75
- man_prompt = gr.Textbox(
76
- label="Man Prompt",
77
- value="Close-up, portrait photo, a man, Paris nighttime romance scene, wearing a tailored suit with a crisp white shirt, standing beneath a canopy of twinkling lights along the Champs-Γ‰lysΓ©es, the Eiffel Tower glowing bright in the distance, soft mist rising from the street, looking at the camera."
78
- )
79
-
80
- batch_size = gr.Slider(minimum=1, maximum=8, value=4, step=1, label="Batch Size")
81
-
82
- generate_btn = gr.Button("Generate")
83
- image_output = gr.Gallery(label="Generated Image")
84
- time_output = gr.Textbox(label="Processing Time")
85
-
86
- generate_btn.click(
87
- fn=generate_paris_images,
88
- inputs=[image1_input, image2_input, woman_prompt, man_prompt, batch_size],
89
- outputs=[image_output, time_output]
90
- )
91
-
92
- if __name__ == "__main__":
93
- print("Starting Gradio interface...")
94
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py CHANGED
@@ -5,52 +5,61 @@ from dotenv import load_dotenv
5
  import os
6
  from pathlib import Path
7
  import time
 
8
 
9
  load_dotenv()
10
  os.environ["FAL_KEY"] = os.getenv("FAL_API_KEY")
11
 
12
- async def generate_paris_images(product_name: str, image1_path: str, image2_path: str, woman_prompt: str, man_prompt: str, batch_size: int, progress=gr.Progress()):
13
  start_time = time.time()
14
  print("Progress: 5% - Starting Paris image generation...")
15
  progress(0.05, desc="Starting Paris image generation...")
16
 
17
- product_number = product_name.split(" ")[1]
18
- man_img = f"Movie Pose Style/Option {product_number}/man{product_number}.png"
19
- woman_img = f"Movie Pose Style/Option {product_number}/woman{product_number}.png"
20
- man_mask = f"Movie Pose Style/Option {product_number}/clip-m.png"
21
- woman_mask = f"Movie Pose Style/Option {product_number}/clip-f.png"
22
-
23
- print(f"man_img: {man_img}")
24
- print(f"woman_img: {woman_img}")
25
- print(f"man_mask: {man_mask}")
26
- print(f"woman_mask: {woman_mask}")
27
-
28
  # Upload all images in parallel
29
  upload_tasks = [
30
  fal_client.upload_file_async(str(image1_path)),
31
  fal_client.upload_file_async(str(image2_path)),
32
- fal_client.upload_file_async(man_img),
33
- fal_client.upload_file_async(woman_img),
34
- fal_client.upload_file_async(woman_mask),
35
- fal_client.upload_file_async(man_mask)
36
  ]
37
 
38
- [image1_url, image2_url, man_img, woman_img, mask1_img, mask2_img] = await asyncio.gather(*upload_tasks)
39
 
40
  print("Progress: 40% - Uploaded all images")
41
  progress(0.4, desc="Uploaded all images")
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  handler = await fal_client.submit_async(
44
  "comfy/LVE/paris-couple",
45
  arguments={
46
  "loadimage_1": image1_url,
47
  "loadimage_2": image2_url,
48
- "loadimage_3": woman_img,
49
- "loadimage_4": mask1_img,
50
- "loadimage_5": mask2_img,
51
- "loadimage_6": man_img,
52
  "woman_prompt": woman_prompt,
53
  "man_prompt": man_prompt,
 
 
54
  "batch_size": batch_size
55
  }
56
  )
@@ -66,61 +75,96 @@ async def generate_paris_images(product_name: str, image1_path: str, image2_path
66
  print(f"Progress: 100% - Generation completed in {processing_time:.2f} seconds")
67
  progress(1.0, desc=f"Generation completed in {processing_time:.2f} seconds")
68
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  # Return all generated image URLs and processing time
70
  # Get the first key from outputs dynamically
71
  return (
72
- [img["url"] for img in result["outputs"][next(iter(result["outputs"]))]["images"]] if "outputs" in result and result["outputs"] else [],
 
73
  f"Processing time: {processing_time:.2f} seconds"
74
  )
75
 
76
  def change_product_preview(product_name):
77
- if product_name == "Pose 1":
78
- return "Movie Pose Style/Option 1/image.png"
79
- elif product_name == "Pose 2":
80
- return "Movie Pose Style/Option 2/image.png"
81
- elif product_name == "Pose 3":
82
- return "Movie Pose Style/Option 3/image.png"
83
- elif product_name == "Pose 4":
84
- return "Movie Pose Style/Option 4/image.png"
85
- elif product_name == "Pose 5":
86
- return "Movie Pose Style/Option 5/image.png"
87
- elif product_name == "Pose 6":
88
- return "Movie Pose Style/Option 6/image.png"
 
 
89
 
90
  with gr.Blocks() as demo:
91
  with gr.Row():
92
- product_name = gr.Dropdown(label="Product Name", choices=["Pose 1", "Pose 2", "Pose 3", "Pose 4", "Pose 5", "Pose 6"], value="Pose 1")
93
- product_preview = gr.Image(label="Product Preview", type="filepath", value="Movie Pose Style/Option 1/image.png", height=500, width=500)
94
  with gr.Row():
95
  image1_input = gr.Image(label="Upload Woman Image", type="filepath", value="user3-f.jpg")
96
  image2_input = gr.Image(label="Upload Man Image", type="filepath", value="user3-m.jpg")
97
 
98
  with gr.Row():
99
- woman_prompt = gr.Textbox(
100
- label="Woman Prompt",
101
- value="Close-up, intimate portrait, a woman wearing a delicate pink floral embellished dress with a flowing tulle skirt, long blonde wavy hair cascading down her back, standing on the same snowy cobblestone street, the Eiffel Tower in the background, soft snowflakes falling around them, gentle streetlights casting a warm glow, her arms wrapped around her partner's neck, faces close together in an intimate moment, sharing a gentle smile."
102
- )
103
- man_prompt = gr.Textbox(
104
- label="Man Prompt",
105
- value="Close-up, intimate portrait, a man wearing a crisp white button-down shirt with rolled-up sleeves, khaki pants, standing on a snowy cobblestone street, the Eiffel Tower dusted with snow in the background, soft snowflakes falling around them, gentle streetlights casting a warm glow, his hands tenderly embracing his partner's waist, looking lovingly at her with a warm smile."
106
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
  batch_size = gr.Slider(minimum=1, maximum=8, value=4, step=1, label="Batch Size")
109
 
110
  generate_btn = gr.Button("Generate")
111
- image_output = gr.Gallery(label="Generated Image")
 
 
 
 
112
  time_output = gr.Textbox(label="Processing Time")
113
 
114
  generate_btn.click(
115
  fn=generate_paris_images,
116
- inputs=[product_name, image1_input, image2_input, woman_prompt, man_prompt, batch_size],
117
- outputs=[image_output, time_output]
118
  )
119
 
120
  product_name.change(
121
  fn=change_product_preview,
122
  inputs=[product_name],
123
- outputs=[product_preview]
124
  )
125
 
126
  if __name__ == "__main__":
 
5
  import os
6
  from pathlib import Path
7
  import time
8
+ import json
9
 
10
  load_dotenv()
11
  os.environ["FAL_KEY"] = os.getenv("FAL_API_KEY")
12
 
13
+ async def generate_paris_images(product_name: str, image1_path: str, image2_path: str, woman_prompt: str, man_prompt: str, girl_name: str, girl_hair_length: str, girl_hair_style: str, girl_hair_color: str, boy_name: str, boy_hair_length: str, boy_hair_style: str, boy_hair_color: str, batch_size: int, progress=gr.Progress()):
14
  start_time = time.time()
15
  print("Progress: 5% - Starting Paris image generation...")
16
  progress(0.05, desc="Starting Paris image generation...")
17
 
 
 
 
 
 
 
 
 
 
 
 
18
  # Upload all images in parallel
19
  upload_tasks = [
20
  fal_client.upload_file_async(str(image1_path)),
21
  fal_client.upload_file_async(str(image2_path)),
22
+ fal_client.upload_file_async("template/man_pose.png"),
23
+ fal_client.upload_file_async("template/woman_pose.png"),
24
+ fal_client.upload_file_async("template/woman_clip_mask.png"),
25
+ fal_client.upload_file_async("template/man_clip_mask.png")
26
  ]
27
 
28
+ [image1_url, image2_url, man_pose_img, woman_pose_img, woman_clip_mask, man_clip_mask] = await asyncio.gather(*upload_tasks)
29
 
30
  print("Progress: 40% - Uploaded all images")
31
  progress(0.4, desc="Uploaded all images")
32
 
33
+ # Replace {hair_feature} placeholders with user hair descriptions
34
+ woman_hair_desc = f"{girl_hair_length} {girl_hair_style} {girl_hair_color} hair,"
35
+ print(f"Final woman hair description: {woman_hair_desc}")
36
+
37
+ # Handle bald case for man's hair description
38
+ if boy_hair_length == "Bald":
39
+ man_hair_desc = "bald,"
40
+ else:
41
+ man_hair_desc = f"{boy_hair_length} {boy_hair_style} {boy_hair_color} hair,"
42
+ print(f"Final man hair description: {man_hair_desc}")
43
+
44
+ woman_prompt = woman_prompt.replace("{hair_feature}", woman_hair_desc)
45
+ man_prompt = man_prompt.replace("{hair_feature}", man_hair_desc)
46
+
47
+ print(f"Final woman prompt: {woman_prompt}")
48
+ print(f"Final man prompt: {man_prompt}")
49
+
50
  handler = await fal_client.submit_async(
51
  "comfy/LVE/paris-couple",
52
  arguments={
53
  "loadimage_1": image1_url,
54
  "loadimage_2": image2_url,
55
+ "loadimage_3": woman_pose_img,
56
+ "loadimage_4": woman_clip_mask,
57
+ "loadimage_5": man_clip_mask,
58
+ "loadimage_6": man_pose_img,
59
  "woman_prompt": woman_prompt,
60
  "man_prompt": man_prompt,
61
+ "girl_name": girl_name,
62
+ "boy_name": boy_name,
63
  "batch_size": batch_size
64
  }
65
  )
 
75
  print(f"Progress: 100% - Generation completed in {processing_time:.2f} seconds")
76
  progress(1.0, desc=f"Generation completed in {processing_time:.2f} seconds")
77
 
78
+ # Fix the URL extraction logic
79
+ image_215 = []
80
+ image_818 = []
81
+ if "outputs" in result:
82
+ if "215" in result["outputs"]:
83
+ image_215 = [img["url"] for img in result["outputs"]["215"]["images"]]
84
+ if "818" in result["outputs"]:
85
+ image_818 = [img["url"] for img in result["outputs"]["818"]["images"]]
86
+
87
+ print(f"Image 215: {image_215}")
88
+ print(f"Image 818: {image_818}")
89
+
90
  # Return all generated image URLs and processing time
91
  # Get the first key from outputs dynamically
92
  return (
93
+ image_215,
94
+ image_818,
95
  f"Processing time: {processing_time:.2f} seconds"
96
  )
97
 
98
  def change_product_preview(product_name):
99
+ # Load prompts from JSON file
100
+ with open('prompt.json', 'r') as f:
101
+ prompts = json.load(f)
102
+
103
+ # Find the matching prompt data
104
+ prompt_data = next((item for item in prompts if item['title'] == product_name), None)
105
+
106
+ if prompt_data:
107
+ return (
108
+ f"thumbnail/{product_name}.png",
109
+ prompt_data['woman'],
110
+ prompt_data['man']
111
+ )
112
+ return None, "", ""
113
 
114
  with gr.Blocks() as demo:
115
  with gr.Row():
116
+ product_name = gr.Dropdown(label="Product Name", choices=["Winter", "Classy", "Night Out", "Romantic"], value="Winter")
117
+ product_preview = gr.Image(label="Product Preview", type="filepath", value="thumbnail/Winter.png", height=500, width=500)
118
  with gr.Row():
119
  image1_input = gr.Image(label="Upload Woman Image", type="filepath", value="user3-f.jpg")
120
  image2_input = gr.Image(label="Upload Man Image", type="filepath", value="user3-m.jpg")
121
 
122
  with gr.Row():
123
+ with gr.Column():
124
+ woman_prompt = gr.Textbox(
125
+ label="Woman Prompt",
126
+ value="Close-up, portrait photo, a woman, {hair_feature} wearing a cream-colored wool coat, chunky knit scarf, and matching earmuffs, standing on the same snow-dusted cobblestone street, illuminated Eiffel Tower glowing golden in the background, snowflakes sparkling in the warm streetlight glow, looking at camera with gentle smile."
127
+ )
128
+ girl_name = gr.Textbox(
129
+ label="Girl Name",
130
+ value="julie delpy"
131
+ )
132
+ girl_hair_length = gr.Dropdown(label="Girl Hair Length", choices=["Short", "Medium", "Long"], value="Long")
133
+ girl_hair_style = gr.Dropdown(label="Girl Hair Style", choices=["Straight", "Wavy", "Curly"], value="Straight")
134
+ girl_hair_color = gr.Dropdown(label="Girl Hair Color", choices=["Blonde", "Brown", "Black", "Brunette", "Redhead", "Bronde"], value="Bronde")
135
+ with gr.Column():
136
+ man_prompt = gr.Textbox(
137
+ label="Man Prompt",
138
+ value="Close-up, portrait photo, a man, {hair_feature} wearing a dark navy wool peacoat, cashmere scarf, and leather gloves, standing on a snow-dusted cobblestone street, illuminated Eiffel Tower in the background glowing golden against the night sky, gentle snowflakes catching the warm glow of vintage streetlamps, looking at camera with confident expression."
139
+ )
140
+ boy_name = gr.Textbox(
141
+ label="Boy Name",
142
+ value="ethan hawke"
143
+ )
144
+ boy_hair_length = gr.Dropdown(label="Boy Hair Length", choices=["Short", "Medium", "Long", "Bald"], value="Short")
145
+ boy_hair_style = gr.Dropdown(label="Boy Hair Style", choices=["None", "Undercut", "Mullet", "French Crop", "Slicked Back", "Fade", "Buzz Cut"], value="Undercut")
146
+ boy_hair_color = gr.Dropdown(label="Boy Hair Color", choices=["None", "Blonde", "Brown", "Black", "Brunette", "Redhead"], value="Black")
147
 
148
  batch_size = gr.Slider(minimum=1, maximum=8, value=4, step=1, label="Batch Size")
149
 
150
  generate_btn = gr.Button("Generate")
151
+
152
+ with gr.Row():
153
+ image_output = gr.Gallery(label="Generated Image Raw")
154
+ image_output_processed = gr.Gallery(label="Generated Image Final")
155
+
156
  time_output = gr.Textbox(label="Processing Time")
157
 
158
  generate_btn.click(
159
  fn=generate_paris_images,
160
+ inputs=[product_name, image1_input, image2_input, woman_prompt, man_prompt, girl_name, girl_hair_length, girl_hair_style, girl_hair_color, boy_name, boy_hair_length, boy_hair_style, boy_hair_color, batch_size],
161
+ outputs=[image_output, image_output_processed, time_output]
162
  )
163
 
164
  product_name.change(
165
  fn=change_product_preview,
166
  inputs=[product_name],
167
+ outputs=[product_preview, woman_prompt, man_prompt]
168
  )
169
 
170
  if __name__ == "__main__":
prompt.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "title": "Winter",
4
+ "man": "Close-up, portrait photo, a man, {hair_feature} wearing a dark navy wool peacoat, cashmere scarf, and leather gloves, standing on a snow-dusted cobblestone street, illuminated Eiffel Tower in the background glowing golden against the night sky, gentle snowflakes catching the warm glow of vintage streetlamps, looking at camera with confident expression.",
5
+ "woman": "Close-up, portrait photo, a woman, {hair_feature} wearing a cream-colored wool coat, chunky knit scarf, and matching earmuffs, standing on the same snow-dusted cobblestone street, illuminated Eiffel Tower glowing golden in the background, snowflakes sparkling in the warm streetlight glow, looking at camera with gentle smile."
6
+ },
7
+ {
8
+ "title": "Classy",
9
+ "man": "Close-up, portrait photo, a man, {hair_feature} wearing a perfectly tailored black tuxedo with silk lapels and white pocket square, standing beneath ornate Art Nouveau streetlamps on Champs-Γ‰lysΓ©es, Eiffel Tower's golden lights twinkling in the distance, misty evening atmosphere, looking at camera with sophisticated expression.",
10
+ "woman": "Close-up, portrait photo, a woman, {hair_feature} wearing a floor-length black evening gown with delicate lace details and silk wrap, standing beneath the same ornate streetlamps, Eiffel Tower's golden lights sparkling behind, misty evening atmosphere, looking at camera with elegant poise."
11
+ },
12
+ {
13
+ "title": "Night Out",
14
+ "man": "Close-up, portrait photo, a man, {hair_feature} wearing a stylish casual outfit with dark fitted jeans and a well-tailored button-down shirt, standing on a charming Parisian street corner, Eiffel Tower illuminated against the night sky, warm streetlights creating ambient glow, looking at camera with relaxed confidence.",
15
+ "woman": "Close-up, portrait photo, a woman, {hair_feature} wearing a chic casual ensemble with high-waisted jeans and an elegant blouse, standing on the same charming street corner, illuminated Eiffel Tower in background, warm streetlights creating soft ambiance, looking at camera with casual sophistication."
16
+ },
17
+ {
18
+ "title": "Romantic",
19
+ "man": "Close-up, portrait photo, a man, {hair_feature} wearing a tailored navy double-breasted peacoat, burgundy cashmere sweater, and charcoal dress pants, standing on Pont Alexandre III bridge, ornate golden statues illuminated behind him, Eiffel Tower glowing majestically in the distance, nighttime Seine reflecting the bridge lights, looking at camera with charming expression.",
20
+ "woman": "Close-up, portrait photo, a woman, {hair_feature} wearing a plaid black and white blazer, red beret, flowing brown hair, and statement earrings, standing on the same ornate bridge, golden statues illuminated behind her, Eiffel Tower glowing in the distance, nighttime Seine reflecting the bridge lights, looking at camera with playful sophistication."
21
+ }
22
+ ]
Movie Pose Style/Option 6/clip-m.png β†’ template/man_clip_mask.png RENAMED
File without changes
Movie Pose Style/Option 6/man6.png β†’ template/man_pose.png RENAMED
File without changes
Movie Pose Style/Option 6/clip-f.png β†’ template/woman_clip_mask.png RENAMED
File without changes
Movie Pose Style/Option 6/woman6.png β†’ template/woman_pose.png RENAMED
File without changes
Movie Pose Style/Option 1/clip-f.png β†’ thumbnail/Classy.png RENAMED
File without changes
Movie Pose Style/Option 1/clip-m.png β†’ thumbnail/Night Out.png RENAMED
File without changes
Movie Pose Style/Option 1/image.png β†’ thumbnail/Romantic.png RENAMED
File without changes
Movie Pose Style/Option 1/man1.png β†’ thumbnail/Winter.png RENAMED
File without changes