Commit fb453561 authored by gaoqiong's avatar gaoqiong
Browse files

修改环境变量

parent e4ae3d5f
Pipeline #1224 canceled with stages
...@@ -397,17 +397,13 @@ class StableDiffusionMGX(): ...@@ -397,17 +397,13 @@ class StableDiffusionMGX():
if __name__ == "__main__": if __name__ == "__main__":
os.environ['MIGRAPHX_DISABLE_LAYERNORM_FUSION'] = '1'
os.environ['MIGRAPHX_STATIC_SHAPE_MODE'] = '1'
args = get_args() args = get_args()
sd = StableDiffusionMGX(args.onnx_model_path, args.compiled_model_path, sd = StableDiffusionMGX(args.onnx_model_path, args.compiled_model_path,
args.fp16, args.force_compile) args.fp16, args.force_compile)
sd.warmup(5) sd.warmup(5)
start_time = time.time()
result = sd.run(args.prompt, args.negative_prompt, args.steps, args.seed, result = sd.run(args.prompt, args.negative_prompt, args.steps, args.seed,
args.scale) args.scale)
print("Run a image cost : {}".format(time.time() - start_time))
print("Convert result to rgb image...") print("Convert result to rgb image...")
image = StableDiffusionMGX.convert_to_rgb_image(result) image = StableDiffusionMGX.convert_to_rgb_image(result)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment