Spaces:
Paused
Paused
Update mira/model.py
Browse files- mira/model.py +6 -3
mira/model.py
CHANGED
|
@@ -11,6 +11,7 @@ class MiraTTS_GPU:
|
|
| 11 |
def __init__(self, model_dir="rahul7star/mir-TTS", tp=1, enable_prefix_caching=True, cache_max_entry_count=0.2):
|
| 12 |
|
| 13 |
backend_config = TurbomindEngineConfig(cache_max_entry_count=cache_max_entry_count, tp=tp, dtype='bfloat16', enable_prefix_caching=enable_prefix_caching)
|
|
|
|
| 14 |
self.pipe = pipeline(model_dir, backend_config=backend_config)
|
| 15 |
self.gen_config = GenerationConfig(top_p=0.95,
|
| 16 |
top_k=50,
|
|
@@ -86,11 +87,13 @@ class MiraTTS:
|
|
| 86 |
|
| 87 |
def __init__(self, model_dir="rahul7star/mir-TTS", tp=1, enable_prefix_caching=True, cache_max_entry_count=0.2):
|
| 88 |
# Use float32 for CPU
|
|
|
|
|
|
|
|
|
|
| 89 |
backend_config = TurbomindEngineConfig(
|
| 90 |
-
|
| 91 |
-
tp=tp,
|
| 92 |
dtype="float32", # CPU compatible
|
| 93 |
-
|
| 94 |
)
|
| 95 |
self.pipe = pipeline(model_dir, backend_config=backend_config, device="cpu")
|
| 96 |
|
|
|
|
| 11 |
def __init__(self, model_dir="rahul7star/mir-TTS", tp=1, enable_prefix_caching=True, cache_max_entry_count=0.2):
|
| 12 |
|
| 13 |
backend_config = TurbomindEngineConfig(cache_max_entry_count=cache_max_entry_count, tp=tp, dtype='bfloat16', enable_prefix_caching=enable_prefix_caching)
|
| 14 |
+
|
| 15 |
self.pipe = pipeline(model_dir, backend_config=backend_config)
|
| 16 |
self.gen_config = GenerationConfig(top_p=0.95,
|
| 17 |
top_k=50,
|
|
|
|
| 87 |
|
| 88 |
def __init__(self, model_dir="rahul7star/mir-TTS", tp=1, enable_prefix_caching=True, cache_max_entry_count=0.2):
|
| 89 |
# Use float32 for CPU
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
|
| 93 |
backend_config = TurbomindEngineConfig(
|
| 94 |
+
|
|
|
|
| 95 |
dtype="float32", # CPU compatible
|
| 96 |
+
cache_max_entry_count=0.0
|
| 97 |
)
|
| 98 |
self.pipe = pipeline(model_dir, backend_config=backend_config, device="cpu")
|
| 99 |
|