Spaces:
Runtime error
Runtime error
update app
Browse files- example.py +50 -47
example.py
CHANGED
|
@@ -1,13 +1,16 @@
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
# Copyright (c) Alibaba, Inc. and its affiliates.
|
| 3 |
import os
|
| 4 |
-
|
| 5 |
from scepter.modules.utils.file_system import FS
|
| 6 |
|
| 7 |
|
| 8 |
def download_image(image, local_path=None):
|
| 9 |
if not FS.exists(local_path):
|
| 10 |
local_path = FS.get_from(image, local_path=local_path)
|
|
|
|
|
|
|
|
|
|
| 11 |
return local_path
|
| 12 |
|
| 13 |
|
|
@@ -18,49 +21,49 @@ def get_examples(cache_dir):
|
|
| 18 |
'Image Segmentation',
|
| 19 |
download_image(
|
| 20 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/db3ebaa81899.png?raw=true',
|
| 21 |
-
os.path.join(cache_dir, 'examples/db3ebaa81899.
|
| 22 |
None, '{image} Segmentation', 6666
|
| 23 |
],
|
| 24 |
[
|
| 25 |
'Depth Estimation',
|
| 26 |
download_image(
|
| 27 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/f1927c4692ba.png?raw=true',
|
| 28 |
-
os.path.join(cache_dir, 'examples/f1927c4692ba.
|
| 29 |
None, '{image} Depth Estimation', 6666
|
| 30 |
],
|
| 31 |
[
|
| 32 |
'Pose Estimation',
|
| 33 |
download_image(
|
| 34 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/014e5bf3b4d1.png?raw=true',
|
| 35 |
-
os.path.join(cache_dir, 'examples/014e5bf3b4d1.
|
| 36 |
None, '{image} distinguish the poses of the figures', 999999
|
| 37 |
],
|
| 38 |
[
|
| 39 |
'Scribble Extraction',
|
| 40 |
download_image(
|
| 41 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/5f59a202f8ac.png?raw=true',
|
| 42 |
-
os.path.join(cache_dir, 'examples/5f59a202f8ac.
|
| 43 |
None, 'Generate a scribble of {image}, please.', 6666
|
| 44 |
],
|
| 45 |
[
|
| 46 |
'Mosaic',
|
| 47 |
download_image(
|
| 48 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3a2f52361eea.png?raw=true',
|
| 49 |
-
os.path.join(cache_dir, 'examples/3a2f52361eea.
|
| 50 |
None, 'Adapt {image} into a mosaic representation.', 6666
|
| 51 |
],
|
| 52 |
[
|
| 53 |
'Edge map Extraction',
|
| 54 |
download_image(
|
| 55 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/b9d1e519d6e5.png?raw=true',
|
| 56 |
-
os.path.join(cache_dir, 'examples/b9d1e519d6e5.
|
| 57 |
None, 'Get the edge-enhanced result for {image}.', 6666
|
| 58 |
],
|
| 59 |
[
|
| 60 |
'Grayscale',
|
| 61 |
download_image(
|
| 62 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/c4ebbe2ba29b.png?raw=true',
|
| 63 |
-
os.path.join(cache_dir, 'examples/c4ebbe2ba29b.
|
| 64 |
None, 'transform {image} into a black and white one', 6666
|
| 65 |
],
|
| 66 |
[
|
|
@@ -68,7 +71,7 @@ def get_examples(cache_dir):
|
|
| 68 |
download_image(
|
| 69 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/19652d0f6c4b.png?raw=true',
|
| 70 |
os.path.join(cache_dir,
|
| 71 |
-
'examples/19652d0f6c4b.
|
| 72 |
'Would you be able to make a contour picture from {image} for me?',
|
| 73 |
6666
|
| 74 |
],
|
|
@@ -77,7 +80,7 @@ def get_examples(cache_dir):
|
|
| 77 |
download_image(
|
| 78 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/249cda2844b7.png?raw=true',
|
| 79 |
os.path.join(cache_dir,
|
| 80 |
-
'examples/249cda2844b7.
|
| 81 |
'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”.',
|
| 82 |
6666
|
| 83 |
],
|
|
@@ -86,7 +89,7 @@ def get_examples(cache_dir):
|
|
| 86 |
download_image(
|
| 87 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/411f6c4b8e6c.png?raw=true',
|
| 88 |
os.path.join(cache_dir,
|
| 89 |
-
'examples/411f6c4b8e6c.
|
| 90 |
'use the depth map {image} and the text caption "a cut white cat" to create a corresponding graphic image',
|
| 91 |
999999
|
| 92 |
],
|
|
@@ -95,7 +98,7 @@ def get_examples(cache_dir):
|
|
| 95 |
download_image(
|
| 96 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/a35c96ed137a.png?raw=true',
|
| 97 |
os.path.join(cache_dir,
|
| 98 |
-
'examples/a35c96ed137a.
|
| 99 |
'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."',
|
| 100 |
3599999
|
| 101 |
],
|
|
@@ -104,7 +107,7 @@ def get_examples(cache_dir):
|
|
| 104 |
download_image(
|
| 105 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/dcb2fc86f1ce.png?raw=true',
|
| 106 |
os.path.join(cache_dir,
|
| 107 |
-
'examples/dcb2fc86f1ce.
|
| 108 |
'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',
|
| 109 |
6666
|
| 110 |
],
|
|
@@ -113,7 +116,7 @@ def get_examples(cache_dir):
|
|
| 113 |
download_image(
|
| 114 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/4cd4ee494962.png?raw=true',
|
| 115 |
os.path.join(cache_dir,
|
| 116 |
-
'examples/4cd4ee494962.
|
| 117 |
'make this {image} colorful as per the "beautiful sunflowers"',
|
| 118 |
6666
|
| 119 |
],
|
|
@@ -122,7 +125,7 @@ def get_examples(cache_dir):
|
|
| 122 |
download_image(
|
| 123 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/a47e3a9cd166.png?raw=true',
|
| 124 |
os.path.join(cache_dir,
|
| 125 |
-
'examples/a47e3a9cd166.
|
| 126 |
'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.',
|
| 127 |
613725
|
| 128 |
],
|
|
@@ -131,7 +134,7 @@ def get_examples(cache_dir):
|
|
| 131 |
download_image(
|
| 132 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/d890ed8a3ac2.png?raw=true',
|
| 133 |
os.path.join(cache_dir,
|
| 134 |
-
'examples/d890ed8a3ac2.
|
| 135 |
'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."',
|
| 136 |
6666
|
| 137 |
],
|
|
@@ -140,7 +143,7 @@ def get_examples(cache_dir):
|
|
| 140 |
download_image(
|
| 141 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/131ca90fd2a9.png?raw=true',
|
| 142 |
os.path.join(cache_dir,
|
| 143 |
-
'examples/131ca90fd2a9.
|
| 144 |
'"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}.',
|
| 145 |
613725
|
| 146 |
],
|
|
@@ -149,7 +152,7 @@ def get_examples(cache_dir):
|
|
| 149 |
download_image(
|
| 150 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/0844a686a179.png?raw=true',
|
| 151 |
os.path.join(cache_dir,
|
| 152 |
-
'examples/0844a686a179.
|
| 153 |
'Eliminate noise interference in {image} and maximize the crispness to obtain superior high-definition quality',
|
| 154 |
6666
|
| 155 |
],
|
|
@@ -157,11 +160,11 @@ def get_examples(cache_dir):
|
|
| 157 |
'Inpainting',
|
| 158 |
download_image(
|
| 159 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/fa91b6b7e59b.png?raw=true',
|
| 160 |
-
os.path.join(cache_dir, 'examples/fa91b6b7e59b.
|
| 161 |
download_image(
|
| 162 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/fa91b6b7e59b_mask.png?raw=true',
|
| 163 |
os.path.join(cache_dir,
|
| 164 |
-
'examples/fa91b6b7e59b_mask.
|
| 165 |
'Ensure to overhaul the parts of the {image} indicated by the mask.',
|
| 166 |
6666
|
| 167 |
],
|
|
@@ -169,11 +172,11 @@ def get_examples(cache_dir):
|
|
| 169 |
'Inpainting',
|
| 170 |
download_image(
|
| 171 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/632899695b26.png?raw=true',
|
| 172 |
-
os.path.join(cache_dir, 'examples/632899695b26.
|
| 173 |
download_image(
|
| 174 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/632899695b26_mask.png?raw=true',
|
| 175 |
os.path.join(cache_dir,
|
| 176 |
-
'examples/632899695b26_mask.
|
| 177 |
'Refashion the mask portion of {image} in accordance with "A yellow egg with a smiling face painted on it"',
|
| 178 |
6666
|
| 179 |
],
|
|
@@ -181,11 +184,11 @@ def get_examples(cache_dir):
|
|
| 181 |
'Outpainting',
|
| 182 |
download_image(
|
| 183 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/f2b22c08be3f.png?raw=true',
|
| 184 |
-
os.path.join(cache_dir, 'examples/f2b22c08be3f.
|
| 185 |
download_image(
|
| 186 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/f2b22c08be3f_mask.png?raw=true',
|
| 187 |
os.path.join(cache_dir,
|
| 188 |
-
'examples/f2b22c08be3f_mask.
|
| 189 |
'Could the {image} be widened within the space designated by mask, while retaining the original?',
|
| 190 |
6666
|
| 191 |
],
|
|
@@ -194,7 +197,7 @@ def get_examples(cache_dir):
|
|
| 194 |
download_image(
|
| 195 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/354d17594afe.png?raw=true',
|
| 196 |
os.path.join(cache_dir,
|
| 197 |
-
'examples/354d17594afe.
|
| 198 |
'{image} change the dog\'s posture to walking in the water, and change the background to green plants and a pond.',
|
| 199 |
6666
|
| 200 |
],
|
|
@@ -203,7 +206,7 @@ def get_examples(cache_dir):
|
|
| 203 |
download_image(
|
| 204 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/38946455752b.png?raw=true',
|
| 205 |
os.path.join(cache_dir,
|
| 206 |
-
'examples/38946455752b.
|
| 207 |
'{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',
|
| 208 |
6669
|
| 209 |
],
|
|
@@ -212,7 +215,7 @@ def get_examples(cache_dir):
|
|
| 212 |
download_image(
|
| 213 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3ba5202f0cd8.png?raw=true',
|
| 214 |
os.path.join(cache_dir,
|
| 215 |
-
'examples/3ba5202f0cd8.
|
| 216 |
'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.',
|
| 217 |
99999
|
| 218 |
],
|
|
@@ -220,25 +223,25 @@ def get_examples(cache_dir):
|
|
| 220 |
'Facial Editing',
|
| 221 |
download_image(
|
| 222 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/369365b94725.png?raw=true',
|
| 223 |
-
os.path.join(cache_dir, 'examples/369365b94725.
|
| 224 |
None, '{image} Make her looking at the camera', 6666
|
| 225 |
],
|
| 226 |
[
|
| 227 |
'Facial Editing',
|
| 228 |
download_image(
|
| 229 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/92751f2e4a0e.png?raw=true',
|
| 230 |
-
os.path.join(cache_dir, 'examples/92751f2e4a0e.
|
| 231 |
None, '{image} Remove the smile from his face', 9899999
|
| 232 |
],
|
| 233 |
[
|
| 234 |
'Render Text',
|
| 235 |
download_image(
|
| 236 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/33e9f27c2c48.png?raw=true',
|
| 237 |
-
os.path.join(cache_dir, 'examples/33e9f27c2c48.
|
| 238 |
download_image(
|
| 239 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/33e9f27c2c48_mask.png?raw=true',
|
| 240 |
os.path.join(cache_dir,
|
| 241 |
-
'examples/33e9f27c2c48_mask.
|
| 242 |
'Put the text "C A T" at the position marked by mask in the {image}',
|
| 243 |
6666
|
| 244 |
],
|
|
@@ -246,18 +249,18 @@ def get_examples(cache_dir):
|
|
| 246 |
'Remove Text',
|
| 247 |
download_image(
|
| 248 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/8530a6711b2e.png?raw=true',
|
| 249 |
-
os.path.join(cache_dir, 'examples/8530a6711b2e.
|
| 250 |
None, 'Aim to remove any textual element in {image}', 6666
|
| 251 |
],
|
| 252 |
[
|
| 253 |
'Remove Text',
|
| 254 |
download_image(
|
| 255 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/c4d7fb28f8f6.png?raw=true',
|
| 256 |
-
os.path.join(cache_dir, 'examples/c4d7fb28f8f6.
|
| 257 |
download_image(
|
| 258 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/c4d7fb28f8f6_mask.png?raw=true',
|
| 259 |
os.path.join(cache_dir,
|
| 260 |
-
'examples/c4d7fb28f8f6_mask.
|
| 261 |
'Rub out any text found in the mask sector of the {image}.', 6666
|
| 262 |
],
|
| 263 |
[
|
|
@@ -265,7 +268,7 @@ def get_examples(cache_dir):
|
|
| 265 |
download_image(
|
| 266 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/e2f318fa5e5b.png?raw=true',
|
| 267 |
os.path.join(cache_dir,
|
| 268 |
-
'examples/e2f318fa5e5b.
|
| 269 |
'Remove the unicorn in this {image}, ensuring a smooth edit.',
|
| 270 |
99999
|
| 271 |
],
|
|
@@ -273,65 +276,65 @@ def get_examples(cache_dir):
|
|
| 273 |
'Remove Object',
|
| 274 |
download_image(
|
| 275 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/1ae96d8aca00.png?raw=true',
|
| 276 |
-
os.path.join(cache_dir, 'examples/1ae96d8aca00.
|
| 277 |
download_image(
|
| 278 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/1ae96d8aca00_mask.png?raw=true',
|
| 279 |
-
os.path.join(cache_dir, 'examples/1ae96d8aca00_mask.
|
| 280 |
None, 'Discard the contents of the mask area from {image}.', 99999
|
| 281 |
],
|
| 282 |
[
|
| 283 |
'Add Object',
|
| 284 |
download_image(
|
| 285 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/80289f48e511.png?raw=true',
|
| 286 |
-
os.path.join(cache_dir, 'examples/80289f48e511.
|
| 287 |
download_image(
|
| 288 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/80289f48e511_mask.png?raw=true',
|
| 289 |
os.path.join(cache_dir,
|
| 290 |
-
'examples/80289f48e511_mask.
|
| 291 |
'add a Hot Air Balloon into the {image}, per the mask', 613725
|
| 292 |
],
|
| 293 |
[
|
| 294 |
'Style Transfer',
|
| 295 |
download_image(
|
| 296 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/d725cb2009e8.png?raw=true',
|
| 297 |
-
os.path.join(cache_dir, 'examples/d725cb2009e8.
|
| 298 |
None, 'Change the style of {image} to colored pencil style', 99999
|
| 299 |
],
|
| 300 |
[
|
| 301 |
'Style Transfer',
|
| 302 |
download_image(
|
| 303 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/e0f48b3fd010.png?raw=true',
|
| 304 |
-
os.path.join(cache_dir, 'examples/e0f48b3fd010.
|
| 305 |
None, 'make {image} to Walt Disney Animation style', 99999
|
| 306 |
],
|
| 307 |
[
|
| 308 |
'Style Transfer',
|
| 309 |
download_image(
|
| 310 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/9e73e7eeef55.png?raw=true',
|
| 311 |
-
os.path.join(cache_dir, 'examples/9e73e7eeef55.
|
| 312 |
download_image(
|
| 313 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/2e02975293d6.png?raw=true',
|
| 314 |
-
os.path.join(cache_dir, 'examples/2e02975293d6.
|
| 315 |
'edit {image} based on the style of {image1} ', 99999
|
| 316 |
],
|
| 317 |
[
|
| 318 |
'Try On',
|
| 319 |
download_image(
|
| 320 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/ee4ca60b8c96.png?raw=true',
|
| 321 |
-
os.path.join(cache_dir, 'examples/ee4ca60b8c96.
|
| 322 |
download_image(
|
| 323 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/ee4ca60b8c96_mask.png?raw=true',
|
| 324 |
-
os.path.join(cache_dir, 'examples/ee4ca60b8c96_mask.
|
| 325 |
download_image(
|
| 326 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/ebe825bbfe3c.png?raw=true',
|
| 327 |
-
os.path.join(cache_dir, 'examples/ebe825bbfe3c.
|
| 328 |
'Change the cloth in {image} to the one in {image1}', 99999
|
| 329 |
],
|
| 330 |
[
|
| 331 |
'Workflow',
|
| 332 |
download_image(
|
| 333 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/cb85353c004b.png?raw=true',
|
| 334 |
-
os.path.join(cache_dir, 'examples/cb85353c004b.
|
| 335 |
None, '<workflow> ice cream {image}', 99999
|
| 336 |
],
|
| 337 |
]
|
|
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
# Copyright (c) Alibaba, Inc. and its affiliates.
|
| 3 |
import os
|
| 4 |
+
from PIL import Image
|
| 5 |
from scepter.modules.utils.file_system import FS
|
| 6 |
|
| 7 |
|
| 8 |
def download_image(image, local_path=None):
|
| 9 |
if not FS.exists(local_path):
|
| 10 |
local_path = FS.get_from(image, local_path=local_path)
|
| 11 |
+
if local_path.split(".")[-1] in ['jpg', 'jpeg']:
|
| 12 |
+
im = Image.open(local_path).convert("RGB")
|
| 13 |
+
im.save(local_path, format='JPEG')
|
| 14 |
return local_path
|
| 15 |
|
| 16 |
|
|
|
|
| 21 |
'Image Segmentation',
|
| 22 |
download_image(
|
| 23 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/db3ebaa81899.png?raw=true',
|
| 24 |
+
os.path.join(cache_dir, 'examples/db3ebaa81899.jpg')), None,
|
| 25 |
None, '{image} Segmentation', 6666
|
| 26 |
],
|
| 27 |
[
|
| 28 |
'Depth Estimation',
|
| 29 |
download_image(
|
| 30 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/f1927c4692ba.png?raw=true',
|
| 31 |
+
os.path.join(cache_dir, 'examples/f1927c4692ba.jpg')), None,
|
| 32 |
None, '{image} Depth Estimation', 6666
|
| 33 |
],
|
| 34 |
[
|
| 35 |
'Pose Estimation',
|
| 36 |
download_image(
|
| 37 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/014e5bf3b4d1.png?raw=true',
|
| 38 |
+
os.path.join(cache_dir, 'examples/014e5bf3b4d1.jpg')), None,
|
| 39 |
None, '{image} distinguish the poses of the figures', 999999
|
| 40 |
],
|
| 41 |
[
|
| 42 |
'Scribble Extraction',
|
| 43 |
download_image(
|
| 44 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/5f59a202f8ac.png?raw=true',
|
| 45 |
+
os.path.join(cache_dir, 'examples/5f59a202f8ac.jpg')), None,
|
| 46 |
None, 'Generate a scribble of {image}, please.', 6666
|
| 47 |
],
|
| 48 |
[
|
| 49 |
'Mosaic',
|
| 50 |
download_image(
|
| 51 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3a2f52361eea.png?raw=true',
|
| 52 |
+
os.path.join(cache_dir, 'examples/3a2f52361eea.jpg')), None,
|
| 53 |
None, 'Adapt {image} into a mosaic representation.', 6666
|
| 54 |
],
|
| 55 |
[
|
| 56 |
'Edge map Extraction',
|
| 57 |
download_image(
|
| 58 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/b9d1e519d6e5.png?raw=true',
|
| 59 |
+
os.path.join(cache_dir, 'examples/b9d1e519d6e5.jpg')), None,
|
| 60 |
None, 'Get the edge-enhanced result for {image}.', 6666
|
| 61 |
],
|
| 62 |
[
|
| 63 |
'Grayscale',
|
| 64 |
download_image(
|
| 65 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/c4ebbe2ba29b.png?raw=true',
|
| 66 |
+
os.path.join(cache_dir, 'examples/c4ebbe2ba29b.jpg')), None,
|
| 67 |
None, 'transform {image} into a black and white one', 6666
|
| 68 |
],
|
| 69 |
[
|
|
|
|
| 71 |
download_image(
|
| 72 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/19652d0f6c4b.png?raw=true',
|
| 73 |
os.path.join(cache_dir,
|
| 74 |
+
'examples/19652d0f6c4b.jpg')), None, None,
|
| 75 |
'Would you be able to make a contour picture from {image} for me?',
|
| 76 |
6666
|
| 77 |
],
|
|
|
|
| 80 |
download_image(
|
| 81 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/249cda2844b7.png?raw=true',
|
| 82 |
os.path.join(cache_dir,
|
| 83 |
+
'examples/249cda2844b7.jpg')), None, None,
|
| 84 |
'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”.',
|
| 85 |
6666
|
| 86 |
],
|
|
|
|
| 89 |
download_image(
|
| 90 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/411f6c4b8e6c.png?raw=true',
|
| 91 |
os.path.join(cache_dir,
|
| 92 |
+
'examples/411f6c4b8e6c.jpg')), None, None,
|
| 93 |
'use the depth map {image} and the text caption "a cut white cat" to create a corresponding graphic image',
|
| 94 |
999999
|
| 95 |
],
|
|
|
|
| 98 |
download_image(
|
| 99 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/a35c96ed137a.png?raw=true',
|
| 100 |
os.path.join(cache_dir,
|
| 101 |
+
'examples/a35c96ed137a.jpg')), None, None,
|
| 102 |
'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."',
|
| 103 |
3599999
|
| 104 |
],
|
|
|
|
| 107 |
download_image(
|
| 108 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/dcb2fc86f1ce.png?raw=true',
|
| 109 |
os.path.join(cache_dir,
|
| 110 |
+
'examples/dcb2fc86f1ce.jpg')), None, None,
|
| 111 |
'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',
|
| 112 |
6666
|
| 113 |
],
|
|
|
|
| 116 |
download_image(
|
| 117 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/4cd4ee494962.png?raw=true',
|
| 118 |
os.path.join(cache_dir,
|
| 119 |
+
'examples/4cd4ee494962.jpg')), None, None,
|
| 120 |
'make this {image} colorful as per the "beautiful sunflowers"',
|
| 121 |
6666
|
| 122 |
],
|
|
|
|
| 125 |
download_image(
|
| 126 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/a47e3a9cd166.png?raw=true',
|
| 127 |
os.path.join(cache_dir,
|
| 128 |
+
'examples/a47e3a9cd166.jpg')), None, None,
|
| 129 |
'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.',
|
| 130 |
613725
|
| 131 |
],
|
|
|
|
| 134 |
download_image(
|
| 135 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/d890ed8a3ac2.png?raw=true',
|
| 136 |
os.path.join(cache_dir,
|
| 137 |
+
'examples/d890ed8a3ac2.jpg')), None, None,
|
| 138 |
'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."',
|
| 139 |
6666
|
| 140 |
],
|
|
|
|
| 143 |
download_image(
|
| 144 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/131ca90fd2a9.png?raw=true',
|
| 145 |
os.path.join(cache_dir,
|
| 146 |
+
'examples/131ca90fd2a9.jpg')), None, None,
|
| 147 |
'"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}.',
|
| 148 |
613725
|
| 149 |
],
|
|
|
|
| 152 |
download_image(
|
| 153 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/0844a686a179.png?raw=true',
|
| 154 |
os.path.join(cache_dir,
|
| 155 |
+
'examples/0844a686a179.jpg')), None, None,
|
| 156 |
'Eliminate noise interference in {image} and maximize the crispness to obtain superior high-definition quality',
|
| 157 |
6666
|
| 158 |
],
|
|
|
|
| 160 |
'Inpainting',
|
| 161 |
download_image(
|
| 162 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/fa91b6b7e59b.png?raw=true',
|
| 163 |
+
os.path.join(cache_dir, 'examples/fa91b6b7e59b.jpg')),
|
| 164 |
download_image(
|
| 165 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/fa91b6b7e59b_mask.png?raw=true',
|
| 166 |
os.path.join(cache_dir,
|
| 167 |
+
'examples/fa91b6b7e59b_mask.jpg')), None,
|
| 168 |
'Ensure to overhaul the parts of the {image} indicated by the mask.',
|
| 169 |
6666
|
| 170 |
],
|
|
|
|
| 172 |
'Inpainting',
|
| 173 |
download_image(
|
| 174 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/632899695b26.png?raw=true',
|
| 175 |
+
os.path.join(cache_dir, 'examples/632899695b26.jpg')),
|
| 176 |
download_image(
|
| 177 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/632899695b26_mask.png?raw=true',
|
| 178 |
os.path.join(cache_dir,
|
| 179 |
+
'examples/632899695b26_mask.jpg')), None,
|
| 180 |
'Refashion the mask portion of {image} in accordance with "A yellow egg with a smiling face painted on it"',
|
| 181 |
6666
|
| 182 |
],
|
|
|
|
| 184 |
'Outpainting',
|
| 185 |
download_image(
|
| 186 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/f2b22c08be3f.png?raw=true',
|
| 187 |
+
os.path.join(cache_dir, 'examples/f2b22c08be3f.jpg')),
|
| 188 |
download_image(
|
| 189 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/f2b22c08be3f_mask.png?raw=true',
|
| 190 |
os.path.join(cache_dir,
|
| 191 |
+
'examples/f2b22c08be3f_mask.jpg')), None,
|
| 192 |
'Could the {image} be widened within the space designated by mask, while retaining the original?',
|
| 193 |
6666
|
| 194 |
],
|
|
|
|
| 197 |
download_image(
|
| 198 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/354d17594afe.png?raw=true',
|
| 199 |
os.path.join(cache_dir,
|
| 200 |
+
'examples/354d17594afe.jpg')), None, None,
|
| 201 |
'{image} change the dog\'s posture to walking in the water, and change the background to green plants and a pond.',
|
| 202 |
6666
|
| 203 |
],
|
|
|
|
| 206 |
download_image(
|
| 207 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/38946455752b.png?raw=true',
|
| 208 |
os.path.join(cache_dir,
|
| 209 |
+
'examples/38946455752b.jpg')), None, None,
|
| 210 |
'{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',
|
| 211 |
6669
|
| 212 |
],
|
|
|
|
| 215 |
download_image(
|
| 216 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/3ba5202f0cd8.png?raw=true',
|
| 217 |
os.path.join(cache_dir,
|
| 218 |
+
'examples/3ba5202f0cd8.jpg')), None, None,
|
| 219 |
'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.',
|
| 220 |
99999
|
| 221 |
],
|
|
|
|
| 223 |
'Facial Editing',
|
| 224 |
download_image(
|
| 225 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/369365b94725.png?raw=true',
|
| 226 |
+
os.path.join(cache_dir, 'examples/369365b94725.jpg')), None,
|
| 227 |
None, '{image} Make her looking at the camera', 6666
|
| 228 |
],
|
| 229 |
[
|
| 230 |
'Facial Editing',
|
| 231 |
download_image(
|
| 232 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/92751f2e4a0e.png?raw=true',
|
| 233 |
+
os.path.join(cache_dir, 'examples/92751f2e4a0e.jpg')), None,
|
| 234 |
None, '{image} Remove the smile from his face', 9899999
|
| 235 |
],
|
| 236 |
[
|
| 237 |
'Render Text',
|
| 238 |
download_image(
|
| 239 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/33e9f27c2c48.png?raw=true',
|
| 240 |
+
os.path.join(cache_dir, 'examples/33e9f27c2c48.jpg')),
|
| 241 |
download_image(
|
| 242 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/33e9f27c2c48_mask.png?raw=true',
|
| 243 |
os.path.join(cache_dir,
|
| 244 |
+
'examples/33e9f27c2c48_mask.jpg')), None,
|
| 245 |
'Put the text "C A T" at the position marked by mask in the {image}',
|
| 246 |
6666
|
| 247 |
],
|
|
|
|
| 249 |
'Remove Text',
|
| 250 |
download_image(
|
| 251 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/8530a6711b2e.png?raw=true',
|
| 252 |
+
os.path.join(cache_dir, 'examples/8530a6711b2e.jpg')), None,
|
| 253 |
None, 'Aim to remove any textual element in {image}', 6666
|
| 254 |
],
|
| 255 |
[
|
| 256 |
'Remove Text',
|
| 257 |
download_image(
|
| 258 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/c4d7fb28f8f6.png?raw=true',
|
| 259 |
+
os.path.join(cache_dir, 'examples/c4d7fb28f8f6.jpg')),
|
| 260 |
download_image(
|
| 261 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/c4d7fb28f8f6_mask.png?raw=true',
|
| 262 |
os.path.join(cache_dir,
|
| 263 |
+
'examples/c4d7fb28f8f6_mask.jpg')), None,
|
| 264 |
'Rub out any text found in the mask sector of the {image}.', 6666
|
| 265 |
],
|
| 266 |
[
|
|
|
|
| 268 |
download_image(
|
| 269 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/e2f318fa5e5b.png?raw=true',
|
| 270 |
os.path.join(cache_dir,
|
| 271 |
+
'examples/e2f318fa5e5b.jpg')), None, None,
|
| 272 |
'Remove the unicorn in this {image}, ensuring a smooth edit.',
|
| 273 |
99999
|
| 274 |
],
|
|
|
|
| 276 |
'Remove Object',
|
| 277 |
download_image(
|
| 278 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/1ae96d8aca00.png?raw=true',
|
| 279 |
+
os.path.join(cache_dir, 'examples/1ae96d8aca00.jpg')),
|
| 280 |
download_image(
|
| 281 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/1ae96d8aca00_mask.png?raw=true',
|
| 282 |
+
os.path.join(cache_dir, 'examples/1ae96d8aca00_mask.jpg')),
|
| 283 |
None, 'Discard the contents of the mask area from {image}.', 99999
|
| 284 |
],
|
| 285 |
[
|
| 286 |
'Add Object',
|
| 287 |
download_image(
|
| 288 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/80289f48e511.png?raw=true',
|
| 289 |
+
os.path.join(cache_dir, 'examples/80289f48e511.jpg')),
|
| 290 |
download_image(
|
| 291 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/80289f48e511_mask.png?raw=true',
|
| 292 |
os.path.join(cache_dir,
|
| 293 |
+
'examples/80289f48e511_mask.jpg')), None,
|
| 294 |
'add a Hot Air Balloon into the {image}, per the mask', 613725
|
| 295 |
],
|
| 296 |
[
|
| 297 |
'Style Transfer',
|
| 298 |
download_image(
|
| 299 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/d725cb2009e8.png?raw=true',
|
| 300 |
+
os.path.join(cache_dir, 'examples/d725cb2009e8.jpg')), None,
|
| 301 |
None, 'Change the style of {image} to colored pencil style', 99999
|
| 302 |
],
|
| 303 |
[
|
| 304 |
'Style Transfer',
|
| 305 |
download_image(
|
| 306 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/e0f48b3fd010.png?raw=true',
|
| 307 |
+
os.path.join(cache_dir, 'examples/e0f48b3fd010.jpg')), None,
|
| 308 |
None, 'make {image} to Walt Disney Animation style', 99999
|
| 309 |
],
|
| 310 |
[
|
| 311 |
'Style Transfer',
|
| 312 |
download_image(
|
| 313 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/9e73e7eeef55.png?raw=true',
|
| 314 |
+
os.path.join(cache_dir, 'examples/9e73e7eeef55.jpg')), None,
|
| 315 |
download_image(
|
| 316 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/2e02975293d6.png?raw=true',
|
| 317 |
+
os.path.join(cache_dir, 'examples/2e02975293d6.jpg')),
|
| 318 |
'edit {image} based on the style of {image1} ', 99999
|
| 319 |
],
|
| 320 |
[
|
| 321 |
'Try On',
|
| 322 |
download_image(
|
| 323 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/ee4ca60b8c96.png?raw=true',
|
| 324 |
+
os.path.join(cache_dir, 'examples/ee4ca60b8c96.jpg')),
|
| 325 |
download_image(
|
| 326 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/ee4ca60b8c96_mask.png?raw=true',
|
| 327 |
+
os.path.join(cache_dir, 'examples/ee4ca60b8c96_mask.jpg')),
|
| 328 |
download_image(
|
| 329 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/ebe825bbfe3c.png?raw=true',
|
| 330 |
+
os.path.join(cache_dir, 'examples/ebe825bbfe3c.jpg')),
|
| 331 |
'Change the cloth in {image} to the one in {image1}', 99999
|
| 332 |
],
|
| 333 |
[
|
| 334 |
'Workflow',
|
| 335 |
download_image(
|
| 336 |
'https://github.com/ali-vilab/ace-page/blob/main/assets/examples/cb85353c004b.png?raw=true',
|
| 337 |
+
os.path.join(cache_dir, 'examples/cb85353c004b.jpg')), None,
|
| 338 |
None, '<workflow> ice cream {image}', 99999
|
| 339 |
],
|
| 340 |
]
|