diff --git a/src/tts/magpietts/lt.cpp b/src/tts/magpietts/lt.cpp index cc826bf..5de564b 100644 --- a/src/tts/magpietts/lt.cpp +++ b/src/tts/magpietts/lt.cpp @@ -275,7 +275,9 @@ magpietts_model_init_local_transformer_copy( if (use_cuda) { ggml_backend_dev_t device = ggml_backend_get_device(src.backend); - if (!device || ggml_backend_dev_type(device) != GGML_BACKEND_DEVICE_TYPE_GPU) { + const auto dev_type = device ? ggml_backend_dev_type(device) : GGML_BACKEND_DEVICE_TYPE_CPU; + if (!device || (dev_type != GGML_BACKEND_DEVICE_TYPE_GPU && + dev_type != GGML_BACKEND_DEVICE_TYPE_IGPU)) { fprintf(stderr, "cannot create CUDA local-transformer mirror from a non-GPU model\n"); return false; } diff --git a/src/tts/magpietts/model.cpp b/src/tts/magpietts/model.cpp index 0b9561d..32d273c 100644 --- a/src/tts/magpietts/model.cpp +++ b/src/tts/magpietts/model.cpp @@ -873,6 +873,9 @@ magpietts_model_load_impl( ggml_backend_load_all(); if (!force_cpu) { model.backend = ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_GPU, nullptr); + if (!model.backend) { + model.backend = ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_IGPU, nullptr); + } } if (!model.backend) { model.backend = ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_CPU, nullptr); diff --git a/src/tts/nanocodec/model.cpp b/src/tts/nanocodec/model.cpp index 13beff3..adafafa 100644 --- a/src/tts/nanocodec/model.cpp +++ b/src/tts/nanocodec/model.cpp @@ -639,6 +639,9 @@ nc_model_load( ggml_backend_load_all(); if (!force_cpu) { model.backend = ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_GPU, nullptr); + if (!model.backend) { + model.backend = ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_IGPU, nullptr); + } } if (!model.backend || force_cpu) { model.backend = ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_CPU, nullptr);