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

Method predict

src/models/vibevoice/diffusion_head.cpp:474–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474VibeVoiceDiffusionPrediction VibeVoiceDiffusionHeadWeightsRuntime::predict(
475 const std::vector<float> & noisy_images,
476 int64_t frames,
477 int64_t latent_size,
478 float timestep,
479 const std::vector<float> & condition,
480 int64_t condition_hidden_size) const {
481 const auto & config = assets_->config.diffusion_head;
482 if (frames <= 0 || latent_size != config.latent_size || condition_hidden_size != config.hidden_size) {
483 throw std::runtime_error("VibeVoice diffusion head received invalid input shape");
484 }
485 if (graph_ == nullptr || !graph_->matches(*this, frames)) {
486 graph_.reset();
487 graph_ = std::make_unique<VibeVoiceDiffusionHeadGraph>(
488 *this,
489 frames,
490 128ull * 1024ull * 1024ull);
491 }
492 return graph_->run(noisy_images, latent_size, timestep, condition, condition_hidden_size);
493}
494
495core::TensorValue build_vibevoice_diffusion_head(
496 core::ModuleBuildContext & ctx,

Callers 1

Calls 3

matchesMethod · 0.45
resetMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected