About using this model locally
Why do I use the pytorch version to download the content in the gguf version, is there a problem with the way I cite it?Here's how I called==》def convert():
# 使用绝对路径
# model_path = os.path.join(os.path.dirname(file), "outer_tts", "Llama-OuteTTS-1.0-1B")
model_path = r'D:\test\outer-tts\outer_tts\Llama-OuteTTS-1.0-1B'
if not os.path.exists(model_path):
raise FileNotFoundError(f"Model not found at: {model_path}")
print(f"Loading model from: {model_path}")
interface = outetts.Interface(
config=outetts.ModelConfig(
model=model_path,
backend=outetts.Backend.LLAMACPP,
quantization=outetts.LlamaCppQuantization.FP16
)
)
# Load the default speaker profile
speaker = interface.load_default_speaker("EN-FEMALE-1-NEUTRAL")
# Or create your own speaker profiles in seconds and reuse them instantly
# speaker = interface.create_speaker("path/to/audio.wav")
# interface.save_speaker(speaker, "speaker.json")
# speaker = interface.load_speaker("speaker.json")
# Generate speech
output = interface.generate(
config=outetts.GenerationConfig(
text="Hello, how are you doing?",
generation_type=outetts.GenerationType.CHUNKED,
speaker=speaker,
sampler_config=outetts.SamplerConfig(
temperature=0.4
),
)
)
# Save to file
output.save("output.wav")
Hi,
You're using the interface incorrectly. Either use the automatic config, it should handle everything for you:
config = outetts.ModelConfig.auto_config(
model=outetts.Models.VERSION_1_0_SIZE_1B,
backend=outetts.Backend.LLAMACPP,
quantization=outetts.LlamaCppQuantization.FP16
)
Or manual configuration, you must provide both model_path
and tokenizer_path
(note that the tokenizer is always Transformers-based).
For llama.cpp, you need a model in GGUF format. With your current config, you're trying to load a safetensors model into llama.cpp, which won't work. Also, you're using a model
variable in ModelConfig
, but there is no such parameter. You should do something like this:
config = outetts.ModelConfig(
model_path="path/to/model.gguf", # e.g., ./Llama-OuteTTS-1.0-1B-Q8_0.gguf
tokenizer_path="OuteAI/Llama-OuteTTS-1.0-1B", # Tokenizer from the repo
interface_version=outetts.InterfaceVersion.V3,
backend=outetts.Backend.LLAMACPP,
n_gpu_layers=99
)
You can find GGUF models here:
https://huggingface.co/OuteAI/Llama-OuteTTS-1.0-1B-GGUF/tree/main
And check the docs:
https://github.com/edwko/OuteTTS/blob/main/docs/interface_usage.md
Hi,
You're using the interface incorrectly. Either use the automatic config, it should handle everything for you:
config = outetts.ModelConfig.auto_config( model=outetts.Models.VERSION_1_0_SIZE_1B, backend=outetts.Backend.LLAMACPP, quantization=outetts.LlamaCppQuantization.FP16 )
Or manual configuration, you must provide both
model_path
andtokenizer_path
(note that the tokenizer is always Transformers-based).For llama.cpp, you need a model in GGUF format. With your current config, you're trying to load a safetensors model into llama.cpp, which won't work. Also, you're using a
model
variable inModelConfig
, but there is no such parameter. You should do something like this:
config = outetts.ModelConfig( model_path="path/to/model.gguf", # e.g., ./Llama-OuteTTS-1.0-1B-Q8_0.gguf tokenizer_path="OuteAI/Llama-OuteTTS-1.0-1B", # Tokenizer from the repo interface_version=outetts.InterfaceVersion.V3, backend=outetts.Backend.LLAMACPP, n_gpu_layers=99 )
You can find GGUF models here:
https://huggingface.co/OuteAI/Llama-OuteTTS-1.0-1B-GGUF/tree/mainAnd check the docs:
https://github.com/edwko/OuteTTS/blob/main/docs/interface_usage.md
okay thx,This has been very useful to me