Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid typing.Literal['ultra_fast', 'fast', 'standard', 'high_quality'] value: 'fast' #114

Open
sanane-ulan opened this issue Jul 9, 2023 · 4 comments

Comments

@sanane-ulan
Copy link

Hello,

When I try to run from CLI, I am getting this error:

(.venv) ┌──[15:34:25]─[0]─[akcaym@fedora:/mnt/SD_Partiton/TTS/tortoise-tts-fast/scripts]
└──| ./tortoise_tts.py "Hello"
usage: tortoise_tts.py [-h] [-v str] [-V [str]] [-p typing.Literal['ultra_fast', 'fast', 'standard', 'high_quality']] [-q bool] [--voicefixer bool] [-l bool] [-P bool] [-o [Path]] [-O Path] [--candidates int] [--regenerate [str]]
[--skip_existing bool] [--produce_debug_state bool] [--seed [int]] [--models_dir str] [--text_split [str]] [--disable_redaction bool] [--device [str]] [--batch_size [int]]
[--vocoder typing.Literal['Univnet', 'BigVGAN', 'BigVGAN_Base']] [--ar_checkpoint [str]] [--clvp_checkpoint [str]] [--diff_checkpoint [str]] [--num_autoregressive_samples [int]] [--temperature [float]]
[--length_penalty [float]] [--repetition_penalty [float]] [--top_p [float]] [--max_mel_tokens [int]] [--cvvp_amount [float]] [--diffusion_iterations [int]] [--cond_free [bool]] [--cond_free_k [float]]
[--diffusion_temperature [float]] [--low_vram bool] [--half bool] [--no_cache bool] [--sampler {dpm++2m,p,ddim}] [--original_tortoise bool]
text

tortoise_tts.py: error: argument -p/--preset: invalid typing.Literal['ultra_fast', 'fast', 'standard', 'high_quality'] value: 'fast'

OS: Fedora Linux 37 (KDE Plasma) x86_64
CPU: Intel i7-6700HQ (8) @ 3.500GHz
GPU: NVIDIA GeForce GTX 960M (4GB)
Memory: 16GB

Can someone help me?

Thanks

P.S: I am not professional coder, so sorry if am asking wrong

@SlyAquaGuy
Copy link

Also having this issue on windows 11, regardless of input for -p.

@Finder7771
Copy link

Have same issue. Do you have any updates ?

@vuapo-eth
Copy link

Same issue here

@Protossoario
Copy link

Protossoario commented Aug 1, 2023

The source of the issue is the simple_parsing module having issues with handling the Literal type in Python version 3.9 specifically. See: lebrice/SimpleParsing#259

The suggested workaround is to import the Literal type as:

from typing_extensions import Literal

I'll see if I can get a PR in. For anyone else having this issue, simply replace the import inside the tortoise_tts.py script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants