Class representing the LORA manager allowing to convert and retrieve LORA assets to string (for serialisation)
More...
|
void | Clear () |
| Clears the LORA assets.
|
|
int | IndexOf (string path) |
| Searches for a LORA based on the path.
|
|
bool | Contains (string path) |
| Checks if the provided LORA based on a path exists already in the LORA manager.
|
|
void | Add (string path, float weight=1) |
| Adds a LORA with the defined weight.
|
|
void | Remove (string path) |
| Removes a LORA based on its path.
|
|
void | SetWeight (string path, float weight) |
| Modifies the weight of a LORA.
|
|
void | FromStrings (string loraString, string loraWeightsString) |
| Converts strings with the lora paths and weights to entries in the LORA manager.
|
|
string | ToStrings () |
|
float[] | GetWeights () |
| Gets the weights of the LORAs in the manager.
|
|
string[] | GetLoras () |
| Gets the paths of the LORAs in the manager.
|
|
|
string | delimiter = "," |
|
| string |
| Converts the entries of the LORA manager to strings with the lora paths and weights.
|
|
Class representing the LORA manager allowing to convert and retrieve LORA assets to string (for serialisation)
Definition at line 55 of file LLMUtils.cs.
◆ Add()
void LLMUnity.LoraManager.Add |
( |
string | path, |
|
|
float | weight = 1 ) |
|
inline |
Adds a LORA with the defined weight.
- Parameters
-
path | LORA path |
weight | LORA weight |
Definition at line 99 of file LLMUtils.cs.
◆ Clear()
void LLMUnity.LoraManager.Clear |
( |
| ) |
|
|
inline |
Clears the LORA assets.
Definition at line 63 of file LLMUtils.cs.
◆ Contains()
bool LLMUnity.LoraManager.Contains |
( |
string | path | ) |
|
|
inline |
Checks if the provided LORA based on a path exists already in the LORA manager.
- Parameters
-
- Returns
- whether the LORA manager contains the LORA
Definition at line 89 of file LLMUtils.cs.
◆ FromStrings()
void LLMUnity.LoraManager.FromStrings |
( |
string | loraString, |
|
|
string | loraWeightsString ) |
|
inline |
Converts strings with the lora paths and weights to entries in the LORA manager.
- Parameters
-
loraString | lora paths |
loraWeightsString | lora weights |
Definition at line 136 of file LLMUtils.cs.
◆ GetLoras()
string[] LLMUnity.LoraManager.GetLoras |
( |
| ) |
|
|
inline |
Gets the paths of the LORAs in the manager.
- Returns
- LORA paths
Definition at line 196 of file LLMUtils.cs.
◆ GetWeights()
float[] LLMUnity.LoraManager.GetWeights |
( |
| ) |
|
|
inline |
Gets the weights of the LORAs in the manager.
- Returns
- LORA weights
Definition at line 185 of file LLMUtils.cs.
◆ IndexOf()
int LLMUnity.LoraManager.IndexOf |
( |
string | path | ) |
|
|
inline |
Searches for a LORA based on the path.
- Parameters
-
- Returns
- LORA index
Definition at line 73 of file LLMUtils.cs.
◆ Remove()
void LLMUnity.LoraManager.Remove |
( |
string | path | ) |
|
|
inline |
Removes a LORA based on its path.
- Parameters
-
Definition at line 109 of file LLMUtils.cs.
◆ SetWeight()
void LLMUnity.LoraManager.SetWeight |
( |
string | path, |
|
|
float | weight ) |
|
inline |
Modifies the weight of a LORA.
- Parameters
-
path | LORA path |
weight | LORA weight |
Definition at line 120 of file LLMUtils.cs.
◆ ToStrings()
string LLMUnity.LoraManager.ToStrings |
( |
| ) |
|
|
inline |
◆ delimiter
string LLMUnity.LoraManager.delimiter = "," |
◆ string
LLMUnity.LoraManager.string |
Converts the entries of the LORA manager to strings with the lora paths and weights.
- Returns
- strings with the lora paths and weights
Definition at line 164 of file LLMUtils.cs.
The documentation for this class was generated from the following file: