Bug fix
Fixed error in catching OOM
This commit is contained in:
@@ -273,7 +273,9 @@ class TangoFluxVAEDecodeAndPlay:
|
||||
results = torch.cat(results, dim=0)
|
||||
return results
|
||||
|
||||
except torch.OutOfMemoryError:
|
||||
except (torch.cuda.OutOfMemoryError, RuntimeError) as e:
|
||||
if isinstance(e, RuntimeError) and "out of memory" not in str(e):
|
||||
raise e
|
||||
torch.cuda.empty_cache()
|
||||
log.warning("OOM encountered. Falling back to tiled decoding.")
|
||||
return self.decode_tiled(vae, latents, tile_size)
|
||||
|
||||
Reference in New Issue
Block a user