Skip to content

Commit 398805d

Browse files
committed
vae decode handle HIP oom exceptions
1 parent 2865cb7 commit 398805d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

comfy/sd.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,9 @@ def decode(self, samples_in, vae_options={}):
529529
if pixel_samples is None:
530530
pixel_samples = torch.empty((samples_in.shape[0],) + tuple(out.shape[1:]), device=self.output_device)
531531
pixel_samples[x:x+batch_number] = out
532-
except model_management.OOM_EXCEPTION:
532+
except Exception as ex:
533+
if not model_management.is_oom_exception(ex):
534+
raise
533535
logging.warning("Warning: Ran out of memory when regular VAE decoding, retrying with tiled VAE decoding.")
534536
dims = samples_in.ndim - 2
535537
if dims == 1:

0 commit comments

Comments
 (0)