Skip to content

Commit

Permalink
chore(format): run black on dev (#791)
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] authored Oct 17, 2024
1 parent d9e2eba commit cff3b4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ChatTTS/model/dvae.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def __call__(
self, inp: torch.Tensor, mode: Literal["encode", "decode"] = "decode"
) -> torch.Tensor:
return super().__call__(inp, mode)

@torch.inference_mode()
def load_pretrained(self, filename: str, device: torch.device):
state_dict_tensors = load_safetensors(filename)
Expand Down
1 change: 1 addition & 0 deletions ChatTTS/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def load_safetensors(filename: str):
state_dict_tensors[k] = f.get_tensor(k)
return state_dict_tensors


def get_latest_modified_file(directory):

files = [os.path.join(directory, f) for f in os.listdir(directory)]
Expand Down
8 changes: 2 additions & 6 deletions examples/web/webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,8 @@ def make_audio(autoplay, stream):
)
parser.add_argument("--server_port", type=int, default=8080, help="server port")
parser.add_argument("--root_path", type=str, help="root path")
parser.add_argument(
"--custom_path", type=str, help="custom model path"
)
parser.add_argument(
"--coef", type=str, help="custom dvae coefficient"
)
parser.add_argument("--custom_path", type=str, help="custom model path")
parser.add_argument("--coef", type=str, help="custom dvae coefficient")
args = parser.parse_args()

logger.info("loading ChatTTS model...")
Expand Down

0 comments on commit cff3b4e

Please sign in to comment.