Remove latent upscale CPU fallback
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user