make bitsandbytes optional

This commit is contained in:
Kohya S
2023-08-04 22:29:14 +09:00
parent f3be995c28
commit 9d855091bf
6 changed files with 128 additions and 429 deletions

View File

@@ -2164,6 +2164,7 @@ def cache_batch_latents(
if flip_aug:
info.latents_flipped = flipped_latent
# FIXME this slows down caching a lot, specify this as an option
if torch.cuda.is_available():
torch.cuda.empty_cache()