Spaces:
Running
on
Zero
Running
on
Zero
chaojiemao
commited on
Commit
•
c84281f
1
Parent(s):
9f254e0
Update example.py
Browse files- example.py +60 -56
example.py
CHANGED
@@ -13,44 +13,48 @@ def download_image(image, local_path=None):
|
|
13 |
im.save(local_path, format='JPEG')
|
14 |
return local_path
|
15 |
|
|
|
|
|
|
|
16 |
|
17 |
def get_examples(cache_dir):
|
18 |
print('Downloading Examples ...')
|
|
|
19 |
examples = [
|
20 |
[
|
21 |
'Facial Editing',
|
22 |
download_image(
|
23 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/e33edc106953.png?raw=true',
|
24 |
-
os.path.join(cache_dir, 'examples/e33edc106953.jpg')),
|
25 |
-
|
26 |
],
|
27 |
[
|
28 |
'Facial Editing',
|
29 |
download_image(
|
30 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/5d2bcc91a3e9.png?raw=true',
|
31 |
-
os.path.join(cache_dir, 'examples/5d2bcc91a3e9.jpg')),
|
32 |
-
|
33 |
],
|
34 |
[
|
35 |
'Facial Editing',
|
36 |
download_image(
|
37 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3a52eac708bd.png?raw=true',
|
38 |
-
os.path.join(cache_dir, 'examples/3a52eac708bd.jpg')),
|
39 |
-
|
40 |
],
|
41 |
[
|
42 |
'Facial Editing',
|
43 |
download_image(
|
44 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3f4dc464a0ea.png?raw=true',
|
45 |
-
os.path.join(cache_dir, 'examples/3f4dc464a0ea.jpg')),
|
46 |
-
|
47 |
],
|
48 |
[
|
49 |
'Controllable Generation',
|
50 |
download_image(
|
51 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/131ca90fd2a9.png?raw=true',
|
52 |
os.path.join(cache_dir,
|
53 |
-
'examples/131ca90fd2a9.jpg')),
|
54 |
'"A person sits contemplatively on the ground, surrounded by falling autumn leaves. Dressed in a green sweater and dark blue pants, they rest their chin on their hand, exuding a relaxed demeanor. Their stylish checkered slip-on shoes add a touch of flair, while a black purse lies in their lap. The backdrop of muted brown enhances the warm, cozy atmosphere of the scene." , generate the image that corresponds to the given scribble {image}.',
|
55 |
613725
|
56 |
],
|
@@ -62,7 +66,7 @@ def get_examples(cache_dir):
|
|
62 |
download_image(
|
63 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/33e9f27c2c48_mask.png?raw=true',
|
64 |
os.path.join(cache_dir,
|
65 |
-
'examples/33e9f27c2c48_mask.jpg')),
|
66 |
'Put the text "C A T" at the position marked by mask in the {image}',
|
67 |
6666
|
68 |
],
|
@@ -70,7 +74,7 @@ def get_examples(cache_dir):
|
|
70 |
'Style Transfer',
|
71 |
download_image(
|
72 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/9e73e7eeef55.png?raw=true',
|
73 |
-
os.path.join(cache_dir, 'examples/9e73e7eeef55.jpg')),
|
74 |
download_image(
|
75 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/2e02975293d6.png?raw=true',
|
76 |
os.path.join(cache_dir, 'examples/2e02975293d6.jpg')),
|
@@ -84,7 +88,7 @@ def get_examples(cache_dir):
|
|
84 |
download_image(
|
85 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/f2b22c08be3f_mask.png?raw=true',
|
86 |
os.path.join(cache_dir,
|
87 |
-
'examples/f2b22c08be3f_mask.jpg')),
|
88 |
'Could the {image} be widened within the space designated by mask, while retaining the original?',
|
89 |
6666
|
90 |
],
|
@@ -92,57 +96,57 @@ def get_examples(cache_dir):
|
|
92 |
'Image Segmentation',
|
93 |
download_image(
|
94 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/db3ebaa81899.png?raw=true',
|
95 |
-
os.path.join(cache_dir, 'examples/db3ebaa81899.jpg')),
|
96 |
-
|
97 |
],
|
98 |
[
|
99 |
'Depth Estimation',
|
100 |
download_image(
|
101 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/f1927c4692ba.png?raw=true',
|
102 |
-
os.path.join(cache_dir, 'examples/f1927c4692ba.jpg')),
|
103 |
-
|
104 |
],
|
105 |
[
|
106 |
'Pose Estimation',
|
107 |
download_image(
|
108 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/014e5bf3b4d1.png?raw=true',
|
109 |
-
os.path.join(cache_dir, 'examples/014e5bf3b4d1.jpg')),
|
110 |
-
|
111 |
],
|
112 |
[
|
113 |
'Scribble Extraction',
|
114 |
download_image(
|
115 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/5f59a202f8ac.png?raw=true',
|
116 |
-
os.path.join(cache_dir, 'examples/5f59a202f8ac.jpg')),
|
117 |
-
|
118 |
],
|
119 |
[
|
120 |
'Mosaic',
|
121 |
download_image(
|
122 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3a2f52361eea.png?raw=true',
|
123 |
-
os.path.join(cache_dir, 'examples/3a2f52361eea.jpg')),
|
124 |
-
|
125 |
],
|
126 |
[
|
127 |
'Edge map Extraction',
|
128 |
download_image(
|
129 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/b9d1e519d6e5.png?raw=true',
|
130 |
-
os.path.join(cache_dir, 'examples/b9d1e519d6e5.jpg')),
|
131 |
-
|
132 |
],
|
133 |
[
|
134 |
'Grayscale',
|
135 |
download_image(
|
136 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/c4ebbe2ba29b.png?raw=true',
|
137 |
-
os.path.join(cache_dir, 'examples/c4ebbe2ba29b.jpg')),
|
138 |
-
|
139 |
],
|
140 |
[
|
141 |
'Contour Extraction',
|
142 |
download_image(
|
143 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/19652d0f6c4b.png?raw=true',
|
144 |
os.path.join(cache_dir,
|
145 |
-
'examples/19652d0f6c4b.jpg')),
|
146 |
'Would you be able to make a contour picture from {image} for me?',
|
147 |
6666
|
148 |
],
|
@@ -151,7 +155,7 @@ def get_examples(cache_dir):
|
|
151 |
download_image(
|
152 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/249cda2844b7.png?raw=true',
|
153 |
os.path.join(cache_dir,
|
154 |
-
'examples/249cda2844b7.jpg')),
|
155 |
'Following the segmentation outcome in mask of {image}, develop a real-life image using the explanatory note in "a mighty cat lying on the bed”.',
|
156 |
6666
|
157 |
],
|
@@ -160,7 +164,7 @@ def get_examples(cache_dir):
|
|
160 |
download_image(
|
161 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/411f6c4b8e6c.png?raw=true',
|
162 |
os.path.join(cache_dir,
|
163 |
-
'examples/411f6c4b8e6c.jpg')),
|
164 |
'use the depth map {image} and the text caption "a cut white cat" to create a corresponding graphic image',
|
165 |
999999
|
166 |
],
|
@@ -169,7 +173,7 @@ def get_examples(cache_dir):
|
|
169 |
download_image(
|
170 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/a35c96ed137a.png?raw=true',
|
171 |
os.path.join(cache_dir,
|
172 |
-
'examples/a35c96ed137a.jpg')),
|
173 |
'help translate this posture schema {image} into a colored image based on the context I provided "A beautiful woman Climbing the climbing wall, wearing a harness and climbing gear, skillfully maneuvering up the wall with her back to the camera, with a safety rope."',
|
174 |
3599999
|
175 |
],
|
@@ -178,7 +182,7 @@ def get_examples(cache_dir):
|
|
178 |
download_image(
|
179 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/dcb2fc86f1ce.png?raw=true',
|
180 |
os.path.join(cache_dir,
|
181 |
-
'examples/dcb2fc86f1ce.jpg')),
|
182 |
'Transform and generate an image using mosaic {image} and "Monarch butterflies gracefully perch on vibrant purple flowers, showcasing their striking orange and black wings in a lush garden setting." description',
|
183 |
6666
|
184 |
],
|
@@ -187,7 +191,7 @@ def get_examples(cache_dir):
|
|
187 |
download_image(
|
188 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/4cd4ee494962.png?raw=true',
|
189 |
os.path.join(cache_dir,
|
190 |
-
'examples/4cd4ee494962.jpg')),
|
191 |
'make this {image} colorful as per the "beautiful sunflowers"',
|
192 |
6666
|
193 |
],
|
@@ -196,7 +200,7 @@ def get_examples(cache_dir):
|
|
196 |
download_image(
|
197 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/a47e3a9cd166.png?raw=true',
|
198 |
os.path.join(cache_dir,
|
199 |
-
'examples/a47e3a9cd166.jpg')),
|
200 |
'Take the edge conscious {image} and the written guideline "A whimsical animated character is depicted holding a delectable cake adorned with blue and white frosting and a drizzle of chocolate. The character wears a yellow headband with a bow, matching a cozy yellow sweater. Her dark hair is styled in a braid, tied with a yellow ribbon. With a golden fork in hand, she stands ready to enjoy a slice, exuding an air of joyful anticipation. The scene is creatively rendered with a charming and playful aesthetic." and produce a realistic image.',
|
201 |
613725
|
202 |
],
|
@@ -205,7 +209,7 @@ def get_examples(cache_dir):
|
|
205 |
download_image(
|
206 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/d890ed8a3ac2.png?raw=true',
|
207 |
os.path.join(cache_dir,
|
208 |
-
'examples/d890ed8a3ac2.jpg')),
|
209 |
'creating a vivid image based on {image} and description "This image features a delicious rectangular tart with a flaky, golden-brown crust. The tart is topped with evenly sliced tomatoes, layered over a creamy cheese filling. Aromatic herbs are sprinkled on top, adding a touch of green and enhancing the visual appeal. The background includes a soft, textured fabric and scattered white flowers, creating an elegant and inviting presentation. Bright red tomatoes in the upper right corner hint at the fresh ingredients used in the dish."',
|
210 |
6666
|
211 |
],
|
@@ -214,7 +218,7 @@ def get_examples(cache_dir):
|
|
214 |
download_image(
|
215 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/0844a686a179.png?raw=true',
|
216 |
os.path.join(cache_dir,
|
217 |
-
'examples/0844a686a179.jpg')),
|
218 |
'Eliminate noise interference in {image} and maximize the crispness to obtain superior high-definition quality',
|
219 |
6666
|
220 |
],
|
@@ -226,7 +230,7 @@ def get_examples(cache_dir):
|
|
226 |
download_image(
|
227 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/fa91b6b7e59b_mask.png?raw=true',
|
228 |
os.path.join(cache_dir,
|
229 |
-
'examples/fa91b6b7e59b_mask.jpg')),
|
230 |
'Ensure to overhaul the parts of the {image} indicated by the mask.',
|
231 |
6666
|
232 |
],
|
@@ -238,7 +242,7 @@ def get_examples(cache_dir):
|
|
238 |
download_image(
|
239 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/632899695b26_mask.png?raw=true',
|
240 |
os.path.join(cache_dir,
|
241 |
-
'examples/632899695b26_mask.jpg')),
|
242 |
'Refashion the mask portion of {image} in accordance with "A yellow egg with a smiling face painted on it"',
|
243 |
6666
|
244 |
],
|
@@ -247,7 +251,7 @@ def get_examples(cache_dir):
|
|
247 |
download_image(
|
248 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/354d17594afe.png?raw=true',
|
249 |
os.path.join(cache_dir,
|
250 |
-
'examples/354d17594afe.jpg')),
|
251 |
'{image} change the dog\'s posture to walking in the water, and change the background to green plants and a pond.',
|
252 |
6666
|
253 |
],
|
@@ -256,7 +260,7 @@ def get_examples(cache_dir):
|
|
256 |
download_image(
|
257 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/38946455752b.png?raw=true',
|
258 |
os.path.join(cache_dir,
|
259 |
-
'examples/38946455752b.jpg')),
|
260 |
'{image} change the color of the dress from white to red and the model\'s hair color red brown to blonde.Other parts remain unchanged',
|
261 |
6669
|
262 |
],
|
@@ -265,7 +269,7 @@ def get_examples(cache_dir):
|
|
265 |
download_image(
|
266 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3ba5202f0cd8.png?raw=true',
|
267 |
os.path.join(cache_dir,
|
268 |
-
'examples/3ba5202f0cd8.jpg')),
|
269 |
'Keep the same facial feature in @3ba5202f0cd8, change the woman\'s clothing from a Blue denim jacket to a white turtleneck sweater and adjust her posture so that she is supporting her chin with both hands. Other aspects, such as background, hairstyle, facial expression, etc, remain unchanged.',
|
270 |
99999
|
271 |
],
|
@@ -273,22 +277,22 @@ def get_examples(cache_dir):
|
|
273 |
'Facial Editing',
|
274 |
download_image(
|
275 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/369365b94725.png?raw=true',
|
276 |
-
os.path.join(cache_dir, 'examples/369365b94725.jpg')),
|
277 |
-
|
278 |
],
|
279 |
[
|
280 |
'Facial Editing',
|
281 |
download_image(
|
282 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/92751f2e4a0e.png?raw=true',
|
283 |
-
os.path.join(cache_dir, 'examples/92751f2e4a0e.jpg')),
|
284 |
-
|
285 |
],
|
286 |
[
|
287 |
'Remove Text',
|
288 |
download_image(
|
289 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/8530a6711b2e.png?raw=true',
|
290 |
-
os.path.join(cache_dir, 'examples/8530a6711b2e.jpg')),
|
291 |
-
|
292 |
],
|
293 |
[
|
294 |
'Remove Text',
|
@@ -298,7 +302,7 @@ def get_examples(cache_dir):
|
|
298 |
download_image(
|
299 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/c4d7fb28f8f6_mask.png?raw=true',
|
300 |
os.path.join(cache_dir,
|
301 |
-
'examples/c4d7fb28f8f6_mask.jpg')),
|
302 |
'Rub out any text found in the mask sector of the {image}.', 6666
|
303 |
],
|
304 |
[
|
@@ -306,7 +310,7 @@ def get_examples(cache_dir):
|
|
306 |
download_image(
|
307 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/e2f318fa5e5b.png?raw=true',
|
308 |
os.path.join(cache_dir,
|
309 |
-
'examples/e2f318fa5e5b.jpg')),
|
310 |
'Remove the unicorn in this {image}, ensuring a smooth edit.',
|
311 |
99999
|
312 |
],
|
@@ -318,7 +322,7 @@ def get_examples(cache_dir):
|
|
318 |
download_image(
|
319 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/1ae96d8aca00_mask.png?raw=true',
|
320 |
os.path.join(cache_dir, 'examples/1ae96d8aca00_mask.jpg')),
|
321 |
-
|
322 |
],
|
323 |
[
|
324 |
'Add Object',
|
@@ -328,22 +332,22 @@ def get_examples(cache_dir):
|
|
328 |
download_image(
|
329 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/80289f48e511_mask.png?raw=true',
|
330 |
os.path.join(cache_dir,
|
331 |
-
'examples/80289f48e511_mask.jpg')),
|
332 |
'add a Hot Air Balloon into the {image}, per the mask', 613725
|
333 |
],
|
334 |
[
|
335 |
'Style Transfer',
|
336 |
download_image(
|
337 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/d725cb2009e8.png?raw=true',
|
338 |
-
os.path.join(cache_dir, 'examples/d725cb2009e8.jpg')),
|
339 |
-
|
340 |
],
|
341 |
[
|
342 |
'Style Transfer',
|
343 |
download_image(
|
344 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/e0f48b3fd010.png?raw=true',
|
345 |
-
os.path.join(cache_dir, 'examples/e0f48b3fd010.jpg')),
|
346 |
-
|
347 |
],
|
348 |
[
|
349 |
'Try On',
|
@@ -362,8 +366,8 @@ def get_examples(cache_dir):
|
|
362 |
'Workflow',
|
363 |
download_image(
|
364 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/cb85353c004b.png?raw=true',
|
365 |
-
os.path.join(cache_dir, 'examples/cb85353c004b.jpg')),
|
366 |
-
|
367 |
],
|
368 |
]
|
369 |
print('Finish. Start building UI ...')
|
|
|
13 |
im.save(local_path, format='JPEG')
|
14 |
return local_path
|
15 |
|
16 |
+
def blank_image():
|
17 |
+
return Image.new('RGBA', (128, 128), (0, 0, 0, 0))
|
18 |
+
|
19 |
|
20 |
def get_examples(cache_dir):
|
21 |
print('Downloading Examples ...')
|
22 |
+
bl_img = blank_image()
|
23 |
examples = [
|
24 |
[
|
25 |
'Facial Editing',
|
26 |
download_image(
|
27 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/e33edc106953.png?raw=true',
|
28 |
+
os.path.join(cache_dir, 'examples/e33edc106953.jpg')), bl_img,
|
29 |
+
bl_img, '{image} let the man smile', 6666
|
30 |
],
|
31 |
[
|
32 |
'Facial Editing',
|
33 |
download_image(
|
34 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/5d2bcc91a3e9.png?raw=true',
|
35 |
+
os.path.join(cache_dir, 'examples/5d2bcc91a3e9.jpg')), bl_img,
|
36 |
+
bl_img, 'let the man in {image} wear sunglasses', 9999
|
37 |
],
|
38 |
[
|
39 |
'Facial Editing',
|
40 |
download_image(
|
41 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3a52eac708bd.png?raw=true',
|
42 |
+
os.path.join(cache_dir, 'examples/3a52eac708bd.jpg')), bl_img,
|
43 |
+
bl_img, '{image} red hair', 9999
|
44 |
],
|
45 |
[
|
46 |
'Facial Editing',
|
47 |
download_image(
|
48 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3f4dc464a0ea.png?raw=true',
|
49 |
+
os.path.join(cache_dir, 'examples/3f4dc464a0ea.jpg')), bl_img,
|
50 |
+
bl_img, '{image} let the man serious', 99999
|
51 |
],
|
52 |
[
|
53 |
'Controllable Generation',
|
54 |
download_image(
|
55 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/131ca90fd2a9.png?raw=true',
|
56 |
os.path.join(cache_dir,
|
57 |
+
'examples/131ca90fd2a9.jpg')), bl_img, bl_img,
|
58 |
'"A person sits contemplatively on the ground, surrounded by falling autumn leaves. Dressed in a green sweater and dark blue pants, they rest their chin on their hand, exuding a relaxed demeanor. Their stylish checkered slip-on shoes add a touch of flair, while a black purse lies in their lap. The backdrop of muted brown enhances the warm, cozy atmosphere of the scene." , generate the image that corresponds to the given scribble {image}.',
|
59 |
613725
|
60 |
],
|
|
|
66 |
download_image(
|
67 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/33e9f27c2c48_mask.png?raw=true',
|
68 |
os.path.join(cache_dir,
|
69 |
+
'examples/33e9f27c2c48_mask.jpg')), bl_img,
|
70 |
'Put the text "C A T" at the position marked by mask in the {image}',
|
71 |
6666
|
72 |
],
|
|
|
74 |
'Style Transfer',
|
75 |
download_image(
|
76 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/9e73e7eeef55.png?raw=true',
|
77 |
+
os.path.join(cache_dir, 'examples/9e73e7eeef55.jpg')), bl_img,
|
78 |
download_image(
|
79 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/2e02975293d6.png?raw=true',
|
80 |
os.path.join(cache_dir, 'examples/2e02975293d6.jpg')),
|
|
|
88 |
download_image(
|
89 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/f2b22c08be3f_mask.png?raw=true',
|
90 |
os.path.join(cache_dir,
|
91 |
+
'examples/f2b22c08be3f_mask.jpg')), bl_img,
|
92 |
'Could the {image} be widened within the space designated by mask, while retaining the original?',
|
93 |
6666
|
94 |
],
|
|
|
96 |
'Image Segmentation',
|
97 |
download_image(
|
98 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/db3ebaa81899.png?raw=true',
|
99 |
+
os.path.join(cache_dir, 'examples/db3ebaa81899.jpg')), bl_img,
|
100 |
+
bl_img, '{image} Segmentation', 6666
|
101 |
],
|
102 |
[
|
103 |
'Depth Estimation',
|
104 |
download_image(
|
105 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/f1927c4692ba.png?raw=true',
|
106 |
+
os.path.join(cache_dir, 'examples/f1927c4692ba.jpg')), bl_img,
|
107 |
+
bl_img, '{image} Depth Estimation', 6666
|
108 |
],
|
109 |
[
|
110 |
'Pose Estimation',
|
111 |
download_image(
|
112 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/014e5bf3b4d1.png?raw=true',
|
113 |
+
os.path.join(cache_dir, 'examples/014e5bf3b4d1.jpg')), bl_img,
|
114 |
+
bl_img, '{image} distinguish the poses of the figures', 999999
|
115 |
],
|
116 |
[
|
117 |
'Scribble Extraction',
|
118 |
download_image(
|
119 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/5f59a202f8ac.png?raw=true',
|
120 |
+
os.path.join(cache_dir, 'examples/5f59a202f8ac.jpg')), bl_img,
|
121 |
+
bl_img, 'Generate a scribble of {image}, please.', 6666
|
122 |
],
|
123 |
[
|
124 |
'Mosaic',
|
125 |
download_image(
|
126 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3a2f52361eea.png?raw=true',
|
127 |
+
os.path.join(cache_dir, 'examples/3a2f52361eea.jpg')), bl_img,
|
128 |
+
bl_img, 'Adapt {image} into a mosaic representation.', 6666
|
129 |
],
|
130 |
[
|
131 |
'Edge map Extraction',
|
132 |
download_image(
|
133 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/b9d1e519d6e5.png?raw=true',
|
134 |
+
os.path.join(cache_dir, 'examples/b9d1e519d6e5.jpg')), bl_img,
|
135 |
+
bl_img, 'Get the edge-enhanced result for {image}.', 6666
|
136 |
],
|
137 |
[
|
138 |
'Grayscale',
|
139 |
download_image(
|
140 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/c4ebbe2ba29b.png?raw=true',
|
141 |
+
os.path.join(cache_dir, 'examples/c4ebbe2ba29b.jpg')), bl_img,
|
142 |
+
bl_img, 'transform {image} into a black and white one', 6666
|
143 |
],
|
144 |
[
|
145 |
'Contour Extraction',
|
146 |
download_image(
|
147 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/19652d0f6c4b.png?raw=true',
|
148 |
os.path.join(cache_dir,
|
149 |
+
'examples/19652d0f6c4b.jpg')), bl_img, bl_img,
|
150 |
'Would you be able to make a contour picture from {image} for me?',
|
151 |
6666
|
152 |
],
|
|
|
155 |
download_image(
|
156 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/249cda2844b7.png?raw=true',
|
157 |
os.path.join(cache_dir,
|
158 |
+
'examples/249cda2844b7.jpg')), bl_img, bl_img,
|
159 |
'Following the segmentation outcome in mask of {image}, develop a real-life image using the explanatory note in "a mighty cat lying on the bed”.',
|
160 |
6666
|
161 |
],
|
|
|
164 |
download_image(
|
165 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/411f6c4b8e6c.png?raw=true',
|
166 |
os.path.join(cache_dir,
|
167 |
+
'examples/411f6c4b8e6c.jpg')), bl_img, bl_img,
|
168 |
'use the depth map {image} and the text caption "a cut white cat" to create a corresponding graphic image',
|
169 |
999999
|
170 |
],
|
|
|
173 |
download_image(
|
174 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/a35c96ed137a.png?raw=true',
|
175 |
os.path.join(cache_dir,
|
176 |
+
'examples/a35c96ed137a.jpg')), bl_img, bl_img,
|
177 |
'help translate this posture schema {image} into a colored image based on the context I provided "A beautiful woman Climbing the climbing wall, wearing a harness and climbing gear, skillfully maneuvering up the wall with her back to the camera, with a safety rope."',
|
178 |
3599999
|
179 |
],
|
|
|
182 |
download_image(
|
183 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/dcb2fc86f1ce.png?raw=true',
|
184 |
os.path.join(cache_dir,
|
185 |
+
'examples/dcb2fc86f1ce.jpg')), bl_img, bl_img,
|
186 |
'Transform and generate an image using mosaic {image} and "Monarch butterflies gracefully perch on vibrant purple flowers, showcasing their striking orange and black wings in a lush garden setting." description',
|
187 |
6666
|
188 |
],
|
|
|
191 |
download_image(
|
192 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/4cd4ee494962.png?raw=true',
|
193 |
os.path.join(cache_dir,
|
194 |
+
'examples/4cd4ee494962.jpg')), bl_img, bl_img,
|
195 |
'make this {image} colorful as per the "beautiful sunflowers"',
|
196 |
6666
|
197 |
],
|
|
|
200 |
download_image(
|
201 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/a47e3a9cd166.png?raw=true',
|
202 |
os.path.join(cache_dir,
|
203 |
+
'examples/a47e3a9cd166.jpg')), bl_img, bl_img,
|
204 |
'Take the edge conscious {image} and the written guideline "A whimsical animated character is depicted holding a delectable cake adorned with blue and white frosting and a drizzle of chocolate. The character wears a yellow headband with a bow, matching a cozy yellow sweater. Her dark hair is styled in a braid, tied with a yellow ribbon. With a golden fork in hand, she stands ready to enjoy a slice, exuding an air of joyful anticipation. The scene is creatively rendered with a charming and playful aesthetic." and produce a realistic image.',
|
205 |
613725
|
206 |
],
|
|
|
209 |
download_image(
|
210 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/d890ed8a3ac2.png?raw=true',
|
211 |
os.path.join(cache_dir,
|
212 |
+
'examples/d890ed8a3ac2.jpg')), bl_img, bl_img,
|
213 |
'creating a vivid image based on {image} and description "This image features a delicious rectangular tart with a flaky, golden-brown crust. The tart is topped with evenly sliced tomatoes, layered over a creamy cheese filling. Aromatic herbs are sprinkled on top, adding a touch of green and enhancing the visual appeal. The background includes a soft, textured fabric and scattered white flowers, creating an elegant and inviting presentation. Bright red tomatoes in the upper right corner hint at the fresh ingredients used in the dish."',
|
214 |
6666
|
215 |
],
|
|
|
218 |
download_image(
|
219 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/0844a686a179.png?raw=true',
|
220 |
os.path.join(cache_dir,
|
221 |
+
'examples/0844a686a179.jpg')), bl_img, bl_img,
|
222 |
'Eliminate noise interference in {image} and maximize the crispness to obtain superior high-definition quality',
|
223 |
6666
|
224 |
],
|
|
|
230 |
download_image(
|
231 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/fa91b6b7e59b_mask.png?raw=true',
|
232 |
os.path.join(cache_dir,
|
233 |
+
'examples/fa91b6b7e59b_mask.jpg')), bl_img,
|
234 |
'Ensure to overhaul the parts of the {image} indicated by the mask.',
|
235 |
6666
|
236 |
],
|
|
|
242 |
download_image(
|
243 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/632899695b26_mask.png?raw=true',
|
244 |
os.path.join(cache_dir,
|
245 |
+
'examples/632899695b26_mask.jpg')), bl_img,
|
246 |
'Refashion the mask portion of {image} in accordance with "A yellow egg with a smiling face painted on it"',
|
247 |
6666
|
248 |
],
|
|
|
251 |
download_image(
|
252 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/354d17594afe.png?raw=true',
|
253 |
os.path.join(cache_dir,
|
254 |
+
'examples/354d17594afe.jpg')), bl_img, bl_img,
|
255 |
'{image} change the dog\'s posture to walking in the water, and change the background to green plants and a pond.',
|
256 |
6666
|
257 |
],
|
|
|
260 |
download_image(
|
261 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/38946455752b.png?raw=true',
|
262 |
os.path.join(cache_dir,
|
263 |
+
'examples/38946455752b.jpg')), bl_img, bl_img,
|
264 |
'{image} change the color of the dress from white to red and the model\'s hair color red brown to blonde.Other parts remain unchanged',
|
265 |
6669
|
266 |
],
|
|
|
269 |
download_image(
|
270 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3ba5202f0cd8.png?raw=true',
|
271 |
os.path.join(cache_dir,
|
272 |
+
'examples/3ba5202f0cd8.jpg')), bl_img, bl_img,
|
273 |
'Keep the same facial feature in @3ba5202f0cd8, change the woman\'s clothing from a Blue denim jacket to a white turtleneck sweater and adjust her posture so that she is supporting her chin with both hands. Other aspects, such as background, hairstyle, facial expression, etc, remain unchanged.',
|
274 |
99999
|
275 |
],
|
|
|
277 |
'Facial Editing',
|
278 |
download_image(
|
279 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/369365b94725.png?raw=true',
|
280 |
+
os.path.join(cache_dir, 'examples/369365b94725.jpg')), bl_img,
|
281 |
+
bl_img, '{image} Make her looking at the camera', 6666
|
282 |
],
|
283 |
[
|
284 |
'Facial Editing',
|
285 |
download_image(
|
286 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/92751f2e4a0e.png?raw=true',
|
287 |
+
os.path.join(cache_dir, 'examples/92751f2e4a0e.jpg')), bl_img,
|
288 |
+
bl_img, '{image} Remove the smile from his face', 9899999
|
289 |
],
|
290 |
[
|
291 |
'Remove Text',
|
292 |
download_image(
|
293 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/8530a6711b2e.png?raw=true',
|
294 |
+
os.path.join(cache_dir, 'examples/8530a6711b2e.jpg')), bl_img,
|
295 |
+
bl_img, 'Aim to remove any textual element in {image}', 6666
|
296 |
],
|
297 |
[
|
298 |
'Remove Text',
|
|
|
302 |
download_image(
|
303 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/c4d7fb28f8f6_mask.png?raw=true',
|
304 |
os.path.join(cache_dir,
|
305 |
+
'examples/c4d7fb28f8f6_mask.jpg')), bl_img,
|
306 |
'Rub out any text found in the mask sector of the {image}.', 6666
|
307 |
],
|
308 |
[
|
|
|
310 |
download_image(
|
311 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/e2f318fa5e5b.png?raw=true',
|
312 |
os.path.join(cache_dir,
|
313 |
+
'examples/e2f318fa5e5b.jpg')), bl_img, bl_img,
|
314 |
'Remove the unicorn in this {image}, ensuring a smooth edit.',
|
315 |
99999
|
316 |
],
|
|
|
322 |
download_image(
|
323 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/1ae96d8aca00_mask.png?raw=true',
|
324 |
os.path.join(cache_dir, 'examples/1ae96d8aca00_mask.jpg')),
|
325 |
+
bl_img, 'Discard the contents of the mask area from {image}.', 99999
|
326 |
],
|
327 |
[
|
328 |
'Add Object',
|
|
|
332 |
download_image(
|
333 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/80289f48e511_mask.png?raw=true',
|
334 |
os.path.join(cache_dir,
|
335 |
+
'examples/80289f48e511_mask.jpg')), bl_img,
|
336 |
'add a Hot Air Balloon into the {image}, per the mask', 613725
|
337 |
],
|
338 |
[
|
339 |
'Style Transfer',
|
340 |
download_image(
|
341 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/d725cb2009e8.png?raw=true',
|
342 |
+
os.path.join(cache_dir, 'examples/d725cb2009e8.jpg')), bl_img,
|
343 |
+
bl_img, 'Change the style of {image} to colored pencil style', 99999
|
344 |
],
|
345 |
[
|
346 |
'Style Transfer',
|
347 |
download_image(
|
348 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/e0f48b3fd010.png?raw=true',
|
349 |
+
os.path.join(cache_dir, 'examples/e0f48b3fd010.jpg')), bl_img,
|
350 |
+
bl_img, 'make {image} to Walt Disney Animation style', 99999
|
351 |
],
|
352 |
[
|
353 |
'Try On',
|
|
|
366 |
'Workflow',
|
367 |
download_image(
|
368 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/cb85353c004b.png?raw=true',
|
369 |
+
os.path.join(cache_dir, 'examples/cb85353c004b.jpg')), bl_img,
|
370 |
+
bl_img, '<workflow> ice cream {image}', 99999
|
371 |
],
|
372 |
]
|
373 |
print('Finish. Start building UI ...')
|