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

Method Impl

src/models/ace_step/vae_encoder.cpp:434–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432class AceStepVAEEncoderRuntime::Impl {
433public:
434 Impl(
435 std::shared_ptr<const AceStepAssets> assets,
436 core::ExecutionContext & execution,
437 assets::TensorStorageType weight_storage_type,
438 size_t graph_arena_bytes,
439 size_t weight_context_bytes)
440 : assets_(require_assets(std::move(assets))),
441 backend_(require_backend(execution)),
442 backend_type_(execution.backend_type()),
443 threads_(std::max(1, execution.config().threads)),
444 weights_(std::make_shared<VAEEncoderWeights>(
445 load_vae_encoder_weights(*assets_, backend_, backend_type_, weight_context_bytes, weight_storage_type))),
446 runtime_(
447 std::make_unique<AceStepVAEEncoderRuntimeCore>(
448 assets_,
449 backend_,
450 backend_type_,
451 threads_,
452 weights_,
453 graph_arena_bytes)) {
454 assets_->vae_weights->release_storage();
455 }
456
457 AceStepLatents encode(const runtime::AudioBuffer & audio, uint32_t seed, const std::string & noise_file) {
458 return runtime_->encode(audio, seed, noise_file);

Callers

nothing calls this directly

Calls 5

maxFunction · 0.85
load_vae_encoder_weightsFunction · 0.85
require_assetsFunction · 0.70
backend_typeMethod · 0.45
release_storageMethod · 0.45

Tested by

no test coverage detected