Files
enginex-ascend-910-diffusers/README.md
2025-10-17 17:04:34 +08:00

46 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 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 |