fix bug for kunlunxin run sd demo for uing fp16 (#1680)

* modify sd infer.py for using paddle_kunlunxin_fp16

* Update infer.py

* [fix bug] fix bug sd in demo infer.py for kunlunxin using fp16
This commit is contained in:
wangguoya
2023-03-27 14:04:21 +08:00
committed by GitHub
parent 409c5dc056
commit c61a07712e

View File

@@ -324,7 +324,7 @@ if __name__ == "__main__":
start = time.time() start = time.time()
unet_runtime = create_kunlunxin_runtime( unet_runtime = create_kunlunxin_runtime(
args.model_dir, args.unet_model_prefix, args.model_dir, args.unet_model_prefix,
args.ues_fp16, use_fp16=args.ues_fp16,
device_id=args.device_id) device_id=args.device_id)
print(f"Spend {time.time() - start : .2f} s to load unet model.") print(f"Spend {time.time() - start : .2f} s to load unet model.")
pipe = StableDiffusionFastDeployPipeline( pipe = StableDiffusionFastDeployPipeline(