Skip to content

Commit 183ef73

Browse files
committed
Deprecate lucy-2.1-vton
1 parent 16af2d3 commit 183ef73

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

include/decart/models.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace models {
2727

2828
/// Resolve a realtime model by name.
2929
///
30-
/// Accepts canonical names ("lucy-2.1", "lucy-2.1-vton", "lucy-vton-2",
30+
/// Accepts canonical names ("lucy-2.1", "lucy-vton-2",
3131
/// "lucy-vton-3", "lucy-restyle-2"), server-resolved aliases ("lucy-latest",
3232
/// "lucy-vton-latest", "lucy-restyle-latest"), and deprecated names (which emit
3333
/// no error but resolve to the same stream endpoint).

src/models.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ struct Entry {
2020

2121
// Realtime model registry. Kept in sync with the shared model list across the
2222
// Decart SDKs. All realtime models stream over `/v1/stream` at 30 fps.
23-
constexpr std::array<Entry, 11> kRealtime = {{
23+
constexpr std::array<Entry, 9> kRealtime = {{
2424
// Canonical
2525
{"lucy-2.1", 1088, 624, true},
26-
{"lucy-2.1-vton", 1088, 624, true},
2726
{"lucy-vton-2", 1088, 624, true},
2827
{"lucy-vton-3", 1088, 624, true},
2928
{"lucy-restyle-2", 1280, 704, true},
@@ -33,7 +32,6 @@ constexpr std::array<Entry, 11> kRealtime = {{
3332
{"lucy-restyle-latest", 1280, 704, false},
3433
// Deprecated aliases (still accepted)
3534
{"mirage_v2", 1280, 704, false},
36-
{"lucy-vton", 1088, 624, false},
3735
{"lucy-2.1-vton-2", 1088, 624, false},
3836
}};
3937

tests/test_models.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@ TEST_CASE("realtime() accepts latest and deprecated aliases") {
2323
CHECK(models::realtime("lucy-latest").urlPath == "/v1/stream");
2424
CHECK(models::realtime("lucy-vton-latest").name == "lucy-vton-latest");
2525
CHECK(models::realtime("mirage_v2").width == 1280); // deprecated -> restyle geometry
26-
CHECK(models::isRealtimeModel("lucy-vton"));
26+
CHECK(models::isRealtimeModel("lucy-2.1-vton-2"));
2727
}
2828

2929
TEST_CASE("realtime() throws ModelNotFound for unknown names") {
3030
CHECK_FALSE(models::isRealtimeModel("not-a-model"));
31+
CHECK_FALSE(models::isRealtimeModel("lucy-2.1-vton"));
32+
CHECK_FALSE(models::isRealtimeModel("lucy-vton"));
3133
CHECK_THROWS_AS(models::realtime("not-a-model"), Exception);
34+
CHECK_THROWS_AS(models::realtime("lucy-2.1-vton"), Exception);
35+
CHECK_THROWS_AS(models::realtime("lucy-vton"), Exception);
3236
try {
3337
models::realtime("nope");
3438
} catch (const Exception& e) {
@@ -41,6 +45,10 @@ TEST_CASE("realtime() throws ModelNotFound for unknown names") {
4145
TEST_CASE("listRealtime() honors canonicalOnly") {
4246
auto all = models::listRealtime(/*canonicalOnly=*/false);
4347
auto canonical = models::listRealtime(/*canonicalOnly=*/true);
44-
CHECK(canonical.size() == 5);
45-
CHECK(all.size() > canonical.size());
48+
CHECK(canonical.size() == 4);
49+
CHECK(all.size() == 9);
50+
for (const auto& model : all) {
51+
CHECK(model.name != "lucy-2.1-vton");
52+
CHECK(model.name != "lucy-vton");
53+
}
4654
}

0 commit comments

Comments
 (0)