Describe the bug
public static async Task<string> Download(string url, bool lora = false, bool log = false, string label = null)
{
//...
string tmpPath = Path.Combine(tempCache, Path.GetFileName(savePath));
If this method is called on a child thread for any reason (say, I want to manage the models in the runtime and not from the editor)...
Task t = Task.Run(async () =>
{
_ = await LLMManager.DownloadModel(opt.url, false, opt.text.Trim());
});
The temp cache path will error out with a message that it can only be called from the main thread. Caching this value as a static field resolves.
Steps to reproduce
No response
LLMUnity version
No response
Operating System
None
Describe the bug
If this method is called on a child thread for any reason (say, I want to manage the models in the runtime and not from the editor)...
The temp cache path will error out with a message that it can only be called from the main thread. Caching this value as a static field resolves.
Steps to reproduce
No response
LLMUnity version
No response
Operating System
None