diff --git a/xinference/client/restful/restful_client.py b/xinference/client/restful/restful_client.py index a51dc72561..f9a546e11c 100644 --- a/xinference/client/restful/restful_client.py +++ b/xinference/client/restful/restful_client.py @@ -18,7 +18,6 @@ import requests -from ...types import LoRA, PeftModelConfig from ..common import streaming_response_iterator if TYPE_CHECKING: @@ -866,18 +865,6 @@ def launch_model( url = f"{self.base_url}/v1/models" - if peft_model_config is not None: - lora_list = [ - LoRA.from_dict(model) for model in peft_model_config["lora_list"] - ] - peft_model = PeftModelConfig( - lora_list, - peft_model_config["image_lora_load_kwargs"], - peft_model_config["image_lora_fuse_kwargs"], - ) - else: - peft_model = None - # convert float to int or string since the RESTful API does not accept float. if isinstance(model_size_in_billions, float): model_size_in_billions = convert_float_to_int_or_str(model_size_in_billions) @@ -885,7 +872,7 @@ def launch_model( payload = { "model_uid": model_uid, "model_name": model_name, - "peft_model_config": peft_model.to_dict() if peft_model else None, + "peft_model_config": peft_model_config, "model_type": model_type, "model_size_in_billions": model_size_in_billions, "model_format": model_format,