diff --git a/helpers/data_backend/factory.py b/helpers/data_backend/factory.py index 3fda5f7b..7e794f75 100644 --- a/helpers/data_backend/factory.py +++ b/helpers/data_backend/factory.py @@ -534,7 +534,6 @@ def configure_multi_databackend( info_log(f"Configuring data backend: {backend['id']}") # Retrieve some config file overrides for commandline arguments, eg. cropping init_backend = init_backend_config(backend, args, accelerator) - info_log(f"Configured backend: {init_backend}") StateTracker.set_data_backend_config( data_backend_id=init_backend["id"], config=init_backend["config"], @@ -730,9 +729,7 @@ def configure_multi_databackend( if current_config_version is None: # backwards compatibility for non-versioned config files, so that we do not enable life-changing options. current_config_version = 1 - init_backend["config"]["hash_filenames"] = False - if "hash_filenames" not in prev_config and current_config_version < 2: - init_backend["config"]["hash_filenames"] = False + logger.debug( f"Found existing config (version={current_config_version}): {prev_config}" ) @@ -886,6 +883,9 @@ def configure_multi_databackend( hash_filenames = init_backend.get("config", {}).get( "hash_filenames", default_hash_option ) + init_backend["config"]["hash_filenames"] = hash_filenames + StateTracker.set_data_backend_config(init_backend["id"], init_backend["config"]) + logger.debug(f"Hashing filenames: {hash_filenames}") if "deepfloyd" not in StateTracker.get_args().model_type: info_log(f"(id={init_backend['id']}) Creating VAE latent cache.") @@ -978,6 +978,8 @@ def configure_multi_databackend( ) accelerator.wait_for_everyone() + info_log(f"Configured backend: {init_backend}") + StateTracker.register_data_backend(init_backend) init_backend["metadata_backend"].save_cache()