Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ request when unset, which selects the server defaults.
- `speed` (`std::optional<decart::Speed>`): compute tier. Fast mode
(`decart::Speed::Fast`, sent as `speed=fast`) serves the session from a
higher-compute tier for lower latency and higher throughput; output quality is
unchanged. It is currently available for `lucy-2.5` / `lucy-latest` and
unchanged. It is currently available for `lucy-2.5` / `lucy-2.6` / `lucy-latest` and
`lucy-vton-3.5` / `lucy-vton-3.6` / `lucy-vton-latest`, in the US region only, and is billed at 2x
the standard realtime rate for those models. Other models ignore the option (the
SDK logs a warning). Omit it (the default) for standard mode.
Expand Down
6 changes: 3 additions & 3 deletions examples/realtime_warmup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
//
// DECART_API_KEY=sk-... ./realtime_warmup [model]
//
// Set DECART_SPEED=fast to request fast mode (lucy-2.5 family and
// lucy-vton-3.5 / lucy-vton-3.6 / lucy-vton-latest only; US region; billed at
// 2x the standard realtime rate).
// Set DECART_SPEED=fast to request fast mode (lucy-2.5 / lucy-2.6 / lucy-latest
// and lucy-vton-3.5 / lucy-vton-3.6 / lucy-vton-latest only; US region; billed
// at 2x the standard realtime rate).
//
#include <decart/decart.h>
#include <livekit/livekit.h>
Expand Down
2 changes: 1 addition & 1 deletion include/decart/models.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace models {

/// Resolve a realtime model by name.
///
/// Accepts canonical names ("lucy-2.1", "lucy-2.5", "lucy-vton-3.5",
/// Accepts canonical names ("lucy-2.1", "lucy-2.5", "lucy-2.6", "lucy-vton-3.5",
/// "lucy-vton-3.6", "lucy-restyle-2") and server-resolved aliases
/// ("lucy-latest", "lucy-vton-latest", "lucy-restyle-latest"). Aliases are
/// resolved by the server; e.g. "lucy-vton-latest" currently serves
Expand Down
4 changes: 2 additions & 2 deletions include/decart/realtime/realtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ struct ConnectOptions {

/// Optional compute tier. `Speed::Fast` serves the session from a
/// higher-compute tier for lower latency and higher throughput; output quality
/// is unchanged. Currently available for `lucy-2.5` / `lucy-latest` and
/// `lucy-vton-3.5` / `lucy-vton-3.6` / `lucy-vton-latest` (see
/// is unchanged. Currently available for `lucy-2.5` / `lucy-2.6` / `lucy-latest`
/// and `lucy-vton-3.5` / `lucy-vton-3.6` / `lucy-vton-latest` (see
/// `ModelDefinition::supportedSpeeds`), in the US region only, and billed at
/// 2x the standard realtime rate for those models. Other models ignore the
/// option (the SDK logs a warning). Leave unset (the default) for standard mode.
Expand Down
6 changes: 3 additions & 3 deletions include/decart/realtime/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const char* toString(ConnectionState state) noexcept;
enum class Speed {
/// Fast mode: serves the session from a higher-compute tier for lower latency
/// and higher throughput; output quality is unchanged. Currently available
/// for `lucy-2.5` / `lucy-latest` and `lucy-vton-3.5` / `lucy-vton-3.6` /
/// `lucy-vton-latest`, in the US region only, and billed at 2x the standard realtime rate for
/// those models. Other models ignore it.
/// for `lucy-2.5` / `lucy-2.6` / `lucy-latest` and `lucy-vton-3.5` /
/// `lucy-vton-3.6` / `lucy-vton-latest`, in the US region only, and billed at
/// 2x the standard realtime rate for those models. Other models ignore it.
Fast,
};

Expand Down
3 changes: 2 additions & 1 deletion src/models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ struct Entry {

// Realtime model registry. Kept in sync with the shared model list across the
// Decart SDKs. All realtime models stream over `/v1/stream`.
constexpr std::array<Entry, 8> kRealtime = {{
constexpr std::array<Entry, 9> kRealtime = {{
// Canonical
{"lucy-2.1", 30, 1088, 624, true},
{"lucy-2.5", 30, 1280, 720, true, /*fastSpeed=*/true},
{"lucy-2.6", 30, 1280, 720, true, /*fastSpeed=*/true},
{"lucy-vton-3.5", 30, 1280, 720, true, /*fastSpeed=*/true},
{"lucy-vton-3.6", 30, 1280, 720, true, /*fastSpeed=*/true},
{"lucy-restyle-2", 30, 1280, 704, true},
Expand Down
19 changes: 15 additions & 4 deletions tests/test_models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ TEST_CASE("realtime() resolves canonical models with correct geometry") {
CHECK(lucy25.fps == 30);
CHECK(lucy25.width == 1280);
CHECK(lucy25.height == 720);

auto lucy26 = models::realtime("lucy-2.6");
CHECK(lucy26.name == "lucy-2.6");
CHECK(lucy26.urlPath == "/v1/stream");
CHECK(lucy26.fps == 30);
CHECK(lucy26.width == 1280);
CHECK(lucy26.height == 720);
// 2.6 is offered on the fast tier, like 2.5.
REQUIRE(lucy26.supportedSpeeds.size() == 1);
CHECK(static_cast<int>(lucy26.supportedSpeeds[0]) == static_cast<int>(Speed::Fast));
}

TEST_CASE("realtime() accepts latest aliases (lucy-vton-latest resolves server-side to lucy-vton-3.6)") {
Expand Down Expand Up @@ -69,7 +79,7 @@ TEST_CASE("realtime() throws ModelNotFound for unknown names") {
}
}

TEST_CASE("supportedSpeeds advertises fast mode on exactly the lucy-2.5 and lucy-vton-3.5/3.6 families") {
TEST_CASE("supportedSpeeds advertises fast mode on exactly the lucy-2.5/2.6 and lucy-vton-3.5/3.6 families") {
// Compare via integer form: doctest stringifies enums through our ADL
// toString() (which returns const char*) and cannot concatenate that.
const auto fastOnly = std::vector<int>{static_cast<int>(Speed::Fast)};
Expand All @@ -80,13 +90,14 @@ TEST_CASE("supportedSpeeds advertises fast mode on exactly the lucy-2.5 and lucy
};

CHECK(speeds(models::realtime("lucy-2.5")) == fastOnly);
CHECK(speeds(models::realtime("lucy-2.6")) == fastOnly);
CHECK(speeds(models::realtime("lucy-latest")) == fastOnly);
CHECK(speeds(models::realtime("lucy-vton-3.5")) == fastOnly);
CHECK(speeds(models::realtime("lucy-vton-3.6")) == fastOnly);
CHECK(speeds(models::realtime("lucy-vton-latest")) == fastOnly);

const std::set<std::string> withFast = {"lucy-2.5", "lucy-latest", "lucy-vton-3.5", "lucy-vton-3.6",
"lucy-vton-latest"};
const std::set<std::string> withFast = {"lucy-2.5", "lucy-2.6", "lucy-latest",
"lucy-vton-3.5", "lucy-vton-3.6", "lucy-vton-latest"};
for (const auto& m : models::listRealtime(/*canonicalOnly=*/false)) {
INFO("model " << m.name);
if (withFast.count(m.name)) {
Expand All @@ -105,6 +116,6 @@ TEST_CASE("supportedSpeeds advertises fast mode on exactly the lucy-2.5 and lucy
TEST_CASE("listRealtime() honors canonicalOnly") {
auto all = models::listRealtime(/*canonicalOnly=*/false);
auto canonical = models::listRealtime(/*canonicalOnly=*/true);
CHECK(canonical.size() == 5);
CHECK(canonical.size() == 6);
CHECK(all.size() > canonical.size());
}
1 change: 1 addition & 0 deletions tests/test_stream_url.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ TEST_CASE("buildStreamUrl is deterministic: rebuilding yields the same speed par

TEST_CASE("supportsSpeed reflects ModelDefinition::supportedSpeeds") {
CHECK(supportsSpeed(models::realtime("lucy-2.5"), Speed::Fast));
CHECK(supportsSpeed(models::realtime("lucy-2.6"), Speed::Fast));
CHECK(supportsSpeed(models::realtime("lucy-latest"), Speed::Fast));
CHECK(supportsSpeed(models::realtime("lucy-vton-3.5"), Speed::Fast));
CHECK(supportsSpeed(models::realtime("lucy-vton-3.6"), Speed::Fast));
Expand Down
Loading