mirror of
https://github.com/yuruotong1/autoMate.git
synced 2025-12-26 05:16:21 +08:00
更新readme和启动提示
This commit is contained in:
parent
b3d66c669c
commit
ce8d7cb6b3
11
README.md
11
README.md
@ -29,6 +29,17 @@ python main.py
|
||||
## 问题
|
||||
可以通过`pip list`查看pytorch版本,然后从[官网]([官网](https://pytorch.org/get-started/locally/)查看支持的cuda版本。如果cuda不匹配就无法使用GPU,这会导致运行过程非常卡。比如如果`pip list`查看的 torch 版本为 2.6.0,那么它只支持cuda版本为11.8、12.4和12.6,请升级或者降级你的cuda版本到这几个版本。
|
||||
|
||||
如果启动时报:“显卡驱动不适配,请根据readme安装合适版本的 torch”。那么你需要:
|
||||
1. 卸载当前PyTorch版本
|
||||
```shell
|
||||
pip uninstall torch torchvision torchaudio
|
||||
```
|
||||
2. 安装支持CUDA 12.6(你自己的cuda版本)的PyTorch版本,访问PyTorch官网(https://pytorch.org/get-started/locally/)
|
||||
然后复制网站生成的安装命令,类似于:
|
||||
```bash
|
||||
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
|
||||
```
|
||||
|
||||
## 🤝 参与共建
|
||||
|
||||
请参考[贡献指南](https://s0soyusc93k.feishu.cn/wiki/ZE7KwtRweicLbNkHSdMcBMTxngg?from=from_copylink).
|
||||
|
||||
9
main.py
9
main.py
@ -5,7 +5,15 @@ import sys
|
||||
from gradio_ui import app
|
||||
from util import download_weights
|
||||
import time
|
||||
import torch
|
||||
def run():
|
||||
try:
|
||||
print(torch.cuda.is_available()) # 应该返回True
|
||||
print(torch.cuda.device_count()) # 应该至少返回1
|
||||
print(torch.cuda.get_device_name(0)) # 应该显示您的GPU名称
|
||||
except Exception:
|
||||
print("显卡驱动不适配,请根据readme安装合适版本的 torch!")
|
||||
|
||||
# 启动 server.py 子进程,并捕获其输出
|
||||
server_process = subprocess.Popen(
|
||||
["python", "./server.py"],
|
||||
@ -18,6 +26,7 @@ def run():
|
||||
try:
|
||||
# 下载权重文件
|
||||
download_weights.download()
|
||||
print("启动Omniserver服务中,约20s左右,请耐心等待!")
|
||||
# 启动 Gradio UI
|
||||
# 等待 server_process 打印出 "Started server process"
|
||||
while True:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user