Skip to content

Commit

Permalink
chore(format): run black on main (#508)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] committed Jul 2, 2024
1 parent 7515712 commit 6b13131
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ChatTTS/model/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def _build_llama(
if "cuda" in str(device) and platform.system().lower() == "linux":
try:
from .cuda import TELlamaModel

model = TELlamaModel(LlamaConfig(**config))
self.logger.info("Linux with CUDA, try NVIDIA accelerated TELlamaModel")
except Exception as e:
Expand Down Expand Up @@ -133,9 +134,7 @@ def prepare(self, compile=False):
self.compile(backend="inductor", dynamic=True)
self.gpt.compile(backend="inductor", dynamic=True)
except RuntimeError as e:
self.logger.warning(
f"compile failed: {e}. fallback to normal mode."
)
self.logger.warning(f"compile failed: {e}. fallback to normal mode.")

def __call__(
self, input_ids: torch.Tensor, text_mask: torch.Tensor
Expand Down

0 comments on commit 6b13131

Please sign in to comment.