print("µµµµµµµµµµµµµµµµµµµµµµµµµµµµµµ")
Browse files- app_endframe.py +4 -2
app_endframe.py
CHANGED
|
@@ -517,22 +517,26 @@ def worker(input_video, end_frame, end_frame_weight, prompt, n_prompt, seed, bat
|
|
| 517 |
split_sizes = [num_4x_frames, num_2x_frames]
|
| 518 |
split_sizes = [s for s in split_sizes if s > 0]
|
| 519 |
if split_sizes and context_frames.shape[2] >= sum(split_sizes):
|
|
|
|
| 520 |
splits = context_frames.split(split_sizes, dim=2)
|
| 521 |
split_idx = 0
|
| 522 |
clean_latents_4x = splits[split_idx] if num_4x_frames > 0 else history_latents[:, :, :1, :, :]
|
| 523 |
split_idx += 1 if num_4x_frames > 0 else 0
|
| 524 |
clean_latents_2x = splits[split_idx] if num_2x_frames > 0 and split_idx < len(splits) else history_latents[:, :, :1, :, :]
|
| 525 |
else:
|
|
|
|
| 526 |
clean_latents_4x = clean_latents_2x = history_latents[:, :, :1, :, :]
|
| 527 |
|
| 528 |
clean_latents_pre = video_latents[:, :, -min(effective_clean_frames, video_latents.shape[2]):].to(history_latents) # smoother motion but jumpcuts if end frame is too different, must change clean_latent_pre_frames to effective_clean_frames also
|
| 529 |
clean_latents_post = history_latents[:, :, :min(effective_clean_frames, history_latents.shape[2]), :, :] # smoother motion, must change post_frames to effective_clean_frames also
|
| 530 |
|
| 531 |
if is_end_of_video:
|
|
|
|
| 532 |
clean_latents_post = torch.zeros_like(end_of_input_video_latent).to(history_latents)
|
| 533 |
|
| 534 |
# 20250509 pftq: handle end frame if available
|
| 535 |
if end_latent is not None:
|
|
|
|
| 536 |
#current_end_frame_weight = end_frame_weight * (latent_padding / latent_paddings[0])
|
| 537 |
#current_end_frame_weight = current_end_frame_weight * 0.5 + 0.5
|
| 538 |
current_end_frame_weight = end_frame_weight # changing this over time introduces discontinuity
|
|
@@ -546,11 +550,9 @@ def worker(input_video, end_frame, end_frame_weight, prompt, n_prompt, seed, bat
|
|
| 546 |
|
| 547 |
# 20250511 pftq: Pad clean_latents_pre to match clean_latent_pre_frames if needed
|
| 548 |
if clean_latents_pre.shape[2] < clean_latent_pre_frames:
|
| 549 |
-
print("££££££££££££££££££££££££££££££")
|
| 550 |
clean_latents_pre = clean_latents_pre.repeat(1, 1, clean_latent_pre_frames // clean_latents_pre.shape[2], 1, 1)
|
| 551 |
# 20250511 pftq: Pad clean_latents_post to match post_frames if needed
|
| 552 |
if clean_latents_post.shape[2] < post_frames:
|
| 553 |
-
print("€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€")
|
| 554 |
clean_latents_post = clean_latents_post.repeat(1, 1, post_frames // clean_latents_post.shape[2], 1, 1)
|
| 555 |
|
| 556 |
clean_latents = torch.cat([clean_latents_pre, clean_latents_post], dim=2)
|
|
|
|
| 517 |
split_sizes = [num_4x_frames, num_2x_frames]
|
| 518 |
split_sizes = [s for s in split_sizes if s > 0]
|
| 519 |
if split_sizes and context_frames.shape[2] >= sum(split_sizes):
|
| 520 |
+
print("§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§")
|
| 521 |
splits = context_frames.split(split_sizes, dim=2)
|
| 522 |
split_idx = 0
|
| 523 |
clean_latents_4x = splits[split_idx] if num_4x_frames > 0 else history_latents[:, :, :1, :, :]
|
| 524 |
split_idx += 1 if num_4x_frames > 0 else 0
|
| 525 |
clean_latents_2x = splits[split_idx] if num_2x_frames > 0 and split_idx < len(splits) else history_latents[:, :, :1, :, :]
|
| 526 |
else:
|
| 527 |
+
print("€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€")
|
| 528 |
clean_latents_4x = clean_latents_2x = history_latents[:, :, :1, :, :]
|
| 529 |
|
| 530 |
clean_latents_pre = video_latents[:, :, -min(effective_clean_frames, video_latents.shape[2]):].to(history_latents) # smoother motion but jumpcuts if end frame is too different, must change clean_latent_pre_frames to effective_clean_frames also
|
| 531 |
clean_latents_post = history_latents[:, :, :min(effective_clean_frames, history_latents.shape[2]), :, :] # smoother motion, must change post_frames to effective_clean_frames also
|
| 532 |
|
| 533 |
if is_end_of_video:
|
| 534 |
+
print("µµµµµµµµµµµµµµµµµµµµµµµµµµµµµµ")
|
| 535 |
clean_latents_post = torch.zeros_like(end_of_input_video_latent).to(history_latents)
|
| 536 |
|
| 537 |
# 20250509 pftq: handle end frame if available
|
| 538 |
if end_latent is not None:
|
| 539 |
+
print("££££££££££££££££££££££££££££££")
|
| 540 |
#current_end_frame_weight = end_frame_weight * (latent_padding / latent_paddings[0])
|
| 541 |
#current_end_frame_weight = current_end_frame_weight * 0.5 + 0.5
|
| 542 |
current_end_frame_weight = end_frame_weight # changing this over time introduces discontinuity
|
|
|
|
| 550 |
|
| 551 |
# 20250511 pftq: Pad clean_latents_pre to match clean_latent_pre_frames if needed
|
| 552 |
if clean_latents_pre.shape[2] < clean_latent_pre_frames:
|
|
|
|
| 553 |
clean_latents_pre = clean_latents_pre.repeat(1, 1, clean_latent_pre_frames // clean_latents_pre.shape[2], 1, 1)
|
| 554 |
# 20250511 pftq: Pad clean_latents_post to match post_frames if needed
|
| 555 |
if clean_latents_post.shape[2] < post_frames:
|
|
|
|
| 556 |
clean_latents_post = clean_latents_post.repeat(1, 1, post_frames // clean_latents_post.shape[2], 1, 1)
|
| 557 |
|
| 558 |
clean_latents = torch.cat([clean_latents_pre, clean_latents_post], dim=2)
|