Remove latent upscale CPU fallback

This commit is contained in:
2026-09-04 08:13:27 +00:00
parent 30ae81b86b
commit 9f0c546681
2 changed files with 8 additions and 40 deletions
+4 -15
View File
@@ -604,21 +604,10 @@ def upscale_video_model(video, param):
raise
smaller = _shrink_model_tile_param(param)
if smaller is None:
if str(param.get("device", "cuda")) != "cpu":
cpu_param = dict(param)
cpu_param["device"] = "cpu"
cpu_param["precision"] = "fp32"
try:
gc.collect()
except Exception:
pass
if torch.cuda.is_available():
try:
torch.cuda.empty_cache()
except Exception:
pass
return upscale_video_model(video, cpu_param)
raise
raise RuntimeError(
"H3 latent upscale exhausted its GPU spatial fallbacks. "
"Reduce the target size, tile size, or split the shot earlier."
) from exc
try:
gc.collect()
except Exception: