perf:优化图片加载方法并支持插件自定义图标

- 修改了 LoadIcon 类,增加了通用的 loadIcon 方法和插件专用的 pluginsLoadIcon 方法
-优化了图片加载逻辑,能够根据不同的类加载资源
- 在 LM 类中将 CUDA 默认值改为 false,提高了代码的可维护性
This commit is contained in:
2025-02-10 23:18:41 +08:00
parent 4387f32f70
commit fcc4115638
3 changed files with 38 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ import org.apache.logging.log4j.Logger;
* @author tzdwindows 7
*/
public class LM {
public static boolean CUDA = true;
public static boolean CUDA = false;
public final static String DEEP_SEEK = FolderCreator.getModelFolder() + "\\DeepSeek-R1-Distill-Qwen-1.5B-Q8_0.gguf";
private static final Logger logger = LogManager.getLogger(LM.class);
@@ -31,7 +31,7 @@ public class LM {
LibraryLoad.loadLibrary("cuda/ggml");
LibraryLoad.loadLibrary("cuda/llama");
} catch (Exception e) {
logger.error("Wrong cuda Settings", e);
CUDA = false;
logger.warn("The cuda library could not be loaded, the cpu will be used for inference");
LibraryLoad.loadLibrary("cpu/ggml-base");
LibraryLoad.loadLibrary("cpu/ggml-cpu");