Release v2.5.22: FFmpeg 10-bit video backend, MPS bicubic fix, cross-platform histogram matching
Note: index_select(out=) optimization removed as it caused color polarization on MPS; using simple indexing instead
This commit is contained in:
@@ -36,6 +36,13 @@ We're actively working on improvements and new features. To stay informed:
|
||||
|
||||
## 🚀 Release Notes
|
||||
|
||||
**2025.12.13 - Version 2.5.22**
|
||||
|
||||
- **🎬 CLI: FFmpeg video backend with 10-bit support** - New `--video_backend ffmpeg` and `--10bit` flags enable x265 encoding with 10-bit color depth, reducing banding artifacts in gradients compared to 8-bit OpenCV output *(based on PR by [@thehhmdb](https://github.com/thehhmdb) - thank you!)*
|
||||
- **🍎 Fix: MPS bicubic upscaling compatibility** - Added CPU fallback for bicubic+antialias interpolation on PyTorch versions before 2.8.0, resolving RGBA alpha upscaling errors on Apple Silicon
|
||||
- **⚡ Fix: Cross-platform histogram matching** - Replaced scatter_ operation with argsort+index_select for improved reliability across CUDA, ROCm, and MPS backends
|
||||
- **🧹 MPS: Remove sync overhead** - Reverted unnecessary `torch.mps.synchronize()` calls introduced in v2.5.21 for consistent behavior with CUDA pipeline
|
||||
|
||||
**2025.12.12 - Version 2.5.21**
|
||||
|
||||
- **🛠️ Fix: GGUF dequantization error on MPS** - Resolved shape mismatch error introduced in 2.5.20 by skipping GGUF quantized buffers in precision conversion - these must remain in packed format for on-the-fly dequantization during inference
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "seedvr2_videoupscaler"
|
||||
description = "SeedVR2 official ComfyUI integration: ByteDance-Seed's one-step diffusion-based video/image upscaling with memory-efficient inference"
|
||||
version = "2.5.21"
|
||||
version = "2.5.22"
|
||||
authors = [
|
||||
{name = "numz"},
|
||||
{name = "adrientoupet"}
|
||||
|
||||
@@ -506,15 +506,15 @@ def _histogram_matching_channel(source: Tensor, reference: Tensor, device: torch
|
||||
matched_sorted = reference_sorted[ref_indices]
|
||||
del source_quantiles, ref_indices, reference_sorted
|
||||
|
||||
del source_sorted
|
||||
del source_sorted, source_flat
|
||||
|
||||
# Reconstruct using index_select with out param (portable, memory-efficient)
|
||||
# Reconstruct using argsort (portable across CUDA/ROCm/MPS)
|
||||
inverse_indices = torch.argsort(source_indices)
|
||||
del source_indices
|
||||
torch.index_select(matched_sorted, 0, inverse_indices, out=source_flat)
|
||||
matched_flat = matched_sorted[inverse_indices]
|
||||
del matched_sorted, inverse_indices
|
||||
|
||||
return source_flat.reshape(original_shape)
|
||||
return matched_flat.reshape(original_shape)
|
||||
|
||||
|
||||
def hsv_saturation_histogram_match(content_feat: Tensor, style_feat: Tensor, debug: Optional['Debug'] = None) -> Tensor:
|
||||
@@ -756,11 +756,10 @@ def _histogram_match_1d(source: Tensor, reference: Tensor, device: torch.device)
|
||||
|
||||
del source_sorted
|
||||
|
||||
# Reconstruct using index_select with out param (portable, memory-efficient)
|
||||
matched = torch.empty_like(source)
|
||||
# Reconstruct using argsort (portable across CUDA/ROCm/MPS)
|
||||
inverse_indices = torch.argsort(source_indices)
|
||||
del source_indices
|
||||
torch.index_select(matched_sorted, 0, inverse_indices, out=matched)
|
||||
matched = matched_sorted[inverse_indices]
|
||||
del matched_sorted, inverse_indices
|
||||
|
||||
return matched
|
||||
|
||||
@@ -4,7 +4,7 @@ Only includes constants actually used in the codebase
|
||||
"""
|
||||
|
||||
# Version information
|
||||
__version__ = "2.5.21"
|
||||
__version__ = "2.5.22"
|
||||
|
||||
import os
|
||||
import warnings
|
||||
|
||||
Reference in New Issue
Block a user