Skip to content

Commit 554554c

Browse files
committed
fix(examples): conda package name conflict (#701)
1 parent a27357f commit 554554c

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

examples/onnx/exporter.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1+
import os, sys
2+
3+
if sys.platform == "darwin":
4+
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
5+
6+
now_dir = os.getcwd()
7+
sys.path.append(now_dir)
8+
19
from dataclasses import asdict
210
import argparse
3-
import os
411
import torch
512
from tqdm import tqdm
613
from ChatTTS.model.dvae import DVAE
714
from ChatTTS.config import Config
815
from vocos import Vocos
916
from vocos.pretrained import instantiate_class
1017
import torch.jit as jit
11-
from examples.onnx.gpt import GPT
18+
19+
from gpt import GPT
1220

1321
# disable cuda
1422
torch.cuda.is_available = lambda: False

examples/onnx/gpt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
import torch
55
import torch.nn as nn
66
from torch.nn.utils.parametrizations import weight_norm
7-
from .modeling_llama import LlamaModel, LlamaConfig
7+
8+
from modeling_llama import LlamaModel, LlamaConfig
89

910

1011
class GPT(nn.Module):

examples/web/webui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
import gradio as gr
1212

13-
from examples.web.funcs import *
14-
from examples.web.ex import ex
13+
from funcs import *
14+
from ex import ex
1515

1616

1717
def main():

0 commit comments

Comments
 (0)