public final class OrtLoraAdapter extends Object implements AutoCloseable
OrtSession.RunOptions.addActiveLoraAdapter(OrtLoraAdapter) to apply the adapter to a specific
execution of a model.| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static OrtLoraAdapter |
create(byte[] loraArray)
Creates an instance of OrtLoraAdapter from a byte array.
|
static OrtLoraAdapter |
create(ByteBuffer loraBuffer)
Creates an instance of OrtLoraAdapter from a direct ByteBuffer.
|
static OrtLoraAdapter |
create(String adapterPath)
Creates an instance of OrtLoraAdapter.
|
public static OrtLoraAdapter create(byte[] loraArray) throws OrtException
loraArray - The LoRA stored in a byte array.OrtException - If the native call failed.public static OrtLoraAdapter create(ByteBuffer loraBuffer) throws OrtException
loraBuffer - The buffer to load.OrtException - If the native call failed.public static OrtLoraAdapter create(String adapterPath) throws OrtException
adapterPath - path to the adapter file that is going to be memory mapped.OrtException - If the native call failed.public void close()
close in interface AutoCloseableCopyright © 2025. All rights reserved.