Fabrice-TIERCELIN commited on
Commit
6ef4b25
·
verified ·
1 Parent(s): c84831d
Files changed (1) hide show
  1. app_start_end.py +28 -28
app_start_end.py CHANGED
@@ -313,7 +313,7 @@ def set_mp4_comments_imageio_ffmpeg(input_file, comments):
313
  return False
314
 
315
  @torch.no_grad()
316
- def worker(input_image, end_image, prompts, n_prompt, seed, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, mp4_crf, fps_number):
317
  def encode_prompt(prompt, n_prompt):
318
  llama_vec, clip_l_pooler = encode_prompt_conds(prompt, text_encoder, text_encoder_2, tokenizer, tokenizer_2)
319
 
@@ -855,18 +855,18 @@ def worker_video(input_video, prompts, n_prompt, seed, batch, resolution, total_
855
  stream.output_queue.push(('end', None))
856
  return
857
 
858
- def get_duration(input_image, image_position, end_image, prompts, generation_mode, n_prompt, seed, resolution, total_second_length, allocation_time, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, mp4_crf, fps_number):
859
  return allocation_time
860
 
861
  # Remove this decorator if you run on local
862
- @spaces.GPU(duration=get_duration)
863
- def process_on_gpu(input_image, image_position, end_image, prompts, generation_mode, n_prompt, seed, resolution, total_second_length, allocation_time, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, mp4_crf, fps_number
864
  ):
865
  start = time.time()
866
  global stream
867
  stream = AsyncStream()
868
 
869
- async_run(worker, input_image, end_image, prompts, n_prompt, seed, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, mp4_crf, fps_number)
870
 
871
  output_filename = None
872
 
@@ -895,7 +895,7 @@ def process_on_gpu(input_image, image_position, end_image, prompts, generation_m
895
  "You can upscale the result with RIFE. To make all your generated scenes consistent, you can then apply a face swap on the main character. If you do not see the generated video above, the process may have failed. See the logs for more information. If you see an error like ''NVML_SUCCESS == r INTERNAL ASSERT FAILED'', you probably haven't enough VRAM. Test an example or other options to compare. You can share your inputs to the original space or set your space in public for a peer review.", gr.update(interactive=True), gr.update(interactive=False), gr.update(visible = False)
896
  break
897
 
898
- def process(input_image,
899
  image_position=0,
900
  end_image=None,
901
  prompt="",
@@ -947,7 +947,7 @@ def process(input_image,
947
 
948
  yield gr.update(label="Previewed Frames"), None, '', '', gr.update(interactive=False), gr.update(interactive=True), gr.skip()
949
 
950
- yield from process_on_gpu(input_image,
951
  image_position,
952
  end_image,
953
  prompts,
@@ -1149,7 +1149,7 @@ with block:
1149
  enable_preview = gr.Checkbox(label='Enable preview', value=True, info='Display a preview around each second generated but it costs 2 sec. for each second generated.')
1150
  use_teacache = gr.Checkbox(label='Use TeaCache', value=False, info='Faster speed and no break in brightness, but often makes hands and fingers slightly worse.')
1151
 
1152
- n_prompt = gr.Textbox(label="Negative Prompt", value="Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", info='Requires using normal CFG (undistilled) instead of Distilled (set Distilled=1 and CFG > 1).')
1153
 
1154
  fps_number = gr.Slider(label="Frame per seconds", info="The model is trained for 30 fps so other fps may generate weird results", minimum=10, maximum=60, value=30, step=1)
1155
 
@@ -1224,7 +1224,7 @@ with block:
1224
  None, # end_image
1225
  "Overcrowed street in Japan, photorealistic, realistic, intricate details, 8k, insanely detailed",
1226
  "text", # generation_mode
1227
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1228
  True, # randomize_seed
1229
  42, # seed
1230
  True, # auto_allocation
@@ -1244,7 +1244,7 @@ with block:
1244
  ]
1245
  ],
1246
  run_on_click = True,
1247
- fn = process,
1248
  inputs = ips,
1249
  outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button, warning],
1250
  cache_examples = torch.cuda.device_count() > 0,
@@ -1260,7 +1260,7 @@ with block:
1260
  None, # end_image
1261
  "A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The man talks and the woman listens; A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The woman talks, the man stops talking and the man listens; A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The woman talks and the man listens",
1262
  "image", # generation_mode
1263
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1264
  True, # randomize_seed
1265
  42, # seed
1266
  True, # auto_allocation
@@ -1284,7 +1284,7 @@ with block:
1284
  None, # end_image
1285
  "A dolphin emerges from the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
1286
  "image", # generation_mode
1287
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1288
  True, # randomize_seed
1289
  42, # seed
1290
  True, # auto_allocation
@@ -1308,7 +1308,7 @@ with block:
1308
  None, # end_image
1309
  "A building starting to explode, photorealistic, realisitc, 8k, insanely detailed",
1310
  "image", # generation_mode
1311
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1312
  True, # randomize_seed
1313
  42, # seed
1314
  True, # auto_allocation
@@ -1332,7 +1332,7 @@ with block:
1332
  None, # end_image
1333
  "A building starting to explode, photorealistic, realisitc, 8k, insanely detailed",
1334
  "image", # generation_mode
1335
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1336
  True, # randomize_seed
1337
  42, # seed
1338
  True, # auto_allocation
@@ -1356,7 +1356,7 @@ with block:
1356
  None, # end_image
1357
  "A building starting to explode, photorealistic, realisitc, 8k, insanely detailed",
1358
  "image", # generation_mode
1359
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1360
  True, # randomize_seed
1361
  42, # seed
1362
  True, # auto_allocation
@@ -1376,7 +1376,7 @@ with block:
1376
  ],
1377
  ],
