fix: AdaIN color correction and AMD ROCm compatibility (v2.5.4)
- Fix AdaIN non-contiguous tensor error by using reshape() instead of view() - Add cuDNN availability checks to prevent ROCm 'ATen not compiled with cuDNN' error
This commit is contained in:
@@ -36,6 +36,11 @@ We're actively working on improvements and new features. To stay informed:
|
||||
|
||||
## 🚀 Updates
|
||||
|
||||
**2025.11.08 - Version 2.5.4**
|
||||
|
||||
- 🎨 **Fix: AdaIN color correction** - Replace `.view()` with `.reshape()` to handle non-contiguous tensors after spatial padding, resolving "view size is not compatible with input tensor's size and stride" error
|
||||
- 🔴 **Fix: AMD ROCm compatibility** - Add cuDNN availability check in Conv3d workaround to prevent "ATen not compiled with cuDNN support" error on ROCm systems (AMD GPUs on Windows/Linux)
|
||||
|
||||
**2025.11.08 - Version 2.5.3**
|
||||
|
||||
- 🍎 **Fix: Apple Silicon MPS device handling** - Corrected MPS device enumeration to use `"mps"` instead of `"mps:0"`, resolving invalid device errors on M-series Macs
|
||||
|
||||
+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.3"
|
||||
version = "2.5.4"
|
||||
authors = [
|
||||
{name = "numz"},
|
||||
{name = "adrientoupet"}
|
||||
|
||||
@@ -91,8 +91,12 @@ class InflatedCausalConv3d(Conv3d):
|
||||
Workaround: Call torch.cudnn_convolution directly to bypass buggy layer.
|
||||
Status is logged at startup in compatibility.py.
|
||||
"""
|
||||
if NVIDIA_CONV3D_MEMORY_BUG_WORKAROUND and weight.dtype in (torch.float16, torch.bfloat16):
|
||||
# Direct cuDNN call bypasses buggy PyTorch dispatch layer
|
||||
if (NVIDIA_CONV3D_MEMORY_BUG_WORKAROUND and
|
||||
weight.dtype in (torch.float16, torch.bfloat16) and
|
||||
hasattr(torch.backends.cudnn, 'is_available') and
|
||||
torch.backends.cudnn.is_available() and
|
||||
getattr(torch.backends.cudnn, 'enabled', True)):
|
||||
# Direct cuDNN call bypasses buggy PyTorch dispatch layer (NVIDIA only)
|
||||
out = torch.cudnn_convolution(
|
||||
input, weight, self.padding, self.stride, self.dilation, self.groups,
|
||||
benchmark=False, deterministic=False, allow_tf32=True
|
||||
|
||||
@@ -84,9 +84,9 @@ def calc_mean_std(feat: Tensor, eps: float = 1e-5) -> tuple[Tensor, Tensor]:
|
||||
assert len(size) == 4, 'The input feature should be 4D tensor.'
|
||||
b, c = size[:2]
|
||||
|
||||
feat_var = feat.view(b, c, -1).var(dim=2) + eps
|
||||
feat_std = feat_var.sqrt().view(b, c, 1, 1)
|
||||
feat_mean = feat.view(b, c, -1).mean(dim=2).view(b, c, 1, 1)
|
||||
feat_var = feat.reshape(b, c, -1).var(dim=2) + eps
|
||||
feat_std = feat_var.sqrt().reshape(b, c, 1, 1)
|
||||
feat_mean = feat.reshape(b, c, -1).mean(dim=2).reshape(b, c, 1, 1)
|
||||
|
||||
return feat_mean, feat_std
|
||||
|
||||
|
||||
Reference in New Issue
Block a user