Skip to content

Commit

Permalink
fix outetts (#2595)
Browse files Browse the repository at this point in the history
CVS-158800
  • Loading branch information
eaidova authored Dec 16, 2024
1 parent 62cc22f commit 0a97a03
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions notebooks/outetts-text-to-speech/ov_outetts_helper.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import torch
from optimum.intel.openvino import OVModelForCausalLM
from dataclasses import dataclass, field

try:
from outetts.version.v1.interface import InterfaceHF
Expand All @@ -17,6 +18,20 @@
updated_version = False


@dataclass
class HFModelConfig:
model_path: str = "OuteAI/OuteTTS-0.2-500M"
language: str = "en"
tokenizer_path: str = None
languages: list = field(default_factory=list)
verbose: bool = False
device: str = None
dtype: torch.dtype = None
additional_model_config: dict = field(default_factory=dict)
wavtokenizer_model_path: str = None
max_seq_length: int = 4096


class OVHFModel(HFModel):
def __init__(self, model_path, device):
self.device = torch.device("cpu")
Expand All @@ -37,3 +52,4 @@ def __init__(
self.verbose = False
self.languages = ["en"]
self._device = torch.device("cpu")
self.config = HFModelConfig(model_path=model_path, language="en", device=self._device)

0 comments on commit 0a97a03

Please sign in to comment.