MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / models_json

Method models_json

app/server/runtime.cpp:740–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

738 // That is acceptable: the 503 tells the client to retry later.
739 }
740 ensure_model_fits_memory(model.config);
741 auto registry = engine::runtime::make_default_registry();
742
743 engine::runtime::ModelLoadRequest load_request;
744 load_request.model_path = model.config.path;
745 load_request.model_spec_override = model.config.model_spec_override.has_value()
746 ? model.config.model_spec_override
747 : config_.model_spec_override;
748 load_request.family_hint = model.config.family;
749 load_request.config_id = model.config.config_id;
750 load_request.weight_id = model.config.weight_id;
751 load_request.options = model.config.load_options;
752
753 engine::runtime::SessionOptions session_options;
754 session_options.backend.type = config_.backend;
755 session_options.backend.impl = config_.backend_impl;
756 session_options.backend.device = model.config.device.value_or(config_.device);
757 session_options.backend.threads = config_.threads;
758 session_options.options = model.config.session_options;
759
760 engine::debug::trace_log_scalar("server.model.id", model.config.id);
761 engine::debug::trace_log_scalar("server.model.path", model.config.path.string());

Callers

nothing calls this directly

Calls 4

strMethod · 0.80
json_quoteFunction · 0.70
to_stringFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected