README.md 1.79 KB
Newer Older
hepj's avatar
hepj committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# hunyuanDit模型

## 镜像获取

http://112.11.119.100:18000/download/hy_dit_latest_perf.tar.gz

```Bash
#启动脚本参考
docker run -it  --network=host --name=dit-test  --privileged --device=/dev/kfd --device=/dev/dri --ipc=host  --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined  --ulimit stack=-1:-1 --ulimit memlock=-1:-1 -v /usr/local/hyhal/:/usr/local/hyhal/:ro  -v /opt/hyhal:/opt/hyhal:ro  -v /XXX:/XXX 35fc64dac8b5  /bin/bash
```

## 优化后代码下载地址

http://112.11.119.100:18000/download/HunyuanDiT.tar.gz

## 数据集准备

```Python
# 1 Install dependencies 
cd HunyuanDiT
pip install -e ./IndexKits


# 2 Data download
wget -O ./dataset/data_demo.zip https://dit.hunyuan.tencent.com/download/HunyuanDiT/data_demo.zip
unzip ./dataset/data_demo.zip -d ./dataset
mkdir ./dataset/porcelain/arrows ./dataset/porcelain/jsons


# 3 Data conversion 
python ./hydit/data_loader/csv2arrow.py ./dataset/porcelain/csvfile/image_text.csv ./dataset/porcelain/arrows 1

# Single Resolution Data Preparation
idk base -c dataset/yamls/porcelain.yaml -t dataset/porcelain/jsons/porcelain.json
```

## 模型下载

```Markdown
python -m pip install "huggingface_hub[cli]"

mkdir ckpts

huggingface-cli download Tencent-Hunyuan/HunyuanDiT-v1.2 --local-dir ./ckpts
```

也可以直接直接下载这里的文件,将整个文件夹重命名为ckpts

https://modelscope.cn/models/dengcao/HunyuanDiT-v1.2/files

## 模型运行

rocblas-install-0530为优化代码tar.gz压缩包下载得到

```Python
HunyuanDiT-xiafy/hydit/run_g.sh
中的rocblas路径改为rocblas-install-0530实际路径,
示例如下:
export LD_LIBRARY_PATH=/public/tengcent-hy/HunyuanDiT-xiafy/rocblas-install-0530/lib:$LD_LIBRARY_PATH


#运行模型 可以再run.sh中修改使用DUC数量,默认8卡
bash run.sh
```