mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
Add decrypt function to load encrypted model
This commit is contained in:
@@ -187,6 +187,13 @@ class RuntimeOption:
|
||||
return self._option.set_model_buffer(model_buffer, params_buffer,
|
||||
model_format)
|
||||
|
||||
def set_encryption_key(self,
|
||||
encryption_key):
|
||||
"""When loading encrypted model, encryption_key is required to decrypte model
|
||||
:param encryption_key: (str)The key for decrypting model
|
||||
"""
|
||||
return self._option.set_encryption_key(encryption_key)
|
||||
|
||||
def use_gpu(self, device_id=0):
|
||||
"""Inference with Nvidia GPU
|
||||
|
||||
|
Reference in New Issue
Block a user