Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
stablediffusion_migraphx
Commits
ed4fa2a4
Commit
ed4fa2a4
authored
Nov 14, 2024
by
dcuai
Browse files
Update README.md
parent
0f12dd11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
README.md
README.md
+6
-13
No files found.
README.md
View file @
ed4fa2a4
...
...
@@ -56,16 +56,16 @@ source /opt/dtk/env.sh
无
##
环境配置
##
推理
### 设置环境变量
**模型下载**
下载链接:http://113.200.138.88:18080/aimodels/stablediffusion_v2.1_migraphx 下面运行示例命令中的onnx-model-path参数就设置为该下载后onnx模型目录。
**设置环境变量**
```
shell
export
PYTHONPATH
=
/opt/dtk/lib:
$PYTHONPATH
```
### 安装依赖
**安装依赖**
```
shell
# 进入python示例目录
cd
<path_to_sd2.1_migraphx>
...
...
@@ -73,12 +73,6 @@ cd <path_to_sd2.1_migraphx>
# 安装依赖
pip
install
-r
requirements.txt
-i
https://pypi.tuna.tsinghua.edu.cn/simple
```
### 模型下载
下载链接:http://113.200.138.88:18080/aimodels/stablediffusion_v2.1_migraphx 下面运行示例命令中的onnx-model-path参数就设置为该下载后onnx模型目录。
## 推理
### 运行示例
stablediffusion_v2.1模型的推理示例程序是Diffusion_test_offload_false.py,使用如下命令运行该推理示例:
...
...
@@ -87,7 +81,7 @@ stablediffusion_v2.1模型的推理示例程序是Diffusion_test_offload_false.p
python Diffusion_test_offload_false.py
--prompt
"a photograph of an astronaut riding a horse"
--seed
13
--output
astro_horse.jpg
--steps
50
--fp16
all
--onnx-model-path
stablediffusion_v2.1_migraphx
```
##
#
result
## result
推理结果:
...
...
@@ -96,7 +90,6 @@ python程序运行结束后,会在当前目录保存推理生成的图像。
<img
src=
"./astro_horse.jpg"
alt=
"Result"
style=
"zoom: 50%;"
/>
### 精度
无
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment