Merge remote-tracking branch 'refs/remotes/azuze/main'

This commit is contained in:
2026-05-04 09:50:25 +02:00
5 changed files with 118 additions and 0 deletions
+8
View File
@@ -30,9 +30,14 @@ def apply_memory_strategy(pipe) -> None:
except Exception:
pass
<<<<<<< HEAD
if backend in ("cuda", "rocm"):
# ROCm builds expose the cuda API, so accelerate offload hooks work the same way.
# Offload only if VRAM tight.
=======
if backend == "cuda":
# Offload only if VRAM tight. cpu_offload is CUDA-only via accelerate hooks.
>>>>>>> refs/remotes/azuze/main
if vram < 10:
try:
pipe.enable_sequential_cpu_offload()
@@ -57,6 +62,7 @@ def apply_memory_strategy(pipe) -> None:
pipe.to("cpu")
return
<<<<<<< HEAD
if backend == "mps":
# Apple Silicon shares unified memory with CPU. accelerate's sequential offload
# has spotty MPS support; rely on slicing/tiling already enabled above.
@@ -79,5 +85,7 @@ def apply_memory_strategy(pipe) -> None:
pipe.to("cpu")
return
=======
>>>>>>> refs/remotes/azuze/main
# CPU
pipe.to("cpu")