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:
github-actions[bot]
2024-10-18 02:08:59 +09:00
committed by GitHub
parent d9e2eba1c4
commit cff3b4e5c3
3 changed files with 4 additions and 7 deletions
+1 -1
View File
@@ -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)
+1
View File
@@ -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)]
+2 -6
View File
@@ -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...")