forked from EngineX-Ascend/enginex-ascend-910-diffusers
46 lines
2.1 KiB
Markdown
46 lines
2.1 KiB
Markdown
## Quickstart
|
||
|
||
### 构建镜像
|
||
```bash
|
||
docker build -t diffusers:v0.1 .
|
||
```
|
||
|
||
### 模型下载
|
||
模型地址:https://modelscope.cn/models/AI-ModelScope/stable-diffusion-v1-5
|
||
并放到目录:`/mnt/contest_ceph/zhanghao/models/stable-diffusion-v1-5`(如更改目录,请修改后面的执行脚本中的模型路径)
|
||
|
||
### 测试程序
|
||
1. 准备输入数据集,可以参考示例`dataset.json`
|
||
2. 在docker镜像里运行测试程序,会根据`dataset.json`内容,在`output`目录下生成图片文件。
|
||
```bash
|
||
./run_in_docker.sh
|
||
```
|
||
|
||
## 测试结果对比(A100 vs 昇腾910B)
|
||
|
||
### 数据集
|
||
数据集如下:
|
||
```json
|
||
[
|
||
"A futuristic city skyline at sunset, with flying cars and neon lights, in cyberpunk style",
|
||
"A traditional Chinese courtyard covered in snow, with red lanterns glowing warmly",
|
||
"A portrait of a young woman in Renaissance style, oil painting with dramatic lighting",
|
||
"A cute baby panda playing with bamboo in a watercolor illustration style",
|
||
"A majestic dragon flying over mountains, depicted in traditional ink wash painting",
|
||
"A cozy reading corner with bookshelves, a cat on the sofa, and sunlight streaming through the window",
|
||
"A knight in silver armor riding a horse, fantasy concept art with epic background",
|
||
"A bowl of ramen with detailed toppings, hyper-realistic food photography style",
|
||
"An astronaut floating in space, reflected in the helmet visor is planet Earth",
|
||
"A serene lake surrounded by autumn trees, painted in impressionist style"
|
||
]
|
||
```
|
||
### 测试结果
|
||
|
||
| 模型 | A100 平均生成时间(秒) | 昇腾910B 平均生成时间(秒) |
|
||
|------|-------------------------|----------------------------|
|
||
| AI-ModelScope/stable-diffusion-v1-5 | 1.6208 | 7.2901 |
|
||
| zhanghaohit/karlo-v1-alpha | 3.1624 | 5.2920 |
|
||
| AI-ModelScope/stable-diffusion-3.5-medium | 5.0231 | 8.9607 |
|
||
| stabilityai/stable-diffusion-3-medium-diffusers | 3.7976 | 23.5929 |
|
||
|