Fix export range, progress bar, blend params, and temp file cleanup

- Fix _sequence_frame_count excluding direct interpolation frames,
  which caused export range max to be too small and truncate output
- Fix blend_images call missing optical flow parameters (of_levels,
  of_winsize, of_iterations, of_poly_n, of_poly_sigma) — optical
  flow blends in transition export used defaults instead of user config
- Fix progress bar not reaching 100% when direct interpolation is
  used — current_op was never incremented for generated frames
- Fix BiM-VFI temp files (bimvfi_temp_*.png) not cleaned up by
  orphan removal in manager.py
- Update "+" row text to say "AI transition" instead of "RIFE/FILM"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 22:17:55 +01:00
parent 3d654efcfd
commit 6b7d9b969b
2 changed files with 15 additions and 6 deletions
+4 -4
View File
@@ -85,7 +85,7 @@ class SymlinkManager:
Handles all naming formats:
- Old folder-indexed: seq01_0000.png
- Continuous: seq_00000.png
Also removes blended image files and film_temp_*.png temporaries.
Also removes blended image files and film/bimvfi temp .png files.
Args:
directory: Directory to clean up.
@@ -101,7 +101,7 @@ class SymlinkManager:
r'^seq\d*_\d+\.(png|jpg|jpeg|webp)$', re.IGNORECASE
)
temp_pattern = re.compile(
r'^film_temp_\d+\.png$', re.IGNORECASE
r'^(film|bimvfi)_temp_\d+\.png$', re.IGNORECASE
)
try:
for item in directory.iterdir():
@@ -124,7 +124,7 @@ class SymlinkManager:
@staticmethod
def remove_orphan_files(directory: Path, keep_names: set[str]) -> int:
"""Remove seq* files and film_temp_* not in the keep set.
"""Remove seq* files and film/bimvfi temp files not in the keep set.
Same pattern matching as cleanup_old_links but skips filenames
present in keep_names.
@@ -144,7 +144,7 @@ class SymlinkManager:
r'^seq\d*_\d+\.(png|jpg|jpeg|webp)$', re.IGNORECASE
)
temp_pattern = re.compile(
r'^film_temp_\d+\.png$', re.IGNORECASE
r'^(film|bimvfi)_temp_\d+\.png$', re.IGNORECASE
)
try:
for item in directory.iterdir():
+11 -2
View File
@@ -1810,6 +1810,10 @@ class SequenceLinkerUI(QWidget):
fid = self._folder_ids[folder_idx]
# Add direct interpolation row after this folder's files
self._add_direct_interpolation_row(fid, folder, pair_idx_b)
# Count direct interpolation frames in the output total
direct_settings = self._direct_transitions.get(fid)
if direct_settings and direct_settings.enabled:
output_seq += direct_settings.frame_count
self._sequence_frame_count = output_seq
self.sequence_table.setUpdatesEnabled(True)
@@ -1851,7 +1855,7 @@ class SequenceLinkerUI(QWidget):
self.sequence_table.addTopLevelItem(placeholder_item)
else:
# Unconfigured: show grey "+" row
add_text = " [+ Add RIFE/FILM transition] (click to configure)"
add_text = " [+ Add AI transition] (click to configure)"
add_item = QTreeWidgetItem([add_text, ""])
add_item.setData(0, Qt.ItemDataRole.UserRole, ('direct_add', fid))
add_item.setForeground(0, QColor(150, 150, 150)) # Grey
@@ -6074,7 +6078,10 @@ class SequenceLinkerUI(QWidget):
settings.output_quality, settings.webp_method,
settings.blend_method, settings.rife_binary_path,
settings.rife_model, settings.rife_uhd, settings.rife_tta,
settings.practical_rife_model, settings.practical_rife_ensemble
settings.practical_rife_model, settings.practical_rife_ensemble,
settings.of_levels, settings.of_winsize,
settings.of_iterations, settings.of_poly_n,
settings.of_poly_sigma
)
if result.success:
@@ -6229,6 +6236,8 @@ class SequenceLinkerUI(QWidget):
f"Direct interp {result.output_path.name}: {result.error}"
)
output_seq += 1
current_op += 1
progress.setValue(current_op)
else:
output_seq += direct_settings.frame_count