Spaces:
Runtime error
Runtime error
Add advices
Browse files
app.py
CHANGED
|
@@ -722,6 +722,8 @@ def worker_video(input_video, prompts, n_prompt, seed, batch, resolution, total_
|
|
| 722 |
else:
|
| 723 |
transformer.initialize_teacache(enable_teacache=False)
|
| 724 |
|
|
|
|
|
|
|
| 725 |
indices = torch.arange(0, sum([1, 16, 2, 1, latent_window_size])).unsqueeze(0)
|
| 726 |
clean_latent_indices_start, clean_latent_4x_indices, clean_latent_2x_indices, clean_latent_1x_indices, latent_indices = indices.split([1, 16, 2, 1, latent_window_size], dim=1)
|
| 727 |
clean_latent_indices = torch.cat([clean_latent_indices_start, clean_latent_1x_indices], dim=1)
|
|
@@ -1163,11 +1165,11 @@ def process(input_image,
|
|
| 1163 |
secondes = secondes - (minutes * 60)
|
| 1164 |
hours = math.floor(minutes / 60)
|
| 1165 |
minutes = minutes - (hours * 60)
|
| 1166 |
-
yield output_filename, gr.update(visible=False), gr.update(), "The
|
| 1167 |
((str(hours) + " h, ") if hours != 0 else "") + \
|
| 1168 |
((str(minutes) + " min, ") if hours != 0 or minutes != 0 else "") + \
|
| 1169 |
str(secondes) + " sec. " + \
|
| 1170 |
-
"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.", gr.update(interactive=True), gr.update(interactive=False)
|
| 1171 |
break
|
| 1172 |
|
| 1173 |
def get_duration_video(input_video, prompt, n_prompt, randomize_seed, seed, batch, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch):
|
|
@@ -1242,11 +1244,11 @@ def process_video(input_video, prompt, n_prompt, randomize_seed, seed, batch, re
|
|
| 1242 |
hours = math.floor(minutes / 60)
|
| 1243 |
minutes = minutes - (hours * 60)
|
| 1244 |
yield output_filename, gr.update(visible=False), desc + \
|
| 1245 |
-
" The
|
| 1246 |
((str(hours) + " h, ") if hours != 0 else "") + \
|
| 1247 |
((str(minutes) + " min, ") if hours != 0 or minutes != 0 else "") + \
|
| 1248 |
str(secondes) + " sec. " + \
|
| 1249 |
-
"
|
| 1250 |
break
|
| 1251 |
|
| 1252 |
def end_process():
|
|
|
|
| 722 |
else:
|
| 723 |
transformer.initialize_teacache(enable_teacache=False)
|
| 724 |
|
| 725 |
+
[max_frames, clean_latents, clean_latents_2x, clean_latents_4x, latent_indices, clean_latents, clean_latent_indices, clean_latent_2x_indices, clean_latent_4x_indices] = compute_latent(history_latents, latent_window_size, num_clean_frames, start_latent)
|
| 726 |
+
|
| 727 |
indices = torch.arange(0, sum([1, 16, 2, 1, latent_window_size])).unsqueeze(0)
|
| 728 |
clean_latent_indices_start, clean_latent_4x_indices, clean_latent_2x_indices, clean_latent_1x_indices, latent_indices = indices.split([1, 16, 2, 1, latent_window_size], dim=1)
|
| 729 |
clean_latent_indices = torch.cat([clean_latent_indices_start, clean_latent_1x_indices], dim=1)
|
|
|
|
| 1165 |
secondes = secondes - (minutes * 60)
|
| 1166 |
hours = math.floor(minutes / 60)
|
| 1167 |
minutes = minutes - (hours * 60)
|
| 1168 |
+
yield output_filename, gr.update(visible=False), gr.update(), "The process has last " + \
|
| 1169 |
((str(hours) + " h, ") if hours != 0 else "") + \
|
| 1170 |
((str(minutes) + " min, ") if hours != 0 or minutes != 0 else "") + \
|
| 1171 |
str(secondes) + " sec. " + \
|
| 1172 |
+
"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, the process may have failed. See the logs for more information. 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)
|
| 1173 |
break
|
| 1174 |
|
| 1175 |
def get_duration_video(input_video, prompt, n_prompt, randomize_seed, seed, batch, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch):
|
|
|
|
| 1244 |
hours = math.floor(minutes / 60)
|
| 1245 |
minutes = minutes - (hours * 60)
|
| 1246 |
yield output_filename, gr.update(visible=False), desc + \
|
| 1247 |
+
" The process has last " + \
|
| 1248 |
((str(hours) + " h, ") if hours != 0 else "") + \
|
| 1249 |
((str(minutes) + " min, ") if hours != 0 or minutes != 0 else "") + \
|
| 1250 |
str(secondes) + " sec. " + \
|
| 1251 |
+
" 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, the process may have failed. See the logs for more information. 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)
|
| 1252 |
break
|
| 1253 |
|
| 1254 |
def end_process():
|