mirror of
https://github.com/2noise/ChatTTS.git
synced 2026-08-28 17:45:02 +08:00
chore(format): run black on dev (#791)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d9e2eba1c4
commit
cff3b4e5c3
@@ -251,7 +251,7 @@ class DVAE(nn.Module):
|
||||
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)
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -249,12 +249,8 @@ def main():
|
||||
)
|
||||
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...")
|
||||
|
||||
Reference in New Issue
Block a user