Spaces:
Sleeping
Sleeping
Add image files using Git LFS
Browse files- Movie Pose Style/Option 1/woman1.png +0 -3
- Movie Pose Style/Option 2/clip-f.png +0 -3
- Movie Pose Style/Option 2/clip-m.png +0 -3
- Movie Pose Style/Option 2/image.png +0 -3
- Movie Pose Style/Option 2/man2.png +0 -3
- Movie Pose Style/Option 2/woman2.png +0 -3
- Movie Pose Style/Option 3/clip-f.png +0 -3
- Movie Pose Style/Option 3/clip-m.png +0 -3
- Movie Pose Style/Option 3/image.png +0 -3
- Movie Pose Style/Option 3/man3.png +0 -3
- Movie Pose Style/Option 3/woman3.png +0 -3
- Movie Pose Style/Option 4/clip-f.png +0 -3
- Movie Pose Style/Option 4/clip-m.png +0 -3
- Movie Pose Style/Option 4/image.png +0 -3
- Movie Pose Style/Option 4/man4.png +0 -3
- Movie Pose Style/Option 4/woman4.png +0 -3
- Movie Pose Style/Option 5/clip-f.png +0 -3
- Movie Pose Style/Option 5/clip-m.png +0 -3
- Movie Pose Style/Option 5/image.png +0 -3
- Movie Pose Style/Option 5/man5.png +0 -3
- Movie Pose Style/Option 5/woman5.png +0 -3
- Movie Pose Style/Option 6/image.png +0 -3
- app copy.py +0 -94
- app.py +92 -48
- prompt.json +22 -0
- Movie Pose Style/Option 6/clip-m.png β template/man_clip_mask.png +0 -0
- Movie Pose Style/Option 6/man6.png β template/man_pose.png +0 -0
- Movie Pose Style/Option 6/clip-f.png β template/woman_clip_mask.png +0 -0
- Movie Pose Style/Option 6/woman6.png β template/woman_pose.png +0 -0
- Movie Pose Style/Option 1/clip-f.png β thumbnail/Classy.png +2 -2
- Movie Pose Style/Option 1/clip-m.png β thumbnail/Night Out.png +2 -2
- Movie Pose Style/Option 1/image.png β thumbnail/Romantic.png +2 -2
- Movie Pose Style/Option 1/man1.png β thumbnail/Winter.png +2 -2
Movie Pose Style/Option 1/woman1.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 2/clip-f.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 2/clip-m.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 2/image.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 2/man2.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 2/woman2.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 3/clip-f.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 3/clip-m.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 3/image.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 3/man3.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 3/woman3.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 4/clip-f.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 4/clip-m.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 4/image.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 4/man4.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 4/woman4.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 5/clip-f.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 5/clip-m.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 5/image.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 5/man5.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 5/woman5.png
DELETED
Git LFS Details
|
Movie Pose Style/Option 6/image.png
DELETED
Git LFS Details
|
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(
|
33 |
-
fal_client.upload_file_async(
|
34 |
-
fal_client.upload_file_async(
|
35 |
-
fal_client.upload_file_async(
|
36 |
]
|
37 |
|
38 |
-
[image1_url, image2_url,
|
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":
|
49 |
-
"loadimage_4":
|
50 |
-
"loadimage_5":
|
51 |
-
"loadimage_6":
|
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 |
-
|
|
|
73 |
f"Processing time: {processing_time:.2f} seconds"
|
74 |
)
|
75 |
|
76 |
def change_product_preview(product_name):
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
|
|
89 |
|
90 |
with gr.Blocks() as demo:
|
91 |
with gr.Row():
|
92 |
-
product_name = gr.Dropdown(label="Product Name", choices=["
|
93 |
-
product_preview = gr.Image(label="Product Preview", type="filepath", value="
|
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 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
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
|