1378
  run_on_click = True,
1379
- fn = process,
1380
  inputs = ips,
1381
  outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button, warning],
1382
  cache_examples = torch.cuda.device_count() > 0,
@@ -1389,7 +1389,7 @@ with block:
1389
  [
1390
  "./img_examples/Example1.mp4", # input_video
1391
  "View of the sea as far as the eye can see, from the seaside, a piece of land is barely visible on the horizon at the middle, the sky is radiant, reflections of the sun in the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
1392
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1393
  True, # randomize_seed
1394
  42, # seed
1395
  True, # auto_allocation
@@ -1413,7 +1413,7 @@ with block:
1413
  [
1414
  "./img_examples/Example1.mp4", # input_video
1415
  "View of the sea as far as the eye can see, from the seaside, a piece of land is barely visible on the horizon at the middle, the sky is radiant, reflections of the sun in the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
1416
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1417
  True, # randomize_seed
1418
  42, # seed
1419
  True, # auto_allocation
@@ -1451,7 +1451,7 @@ with block:
1451
  None, # end_image
1452
  "Overcrowed street in Japan, photorealistic, realistic, intricate details, 8k, insanely detailed",
1453
  "text", # generation_mode
1454
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1455
  True, # randomize_seed
1456
  42, # seed
1457
  True, # auto_allocation
@@ -1471,7 +1471,7 @@ with block:
1471
  ]
1472
  ],
1473
  run_on_click = True,
1474
- fn = process,
1475
  inputs = ips,
1476
  outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button, warning],
1477
  cache_examples = False,
@@ -1486,7 +1486,7 @@ with block:
1486
  None, # end_image
1487
  "A dolphin emerges from the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
1488
  "image", # generation_mode
1489
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1490
  True, # randomize_seed
1491
  42, # seed
1492
  True, # auto_allocation
@@ -1510,7 +1510,7 @@ with block:
1510
  None, # end_image
1511
  "A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The man talks and the woman listens; A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The woman talks, the man stops talking and the man listens; A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The woman talks and the man listens",
1512
  "image", # generation_mode
1513
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1514
  True, # randomize_seed
