fix(examples): conda package name conflict (#701)

This commit is contained in:
源文雨
2024-08-24 00:48:20 +08:00
parent a27357fbcf
commit 554554c591
3 changed files with 14 additions and 5 deletions
+10 -2
View File
@@ -1,6 +1,13 @@
import os, sys
if sys.platform == "darwin":
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
now_dir = os.getcwd()
sys.path.append(now_dir)
from dataclasses import asdict
import argparse
import os
import torch
from tqdm import tqdm
from ChatTTS.model.dvae import DVAE
@@ -8,7 +15,8 @@ from ChatTTS.config import Config
from vocos import Vocos
from vocos.pretrained import instantiate_class
import torch.jit as jit
from examples.onnx.gpt import GPT
from gpt import GPT
# disable cuda
torch.cuda.is_available = lambda: False
+2 -1
View File
@@ -4,7 +4,8 @@ from typing import Tuple
import torch
import torch.nn as nn
from torch.nn.utils.parametrizations import weight_norm
from .modeling_llama import LlamaModel, LlamaConfig
from modeling_llama import LlamaModel, LlamaConfig
class GPT(nn.Module):
+2 -2
View File
@@ -10,8 +10,8 @@ import argparse
import gradio as gr
from examples.web.funcs import *
from examples.web.ex import ex
from funcs import *
from ex import ex
def main():