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
fb453561
Commit
fb453561
authored
Jun 15, 2024
by
gaoqiong
Browse files
修改环境变量
parent
e4ae3d5f
Pipeline
#1224
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
Diffusion_test_offload_false.py
Diffusion_test_offload_false.py
+0
-4
No files found.
Diffusion_test_offload_false.py
View file @
fb453561
...
...
@@ -397,17 +397,13 @@ class StableDiffusionMGX():
if
__name__
==
"__main__"
:
os
.
environ
[
'MIGRAPHX_DISABLE_LAYERNORM_FUSION'
]
=
'1'
os
.
environ
[
'MIGRAPHX_STATIC_SHAPE_MODE'
]
=
'1'
args
=
get_args
()
sd
=
StableDiffusionMGX
(
args
.
onnx_model_path
,
args
.
compiled_model_path
,
args
.
fp16
,
args
.
force_compile
)
sd
.
warmup
(
5
)
start_time
=
time
.
time
()
result
=
sd
.
run
(
args
.
prompt
,
args
.
negative_prompt
,
args
.
steps
,
args
.
seed
,
args
.
scale
)
print
(
"Run a image cost : {}"
.
format
(
time
.
time
()
-
start_time
))
print
(
"Convert result to rgb image..."
)
image
=
StableDiffusionMGX
.
convert_to_rgb_image
(
result
)
...
...
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