1515
  42, # seed
1516
  True, # auto_allocation
@@ -1534,7 +1534,7 @@ with block:
1534
  None, # end_image
1535
  "A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The woman talks and the man listens; A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The man talks, the woman stops talking and the woman listens A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The man talks and the woman listens",
1536
  "image", # generation_mode
1537
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1538
  True, # randomize_seed
1539
  42, # seed
1540
  True, # auto_allocation
@@ -1558,7 +1558,7 @@ with block:
1558
  None, # end_image
1559
  "A boy is walking to the right, full view, full-length view, cartoon",
1560
  "image", # generation_mode
1561
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1562
  True, # randomize_seed
1563
  42, # seed
1564
  True, # auto_allocation
@@ -1582,7 +1582,7 @@ with block:
1582
  None, # end_image
1583
  "A building starting to explode, photorealistic, realisitc, 8k, insanely detailed",
1584
  "image", # generation_mode
1585
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1586
  True, # randomize_seed
1587
  42, # seed
1588
  True, # auto_allocation
@@ -1602,7 +1602,7 @@ with block:
1602
  ]
1603
  ],
1604
  run_on_click = True,
1605
- fn = process,
1606
  inputs = ips,
1607
  outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button, warning],
1608
  cache_examples = False,
@@ -1614,7 +1614,7 @@ with block:
1614
  [
1615
  "./img_examples/Example1.mp4", # input_video
1616
  "View of the sea as far as the eye can see, from the seaside, a piece of land is barely visible on the horizon at the middle, the sky is radiant, reflections of the sun in the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
1617
- "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, blurred, blurry, over-smooth", # n_prompt
1618
  True, # randomize_seed
1619
  42, # seed
1620
  True, # auto_allocation
@@ -1714,7 +1714,7 @@ with block:
1714
  timeless_prompt.change(fn=handle_timeless_prompt_change, inputs=[timeless_prompt], outputs=[final_prompt])
1715
  start_button.click(fn = check_parameters, inputs = [
1716
  generation_mode, input_image, input_video
1717
- ], outputs = [end_button, warning], queue = False, show_progress = False).success(fn=process, inputs=ips, outputs=[result_video, preview_image, progress_desc, progress_bar, start_button, end_button, warning], scroll_to_output = True)
1718
  start_button_video.click(fn = check_parameters, inputs = [
1719
  generation_mode, input_image, input_video
1720
  ], outputs = [end_button, warning], queue = False, show_progress = False).success(fn=process_video, inputs=ips_video, outputs=[result_video, preview_image, progress_desc, progress_bar, start_button_video, end_button, warning], scroll_to_output = True)
 
313
  return False
314
 
315
  @torch.no_grad()
316
+ def worker_start_end(input_image, end_image, prompts, n_prompt, seed, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, mp4_crf, fps_number):
317
  def encode_prompt(prompt, n_prompt):
318
  llama_vec, clip_l_pooler = encode_prompt_conds(prompt, text_encoder, text_encoder_2, tokenizer, tokenizer_2)
319
 
 
855
  stream.output_queue.push(('end', None))
856
  return
857
 
858
+ def get_duration_start_end(input_image, image_position, end_image, prompts, generation_mode, n_prompt, seed, resolution, total_second_length, allocation_time, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, mp4_crf, fps_number):
859
  return allocation_time
860
 
861
  # Remove this decorator if you run on local
862
+ @spaces.GPU(duration=get_duration_start_end)
863
+ def process_start_end_on_gpu(input_image, image_position, end_image, prompts, generation_mode, n_prompt, seed, resolution, total_second_length, allocation_time, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, mp4_crf, fps_number
864
  ):
865
  start = time.time()
866
  global stream
867
  stream = AsyncStream()
868
 
869
+ async_run(worker_start_end, input_image, end_image, prompts, n_prompt, seed, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, mp4_crf, fps_number)
870
 
871
  output_filename = None
872
 
 
895
  "You can upscale the result with RIFE. To make all your generated scenes consistent, you can then apply a face swap on the main character. If you do not see the generated video above, the process may have failed. See the logs for more information. If you see an error like ''NVML_SUCCESS == r INTERNAL ASSERT FAILED'', you probably haven't enough VRAM. Test an example or other options to compare. You can share your inputs to the original space or set your space in public for a peer review.", gr.update(interactive=True), gr.update(interactive=False), gr.update(visible = False)
896
  break
897
 
898
+ def process_start_end(input_image,
899
  image_position=0,
900
  end_image=None,
901
  prompt="",
 
947
 
948
  yield gr.update(label="Previewed Frames"), None, '', '', gr.update(interactive=False), gr.update(interactive=True), gr.skip()
949
 
950
+ yield from process_start_end_on_gpu(input_image,
951
  image_position,
952
  end_image,
953
  prompts,
 
1149
  enable_preview = gr.Checkbox(label='Enable preview', value=True, info='Display a preview around each second generated but it costs 2 sec. for each second generated.')
1150
  use_teacache = gr.Checkbox(label='Use TeaCache', value=False, info='Faster speed and no break in brightness, but often makes hands and fingers slightly worse.')
1151
 
1152
+ n_prompt = gr.Textbox(label="Negative Prompt", value="Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", info='Requires using normal CFG (undistilled) instead of Distilled (set Distilled=1 and CFG > 1).')
1153
 
1154
  fps_number = gr.Slider(label="Frame per seconds", info="The model is trained for 30 fps so other fps may generate weird results", minimum=10, maximum=60, value=30, step=1)
1155
 
 
1224
  None, # end_image
1225
  "Overcrowed street in Japan, photorealistic, realistic, intricate details, 8k, insanely detailed",
1226
  "text", # generation_mode
1227
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1228
  True, # randomize_seed
1229
  42, # seed
1230
  True, # auto_allocation
 
1244
  ]
1245
  ],
1246
  run_on_click = True,
1247
+ fn = process_start_end,
1248
  inputs = ips,
1249
  outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button, warning],
