mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-11 08:47:29 +08:00
Add cleanup only on the error exit (when tile < 128) before re-raising the OOM exception
This commit is contained in:
parent
70408503fb
commit
b749e0db49
@ -89,6 +89,7 @@ class ImageUpscaleWithModel(io.ComfyNode):
|
||||
except model_management.OOM_EXCEPTION as e:
|
||||
tile //= 2
|
||||
if tile < 128:
|
||||
upscale_model.to("cpu")
|
||||
raise e
|
||||
|
||||
# upscale_model.to("cpu") # Commented out to keep model on GPU because when processing batch images then model unnecessarily moves to CPU
|
||||
|
||||
Loading…
Reference in New Issue
Block a user