Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files- data/0011772.jpg +0 -0
- data/Snow-covered_trees_with_sunlight_shining_through.jpg +0 -0
- data/a_black_SUV_driving_down_a_highway_with_a_scenic_view_of_mountains_and_water_in_the_background._The_.jpg +0 -0
- data/a_bustling_city_street_at_night,_with_a_double-decker_bus_driving_down_the_road._There_are_several_c.jpg +0 -0
- hf_demo.py +24 -1
- hf_demo_test.ipynb +150 -18
data/0011772.jpg
ADDED
|
data/Snow-covered_trees_with_sunlight_shining_through.jpg
ADDED
|
data/a_black_SUV_driving_down_a_highway_with_a_scenic_view_of_mountains_and_water_in_the_background._The_.jpg
ADDED
|
data/a_bustling_city_street_at_night,_with_a_double-decker_bus_driving_down_the_road._There_are_several_c.jpg
ADDED
|
hf_demo.py
CHANGED
|
@@ -115,7 +115,7 @@ with block:
|
|
| 115 |
gr.Markdown("(More features in development...)")
|
| 116 |
with gr.Row():
|
| 117 |
text = gr.Textbox(
|
| 118 |
-
label="
|
| 119 |
max_lines=10,
|
| 120 |
placeholder="Enter your prompt (long and detailed would be better)",
|
| 121 |
container=True,
|
|
@@ -231,5 +231,28 @@ with block:
|
|
| 231 |
gr.on([btn_style_ori.click], demo_inference_stylization_ori, inputs=[gallery_stylization_ref, text, seed, steps, scale, start_timestep], outputs=gallery_stylization_ori)
|
| 232 |
gr.on([btn_style_art.click], demo_inference_stylization_artistic, inputs=[gallery_stylization_ref, adapter_choice, text, seed, steps, scale, adapter_scale, start_timestep], outputs=gallery_stylization_art)
|
| 233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
block.launch()
|
| 235 |
# block.launch(sharing=True)
|
|
|
|
| 115 |
gr.Markdown("(More features in development...)")
|
| 116 |
with gr.Row():
|
| 117 |
text = gr.Textbox(
|
| 118 |
+
label="Prompt (long and detailed would be better):",
|
| 119 |
max_lines=10,
|
| 120 |
placeholder="Enter your prompt (long and detailed would be better)",
|
| 121 |
container=True,
|
|
|
|
| 231 |
gr.on([btn_style_ori.click], demo_inference_stylization_ori, inputs=[gallery_stylization_ref, text, seed, steps, scale, start_timestep], outputs=gallery_stylization_ori)
|
| 232 |
gr.on([btn_style_art.click], demo_inference_stylization_artistic, inputs=[gallery_stylization_ref, adapter_choice, text, seed, steps, scale, adapter_scale, start_timestep], outputs=gallery_stylization_art)
|
| 233 |
|
| 234 |
+
examples = gr.Examples(
|
| 235 |
+
examples=[
|
| 236 |
+
["Snow-covered trees with sunlight shining through",
|
| 237 |
+
"data/Snow-covered_trees_with_sunlight_shining_through.jpg"
|
| 238 |
+
],
|
| 239 |
+
["A picturesque landscape showcasing a winding river cutting through a lush green valley, surrounded by rugged mountains under a clear blue sky. The mix of red and brown tones in the rocky hills adds to the region's natural beauty and diversity.",
|
| 240 |
+
"data/0011772.jpg"],
|
| 241 |
+
["a black SUV driving down a highway with a scenic view of mountains and water in the background. The SUV is the main focus of the image, and it appears to be traveling at a moderate speed. The road is well-maintained and provides a smooth driving experience. The mountains and water create a picturesque backdrop, adding to the overall beauty of the scene. The image captures the essence of a leisurely road trip, with the SUV as the primary subject, highlighting the sense of adventure and exploration that comes with such journeys.",
|
| 242 |
+
"data/a_black_SUV_driving_down_a_highway_with_a_scenic_view_of_mountains_and_water_in_the_background._The_.jpg"
|
| 243 |
+
],
|
| 244 |
+
[
|
| 245 |
+
"A blue bench situated in a park, surrounded by trees and leaves. The bench is positioned under a tree, providing shade and a peaceful atmosphere. There are several benches in the park, with one being closer to the foreground and the others further in the background. A person can be seen in the distance, possibly enjoying the park or taking a walk. The overall scene is serene and inviting, with the bench serving as a focal point in the park's landscape.",
|
| 246 |
+
"data/003904765.jpg"
|
| 247 |
+
]
|
| 248 |
+
|
| 249 |
+
],
|
| 250 |
+
inputs=[
|
| 251 |
+
text,
|
| 252 |
+
gallery_stylization_ref
|
| 253 |
+
],
|
| 254 |
+
# cache_examples=True,
|
| 255 |
+
)
|
| 256 |
+
|
| 257 |
block.launch()
|
| 258 |
# block.launch(sharing=True)
|
hf_demo_test.ipynb
CHANGED
|
@@ -72,7 +72,7 @@
|
|
| 72 |
{
|
| 73 |
"data": {
|
| 74 |
"application/vnd.jupyter.widget-view+json": {
|
| 75 |
-
"model_id": "
|
| 76 |
"version_major": 2,
|
| 77 |
"version_minor": 0
|
| 78 |
},
|
|
@@ -197,7 +197,7 @@
|
|
| 197 |
},
|
| 198 |
{
|
| 199 |
"cell_type": "code",
|
| 200 |
-
"execution_count":
|
| 201 |
"id": "aa33e9d104023847",
|
| 202 |
"metadata": {
|
| 203 |
"ExecuteTime": {
|
|
@@ -210,10 +210,8 @@
|
|
| 210 |
"name": "stdout",
|
| 211 |
"output_type": "stream",
|
| 212 |
"text": [
|
| 213 |
-
"Running on local URL: http://127.0.0.1:
|
| 214 |
-
"\n",
|
| 215 |
-
"Thanks for being a Gradio user! If you have questions or feedback, please join our Discord server and chat with us: https://discord.gg/feTf9x3ZSB\n",
|
| 216 |
-
"Running on public URL: https://0fd0c028b349b76a72.gradio.live\n",
|
| 217 |
"\n",
|
| 218 |
"This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
|
| 219 |
]
|
|
@@ -221,7 +219,7 @@
|
|
| 221 |
{
|
| 222 |
"data": {
|
| 223 |
"text/html": [
|
| 224 |
-
"<div><iframe src=\"https://
|
| 225 |
],
|
| 226 |
"text/plain": [
|
| 227 |
"<IPython.core.display.HTML object>"
|
|
@@ -234,9 +232,120 @@
|
|
| 234 |
"data": {
|
| 235 |
"text/plain": []
|
| 236 |
},
|
| 237 |
-
"execution_count":
|
| 238 |
"metadata": {},
|
| 239 |
"output_type": "execute_result"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
}
|
| 241 |
],
|
| 242 |
"source": [
|
|
@@ -249,11 +358,11 @@
|
|
| 249 |
" gr.Markdown(\"(More features in development...)\")\n",
|
| 250 |
" with gr.Row():\n",
|
| 251 |
" text = gr.Textbox(\n",
|
| 252 |
-
" label=\"
|
| 253 |
-
" max_lines=
|
| 254 |
-
" placeholder=\"Enter your prompt(long and detailed would be better)\",\n",
|
| 255 |
" container=True,\n",
|
| 256 |
-
" value=\"
|
| 257 |
" )\n",
|
| 258 |
"\n",
|
| 259 |
" with gr.Tab('Generation'):\n",
|
|
@@ -299,13 +408,14 @@
|
|
| 299 |
" elem_id=\"gallery\",\n",
|
| 300 |
" height=\"auto\",\n",
|
| 301 |
" scale=1,\n",
|
|
|
|
| 302 |
" )\n",
|
| 303 |
" with gr.Column(scale=2):\n",
|
| 304 |
" with gr.Row():\n",
|
| 305 |
" with gr.Column():\n",
|
| 306 |
" # gr.Markdown(\"## Art-Free Generation\")\n",
|
| 307 |
" # gr.Markdown(\"Generate images from text prompts.\")\n",
|
| 308 |
-
"
|
| 309 |
" gallery_stylization_ori = gr.Image(\n",
|
| 310 |
" label=\"W/O Adapter\",\n",
|
| 311 |
" show_label=True,\n",
|
|
@@ -313,8 +423,8 @@
|
|
| 313 |
" height=\"auto\",\n",
|
| 314 |
" scale=1,\n",
|
| 315 |
" )\n",
|
| 316 |
-
"
|
| 317 |
-
"
|
| 318 |
" with gr.Column():\n",
|
| 319 |
" # gr.Markdown(\"## Art-Free Generation\")\n",
|
| 320 |
" # gr.Markdown(\"Generate images from text prompts.\")\n",
|
|
@@ -327,8 +437,8 @@
|
|
| 327 |
" )\n",
|
| 328 |
" start_timestep = gr.Slider(label=\"Adapter Timestep\", minimum=0, maximum=1000, value=800, step=1)\n",
|
| 329 |
" with gr.Row():\n",
|
| 330 |
-
" btn_style_ori = gr.Button(\"Art-Free
|
| 331 |
-
" btn_style_art = gr.Button(\"Artistic
|
| 332 |
"\n",
|
| 333 |
"\n",
|
| 334 |
" with gr.Row():\n",
|
|
@@ -352,7 +462,7 @@
|
|
| 352 |
"\n",
|
| 353 |
" with gr.Row():\n",
|
| 354 |
" steps = gr.Slider(label=\"Steps\", minimum=1, maximum=50, value=20, step=1)\n",
|
| 355 |
-
" adapter_scale = gr.Slider(label=\"
|
| 356 |
"\n",
|
| 357 |
" with gr.Row():\n",
|
| 358 |
" seed = gr.Slider(label=\"Seed\",minimum=0,maximum=2147483647,step=1,randomize=True,scale=1)\n",
|
|
@@ -364,6 +474,28 @@
|
|
| 364 |
" gr.on([btn_style_ori.click], demo_inference_stylization_ori, inputs=[gallery_stylization_ref, text, seed, steps, scale, start_timestep], outputs=gallery_stylization_ori)\n",
|
| 365 |
" gr.on([btn_style_art.click], demo_inference_stylization_artistic, inputs=[gallery_stylization_ref, adapter_choice, text, seed, steps, scale, adapter_scale, start_timestep], outputs=gallery_stylization_art)\n",
|
| 366 |
"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 367 |
"block.launch(share=True)"
|
| 368 |
]
|
| 369 |
},
|
|
|
|
| 72 |
{
|
| 73 |
"data": {
|
| 74 |
"application/vnd.jupyter.widget-view+json": {
|
| 75 |
+
"model_id": "08154385ff1741b88c3bcf5b4b1e15b3",
|
| 76 |
"version_major": 2,
|
| 77 |
"version_minor": 0
|
| 78 |
},
|
|
|
|
| 197 |
},
|
| 198 |
{
|
| 199 |
"cell_type": "code",
|
| 200 |
+
"execution_count": 17,
|
| 201 |
"id": "aa33e9d104023847",
|
| 202 |
"metadata": {
|
| 203 |
"ExecuteTime": {
|
|
|
|
| 210 |
"name": "stdout",
|
| 211 |
"output_type": "stream",
|
| 212 |
"text": [
|
| 213 |
+
"Running on local URL: http://127.0.0.1:7871\n",
|
| 214 |
+
"Running on public URL: https://e603b87db4de714e28.gradio.live\n",
|
|
|
|
|
|
|
| 215 |
"\n",
|
| 216 |
"This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
|
| 217 |
]
|
|
|
|
| 219 |
{
|
| 220 |
"data": {
|
| 221 |
"text/html": [
|
| 222 |
+
"<div><iframe src=\"https://e603b87db4de714e28.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
| 223 |
],
|
| 224 |
"text/plain": [
|
| 225 |
"<IPython.core.display.HTML object>"
|
|
|
|
| 232 |
"data": {
|
| 233 |
"text/plain": []
|
| 234 |
},
|
| 235 |
+
"execution_count": 17,
|
| 236 |
"metadata": {},
|
| 237 |
"output_type": "execute_result"
|
| 238 |
+
},
|
| 239 |
+
{
|
| 240 |
+
"name": "stdout",
|
| 241 |
+
"output_type": "stream",
|
| 242 |
+
"text": [
|
| 243 |
+
"Train method: None\n",
|
| 244 |
+
"Rank: 1, Alpha: 1\n",
|
| 245 |
+
"create LoRA for U-Net: 0 modules.\n",
|
| 246 |
+
"current time: 2024-12-14 00:07:17\n",
|
| 247 |
+
"save dir: None\n",
|
| 248 |
+
"[\"A picturesque landscape showcasing a winding river cutting through a lush green valley, surrounded by rugged mountains under a clear blue sky. The mix of red and brown tones in the rocky hills adds to the region's natural beauty and diversity.\"], seed=881336985\n"
|
| 249 |
+
]
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"name": "stderr",
|
| 253 |
+
"output_type": "stream",
|
| 254 |
+
"text": [
|
| 255 |
+
"\n",
|
| 256 |
+
"00%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 21/21 [00:01<00:00, 15.70it/s]"
|
| 257 |
+
]
|
| 258 |
+
},
|
| 259 |
+
{
|
| 260 |
+
"name": "stdout",
|
| 261 |
+
"output_type": "stream",
|
| 262 |
+
"text": [
|
| 263 |
+
"Time taken for one batch, Art Adapter scale=0.0: 1.4182789325714111\n",
|
| 264 |
+
"Train method: all_up\n",
|
| 265 |
+
"Rank: 1, Alpha: 1.0\n",
|
| 266 |
+
"create LoRA for U-Net: 123 modules.\n",
|
| 267 |
+
"Missing: <All keys matched successfully>\n",
|
| 268 |
+
"current time: 2024-12-14 00:07:24\n",
|
| 269 |
+
"save dir: None\n",
|
| 270 |
+
"[\"A picturesque landscape showcasing a winding river cutting through a lush green valley, surrounded by rugged mountains under a clear blue sky. The mix of red and brown tones in the rocky hills adds to the region's natural beauty and diversity in the style of sks art\"], seed=881336985\n"
|
| 271 |
+
]
|
| 272 |
+
},
|
| 273 |
+
{
|
| 274 |
+
"name": "stderr",
|
| 275 |
+
"output_type": "stream",
|
| 276 |
+
"text": [
|
| 277 |
+
"\n",
|
| 278 |
+
"00%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 21/21 [00:01<00:00, 15.38it/s]"
|
| 279 |
+
]
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"name": "stdout",
|
| 283 |
+
"output_type": "stream",
|
| 284 |
+
"text": [
|
| 285 |
+
"Time taken for one batch, Art Adapter scale=1: 1.4458158016204834\n",
|
| 286 |
+
"Train method: all_up\n",
|
| 287 |
+
"Rank: 1, Alpha: 1.0\n",
|
| 288 |
+
"create LoRA for U-Net: 123 modules.\n",
|
| 289 |
+
"Missing: <All keys matched successfully>\n",
|
| 290 |
+
"current time: 2024-12-14 00:07:32\n",
|
| 291 |
+
"save dir: None\n",
|
| 292 |
+
"[\"A picturesque landscape showcasing a winding river cutting through a lush green valley, surrounded by rugged mountains under a clear blue sky. The mix of red and brown tones in the rocky hills adds to the region's natural beauty and diversity in the style of sks art\"], seed=881336985\n"
|
| 293 |
+
]
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"name": "stderr",
|
| 297 |
+
"output_type": "stream",
|
| 298 |
+
"text": [
|
| 299 |
+
"100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 21/21 [00:01<00:00, 13.80it/s]"
|
| 300 |
+
]
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"name": "stdout",
|
| 304 |
+
"output_type": "stream",
|
| 305 |
+
"text": [
|
| 306 |
+
"Time taken for one batch, Art Adapter scale=1: 1.602182149887085\n"
|
| 307 |
+
]
|
| 308 |
+
},
|
| 309 |
+
{
|
| 310 |
+
"name": "stderr",
|
| 311 |
+
"output_type": "stream",
|
| 312 |
+
"text": [
|
| 313 |
+
"\n"
|
| 314 |
+
]
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"name": "stdout",
|
| 318 |
+
"output_type": "stream",
|
| 319 |
+
"text": [
|
| 320 |
+
"Train method: all_up\n",
|
| 321 |
+
"Rank: 1, Alpha: 1.0\n",
|
| 322 |
+
"create LoRA for U-Net: 123 modules.\n",
|
| 323 |
+
"Missing: <All keys matched successfully>\n",
|
| 324 |
+
"current time: 2024-12-14 00:07:42\n",
|
| 325 |
+
"save dir: None\n",
|
| 326 |
+
"[\"A picturesque landscape showcasing a winding river cutting through a lush green valley, surrounded by rugged mountains under a clear blue sky. The mix of red and brown tones in the rocky hills adds to the region's natural beauty and diversity in the style of sks art\"], seed=881336985\n"
|
| 327 |
+
]
|
| 328 |
+
},
|
| 329 |
+
{
|
| 330 |
+
"name": "stderr",
|
| 331 |
+
"output_type": "stream",
|
| 332 |
+
"text": [
|
| 333 |
+
"100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 21/21 [00:01<00:00, 12.56it/s]"
|
| 334 |
+
]
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"name": "stdout",
|
| 338 |
+
"output_type": "stream",
|
| 339 |
+
"text": [
|
| 340 |
+
"Time taken for one batch, Art Adapter scale=1: 1.750511884689331\n"
|
| 341 |
+
]
|
| 342 |
+
},
|
| 343 |
+
{
|
| 344 |
+
"name": "stderr",
|
| 345 |
+
"output_type": "stream",
|
| 346 |
+
"text": [
|
| 347 |
+
"\n"
|
| 348 |
+
]
|
| 349 |
}
|
| 350 |
],
|
| 351 |
"source": [
|
|
|
|
| 358 |
" gr.Markdown(\"(More features in development...)\")\n",
|
| 359 |
" with gr.Row():\n",
|
| 360 |
" text = gr.Textbox(\n",
|
| 361 |
+
" label=\"Prompt (long and detailed would be better):\",\n",
|
| 362 |
+
" max_lines=10,\n",
|
| 363 |
+
" placeholder=\"Enter your prompt (long and detailed would be better)\",\n",
|
| 364 |
" container=True,\n",
|
| 365 |
+
" value=\"A blue bench situated in a park, surrounded by trees and leaves. The bench is positioned under a tree, providing shade and a peaceful atmosphere. There are several benches in the park, with one being closer to the foreground and the others further in the background. A person can be seen in the distance, possibly enjoying the park or taking a walk. The overall scene is serene and inviting, with the bench serving as a focal point in the park's landscape.\",\n",
|
| 366 |
" )\n",
|
| 367 |
"\n",
|
| 368 |
" with gr.Tab('Generation'):\n",
|
|
|
|
| 408 |
" elem_id=\"gallery\",\n",
|
| 409 |
" height=\"auto\",\n",
|
| 410 |
" scale=1,\n",
|
| 411 |
+
" value=\"data/003904765.jpg\"\n",
|
| 412 |
" )\n",
|
| 413 |
" with gr.Column(scale=2):\n",
|
| 414 |
" with gr.Row():\n",
|
| 415 |
" with gr.Column():\n",
|
| 416 |
" # gr.Markdown(\"## Art-Free Generation\")\n",
|
| 417 |
" # gr.Markdown(\"Generate images from text prompts.\")\n",
|
| 418 |
+
"\n",
|
| 419 |
" gallery_stylization_ori = gr.Image(\n",
|
| 420 |
" label=\"W/O Adapter\",\n",
|
| 421 |
" show_label=True,\n",
|
|
|
|
| 423 |
" height=\"auto\",\n",
|
| 424 |
" scale=1,\n",
|
| 425 |
" )\n",
|
| 426 |
+
"\n",
|
| 427 |
+
"\n",
|
| 428 |
" with gr.Column():\n",
|
| 429 |
" # gr.Markdown(\"## Art-Free Generation\")\n",
|
| 430 |
" # gr.Markdown(\"Generate images from text prompts.\")\n",
|
|
|
|
| 437 |
" )\n",
|
| 438 |
" start_timestep = gr.Slider(label=\"Adapter Timestep\", minimum=0, maximum=1000, value=800, step=1)\n",
|
| 439 |
" with gr.Row():\n",
|
| 440 |
+
" btn_style_ori = gr.Button(\"Art-Free Stylize\", scale=1)\n",
|
| 441 |
+
" btn_style_art = gr.Button(\"Artistic Stylize\", scale=1)\n",
|
| 442 |
"\n",
|
| 443 |
"\n",
|
| 444 |
" with gr.Row():\n",
|
|
|
|
| 462 |
"\n",
|
| 463 |
" with gr.Row():\n",
|
| 464 |
" steps = gr.Slider(label=\"Steps\", minimum=1, maximum=50, value=20, step=1)\n",
|
| 465 |
+
" adapter_scale = gr.Slider(label=\"Adapter Scale\", minimum=0, maximum=1.5, value=1., step=0.1, scale=1)\n",
|
| 466 |
"\n",
|
| 467 |
" with gr.Row():\n",
|
| 468 |
" seed = gr.Slider(label=\"Seed\",minimum=0,maximum=2147483647,step=1,randomize=True,scale=1)\n",
|
|
|
|
| 474 |
" gr.on([btn_style_ori.click], demo_inference_stylization_ori, inputs=[gallery_stylization_ref, text, seed, steps, scale, start_timestep], outputs=gallery_stylization_ori)\n",
|
| 475 |
" gr.on([btn_style_art.click], demo_inference_stylization_artistic, inputs=[gallery_stylization_ref, adapter_choice, text, seed, steps, scale, adapter_scale, start_timestep], outputs=gallery_stylization_art)\n",
|
| 476 |
"\n",
|
| 477 |
+
" examples = gr.Examples(\n",
|
| 478 |
+
" examples=[\n",
|
| 479 |
+
" [\"Snow-covered trees with sunlight shining through\",\n",
|
| 480 |
+
" \"data/Snow-covered_trees_with_sunlight_shining_through.jpg\"\n",
|
| 481 |
+
" ],\n",
|
| 482 |
+
" [\"A picturesque landscape showcasing a winding river cutting through a lush green valley, surrounded by rugged mountains under a clear blue sky. The mix of red and brown tones in the rocky hills adds to the region's natural beauty and diversity.\",\n",
|
| 483 |
+
" \"data/0011772.jpg\"],\n",
|
| 484 |
+
" [\"a black SUV driving down a highway with a scenic view of mountains and water in the background. The SUV is the main focus of the image, and it appears to be traveling at a moderate speed. The road is well-maintained and provides a smooth driving experience. The mountains and water create a picturesque backdrop, adding to the overall beauty of the scene. The image captures the essence of a leisurely road trip, with the SUV as the primary subject, highlighting the sense of adventure and exploration that comes with such journeys.\",\n",
|
| 485 |
+
" \"data/a_black_SUV_driving_down_a_highway_with_a_scenic_view_of_mountains_and_water_in_the_background._The_.jpg\"\n",
|
| 486 |
+
" ],\n",
|
| 487 |
+
" [\n",
|
| 488 |
+
" \"A blue bench situated in a park, surrounded by trees and leaves. The bench is positioned under a tree, providing shade and a peaceful atmosphere. There are several benches in the park, with one being closer to the foreground and the others further in the background. A person can be seen in the distance, possibly enjoying the park or taking a walk. The overall scene is serene and inviting, with the bench serving as a focal point in the park's landscape.\",\n",
|
| 489 |
+
" \"data/003904765.jpg\"\n",
|
| 490 |
+
" ]\n",
|
| 491 |
+
"\n",
|
| 492 |
+
" ],\n",
|
| 493 |
+
" inputs=[\n",
|
| 494 |
+
" text,\n",
|
| 495 |
+
" gallery_stylization_ref\n",
|
| 496 |
+
" ],\n",
|
| 497 |
+
" # cache_examples=True,\n",
|
| 498 |
+
" )\n",
|
| 499 |
"block.launch(share=True)"
|
| 500 |
]
|
| 501 |
},
|