1250
  cache_examples = torch.cuda.device_count() > 0,
 
1260
  None, # end_image
1261
  "A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The man talks and the woman listens; A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The woman talks, the man stops talking and the man listens; A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The woman talks and the man listens",
1262
  "image", # generation_mode
1263
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1264
  True, # randomize_seed
1265
  42, # seed
1266
  True, # auto_allocation
 
1284
  None, # end_image
1285
  "A dolphin emerges from the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
1286
  "image", # generation_mode
1287
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1288
  True, # randomize_seed
1289
  42, # seed
1290
  True, # auto_allocation
 
1308
  None, # end_image
1309
  "A building starting to explode, photorealistic, realisitc, 8k, insanely detailed",
1310
  "image", # generation_mode
1311
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1312
  True, # randomize_seed
1313
  42, # seed
1314
  True, # auto_allocation
 
1332
  None, # end_image
1333
  "A building starting to explode, photorealistic, realisitc, 8k, insanely detailed",
1334
  "image", # generation_mode
1335
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1336
  True, # randomize_seed
1337
  42, # seed
1338
  True, # auto_allocation
 
1356
  None, # end_image
1357
  "A building starting to explode, photorealistic, realisitc, 8k, insanely detailed",
1358
  "image", # generation_mode
1359
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1360
  True, # randomize_seed
1361
  42, # seed
1362
  True, # auto_allocation
 
1376
  ],
1377
  ],
1378
  run_on_click = True,
1379
+ fn = process_start_end,
1380
  inputs = ips,
1381
  outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button, warning],
1382
  cache_examples = torch.cuda.device_count() > 0,
 
