| 53 | return config; |
| 54 | } |
| 55 | |
| 56 | HeartMuLaConfig parse_mula_config(const assets::ResourceBundle & resources) { |
| 57 | const auto root = resources.parse_json("mula_config"); |
| 58 | HeartMuLaConfig config; |
| 59 | config.model_type = json::optional_string(root, "model_type", ""); |
| 60 | if (config.model_type != "heartmula") { |
| 61 | throw std::runtime_error("HeartMuLa config model_type must be heartmula"); |
| 62 | } |
| 63 | config.torch_dtype = json::optional_string(root, "torch_dtype", config.torch_dtype); |
no test coverage detected