API for Dynamically Uninstalling LoRA

Function

Dynamically uninstalls LoRA. When this API is called, the system determines whether uninstallation and waiting can proceed based on the current LoRA status and returns the corresponding result.

Format

Operation types:

Operation type: POST

URL: https://{ip}:{port}/v1/unload_lora_adapter

  • {ip} is the value of managementIpAddress under ServerConfig in the config.json file. The default value is 127.0.0.2.
  • {port} is the value of managementPort under ServerConfig in the config.json file. The default value is 1026.

Request Parameters

Parameter

Mandatory/Optional

Description

Value

lora_name

Mandatory

Name of the loaded LoRA.

String: not empty.

Usage Example

Request example 1:

curl -X POST 127.0.0.2:1026/v1/unload_lora_adapter -d '{
    "lora_name": "lora2"
}'

Response example:

"Success: LoRA adapter lora2 removed successfully."

Response status code:

  • Status code 200: The service status is normal, and the message body contains no content.
  • Other status codes: The service status is abnormal.

Output Description

Return Value

Type

Description

"Success: LoRA adapter '{loraName }' removed successfully."

String

The LoRA is successfully uninstalled.

"The LoRA adapter '{loraName }' cannot be found."

String

The LoRA to be uninstalled cannot be found.