1389
  [
1390
  "./img_examples/Example1.mp4", # input_video
1391
  "View of the sea as far as the eye can see, from the seaside, a piece of land is barely visible on the horizon at the middle, the sky is radiant, reflections of the sun in the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
1392
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1393
  True, # randomize_seed
1394
  42, # seed
1395
  True, # auto_allocation
 
1413
  [
1414
  "./img_examples/Example1.mp4", # input_video
1415
  "View of the sea as far as the eye can see, from the seaside, a piece of land is barely visible on the horizon at the middle, the sky is radiant, reflections of the sun in the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
1416
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1417
  True, # randomize_seed
1418
  42, # seed
1419
  True, # auto_allocation
 
1451
  None, # end_image
1452
  "Overcrowed street in Japan, photorealistic, realistic, intricate details, 8k, insanely detailed",
1453
  "text", # generation_mode
1454
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1455
  True, # randomize_seed
1456
  42, # seed
1457
  True, # auto_allocation
 
1471
  ]
1472
  ],
1473
  run_on_click = True,
1474
+ fn = process_start_end,
1475
  inputs = ips,
1476
  outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button, warning],
1477
  cache_examples = False,
 
1486
  None, # end_image
1487
  "A dolphin emerges from the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
1488
  "image", # generation_mode
1489
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1490
  True, # randomize_seed
1491
  42, # seed
1492
  True, # auto_allocation
 
1510
  None, # end_image
1511
  "A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The man talks and the woman listens; A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The woman talks, the man stops talking and the man listens; A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The woman talks and the man listens",
1512
  "image", # generation_mode
1513
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1514
  True, # randomize_seed
1515
  42, # seed
1516
  True, # auto_allocation
 
1534
  None, # end_image
1535
  "A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The woman talks and the man listens; A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The man talks, the woman stops talking and the woman listens A man on the left and a woman on the right face each other ready to start a conversation, large space between the persons, full view, full-length view, 3D, pixar, 3D render, CGI. The man talks and the woman listens",
1536
  "image", # generation_mode
1537
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1538
  True, # randomize_seed
1539
  42, # seed
1540
  True, # auto_allocation
 
1558
  None, # end_image
1559
  "A boy is walking to the right, full view, full-length view, cartoon",
1560
  "image", # generation_mode
1561
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1562
  True, # randomize_seed
1563
  42, # seed
1564
  True, # auto_allocation
 
1582
  None, # end_image
1583
  "A building starting to explode, photorealistic, realisitc, 8k, insanely detailed",
1584
  "image", # generation_mode
1585
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1586
  True, # randomize_seed
1587
  42, # seed
1588
  True, # auto_allocation
 
1602
  ]
1603
  ],
1604
  run_on_click = True,
1605
+ fn = process_start_end,
1606
  inputs = ips,
1607
  outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button, warning],
1608
  cache_examples = False,
 
1614
  [
1615
  "./img_examples/Example1.mp4", # input_video
1616
  "View of the sea as far as the eye can see, from the seaside, a piece of land is barely visible on the horizon at the middle, the sky is radiant, reflections of the sun in the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
1617
+ "Missing arm, long hand, unrealistic position, impossible contortion, visible bone, muscle contraction, poorly framed, blurred, blurry, over-smooth", # n_prompt
1618
  True, # randomize_seed
1619
  42, # seed
1620
  True, # auto_allocation
 
1714
  timeless_prompt.change(fn=handle_timeless_prompt_change, inputs=[timeless_prompt], outputs=[final_prompt])
1715
  start_button.click(fn = check_parameters, inputs = [
1716
  generation_mode, input_image, input_video
1717
+ ], outputs = [end_button, warning], queue = False, show_progress = False).success(fn=process_start_end, inputs=ips, outputs=[result_video, preview_image, progress_desc, progress_bar, start_button, end_button, warning], scroll_to_output = True)
1718
  start_button_video.click(fn = check_parameters, inputs = [
1719
  generation_mode, input_image, input_video
1720
  ], outputs = [end_button, warning], queue = False, show_progress = False).success(fn=process_video, inputs=ips_video, outputs=[result_video, preview_image, progress_desc, progress_bar, start_button_video, end_button, warning], scroll_to_output = True)