@@ -130,7 +130,7 @@ public static async Task<bool> WaitUntilModelSetup(Callback<float> downloadProgr
130
130
return ! modelSetupFailed ;
131
131
}
132
132
133
- public string GetModelLoraPath ( string path )
133
+ public string GetModelLoraPathRuntime ( string path )
134
134
{
135
135
string assetPath = LLMManager . GetAssetPath ( path ) ;
136
136
if ( ! string . IsNullOrEmpty ( assetPath ) ) return assetPath ;
@@ -173,7 +173,7 @@ public void SetModel(string path)
173
173
if ( ! string . IsNullOrEmpty ( model ) )
174
174
{
175
175
ModelEntry modelEntry = LLMManager . Get ( model ) ;
176
- string template = modelEntry != null ? modelEntry . chatTemplate : ChatTemplate . FromGGUF ( GetModelLoraPath ( model ) ) ;
176
+ string template = modelEntry != null ? modelEntry . chatTemplate : ChatTemplate . FromGGUF ( GetModelLoraPathRuntime ( model ) ) ;
177
177
SetTemplate ( template ) ;
178
178
}
179
179
#if UNITY_EDITOR
@@ -261,16 +261,17 @@ protected virtual string GetLlamaccpArguments()
261
261
LLMUnitySetup . LogError ( "No model file provided!" ) ;
262
262
return null ;
263
263
}
264
- string modelPath = GetModelLoraPath ( model ) ;
264
+ string modelPath = GetModelLoraPathRuntime ( model ) ;
265
265
if ( ! File . Exists ( modelPath ) )
266
266
{
267
267
LLMUnitySetup . LogError ( $ "File { modelPath } not found!") ;
268
268
return null ;
269
269
}
270
270
string loraArgument = "" ;
271
- foreach ( string lora in lora . Split ( " " ) )
271
+ foreach ( string lora in lora . Trim ( ) . Split ( " " ) )
272
272
{
273
- string loraPath = GetModelLoraPath ( lora ) ;
273
+ if ( lora == "" ) continue ;
274
+ string loraPath = GetModelLoraPathRuntime ( lora ) ;
274
275
if ( ! File . Exists ( loraPath ) )
275
276
{
276
277
LLMUnitySetup . LogError ( $ "File { loraPath } not found!") ;
0 commit comments