Skip to content

Commit

Permalink
Merge pull request #1164 from bghira/bugfix/cache-dir-location-err
Browse files Browse the repository at this point in the history
error out when cache dir path is not found
  • Loading branch information
bghira authored Nov 16, 2024
2 parents b815fb4 + c6ce738 commit 1e0b8d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions helpers/data_backend/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,13 @@ def configure_multi_databackend(args: dict, accelerator, text_encoders, tokenize
raise ValueError(
f"VAE image embed cache directory {backend.get('cache_dir_vae')} is the same as the text embed cache directory. This is not allowed, the trainer will get confused."
)

if backend["type"] == "local" and (
vae_cache_dir is None or vae_cache_dir == ""
):
raise ValueError(
f"VAE image embed cache directory {backend.get('cache_dir_vae')} is not set. This is required for the VAE image embed cache."
)
init_backend["vaecache"] = VAECache(
id=init_backend["id"],
vae=StateTracker.get_vae(),
Expand Down

0 comments on commit 1e0b8d5

Please sign in to comment.