From 0ab091e7ff6fac4dee7582d44875493daaeea265 Mon Sep 17 00:00:00 2001 From: mrq Date: Wed, 8 Mar 2023 16:09:29 +0000 Subject: [PATCH] oops --- src/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.py b/src/utils.py index ba0d691..75ab473 100755 --- a/src/utils.py +++ b/src/utils.py @@ -297,14 +297,14 @@ def generate( latents_path = f'{get_voice_dir()}/{voice}/cond_latents.pth' if voice == "random" or voice == "microphone": - if latents and settings['conditioning_latents']: + if latents and settings is not None and settings['conditioning_latents']: dir = f'{get_voice_dir()}/{voice}/' if not os.path.isdir(dir): os.makedirs(dir, exist_ok=True) latents_path = f'{dir}/cond_latents.pth' torch.save(conditioning_latents, latents_path) else: - if settings and "model_hash" in settings: + if settings is not None and "model_hash" in settings: latents_path = f'{get_voice_dir()}/{voice}/cond_latents_{settings["model_hash"][:8]}.pth' else: latents_path = f'{get_voice_dir()}/{voice}/cond_latents_{tts.autoregressive_model_hash[:8]}.pth'