Compare commits

...
2 Commits
Author SHA1 Message Date
Adrien Toupet 4490bd1f48 Merge pull request #441 from AInVFX/main
v2.5.24: Restores the MPS memory leak workaround that was accidentally removed during code cleanup in v2.5.23
2025-12-24 09:52:32 +01:00
Adrien Toupet baec4b634f fix(vae): restore MPS memory leak workaround removed in v2.5.23 cleanup 2025-12-24 09:50:19 +01:00
4 changed files with 14 additions and 2 deletions
+4
View File
@@ -36,6 +36,10 @@ We're actively working on improvements and new features. To stay informed:
## 🚀 Release Notes ## 🚀 Release Notes
**2025.12.24 - Version 2.5.24**
- **🍎 Fix: MPS memory leak regression** - Restored MPS cache clearing after VAE encode/decode operations that was accidentally removed during code cleanup in v2.5.23
**2025.12.24 - Version 2.5.23** **2025.12.24 - Version 2.5.23**
- **🔒 Security: Prevent code execution in model loading** - Added protection against malicious .pth files by restricting deserialization to tensors only - **🔒 Security: Prevent code execution in model loading** - Added protection against malicious .pth files by restricting deserialization to tensors only
+1 -1
View File
@@ -1,7 +1,7 @@
[project] [project]
name = "seedvr2_videoupscaler" name = "seedvr2_videoupscaler"
description = "SeedVR2 official ComfyUI integration: ByteDance-Seed's one-step diffusion-based video/image upscaling with memory-efficient inference" description = "SeedVR2 official ComfyUI integration: ByteDance-Seed's one-step diffusion-based video/image upscaling with memory-efficient inference"
version = "2.5.23" version = "2.5.24"
authors = [ authors = [
{name = "numz"}, {name = "numz"},
{name = "adrientoupet"} {name = "adrientoupet"}
@@ -1224,6 +1224,10 @@ class VideoAutoencoderKL(diffusers.AutoencoderKL):
output = causal_conv_gather_outputs(output) output = causal_conv_gather_outputs(output)
# MPS memory leak workaround (pytorch/pytorch#155060)
if self.device.type == 'mps':
torch.mps.empty_cache()
# Only transfer back if needed # Only transfer back if needed
return output if output.device == x.device else output.to(x.device) return output if output.device == x.device else output.to(x.device)
@@ -1240,6 +1244,10 @@ class VideoAutoencoderKL(diffusers.AutoencoderKL):
output = self.decoder(_z, memory_state=memory_state) output = self.decoder(_z, memory_state=memory_state)
output = causal_conv_gather_outputs(output) output = causal_conv_gather_outputs(output)
# MPS memory leak workaround (pytorch/pytorch#155060)
if self.device.type == 'mps':
torch.mps.empty_cache()
# Only transfer back if needed # Only transfer back if needed
return output if output.device == z.device else output.to(z.device) return output if output.device == z.device else output.to(z.device)
+1 -1
View File
@@ -4,7 +4,7 @@ Only includes constants actually used in the codebase
""" """
# Version information # Version information
__version__ = "2.5.23" __version__ = "2.5.24"
import os import os
import warnings import warnings