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
11 changes: 0 additions & 11 deletions decart/models.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,6 @@
"lucy-restyle-latest",
# Deprecated names
"lucy-2.1-vton-2",
"mirage_v2",
]
VideoModels = Literal[
# Canonical names
Expand DownExpand Up@@ -48,8 +47,6 @@
Model = Literal[RealTimeModels, VideoModels, ImageModels]

MODEL_ALIASES: dict[str, str] = {
# Realtime aliases
"mirage_v2": "lucy-restyle-2",
# Video aliases
"lucy-pro-v2v": "lucy-clip",
"lucy-restyle-v2v": "lucy-restyle-2",
Expand DownExpand Up@@ -243,14 +240,6 @@ class ImageToImageInput(DecartBaseModel):
width=1280,
height=704,
),
# Deprecated names
"mirage_v2": ModelDefinition(
name="mirage_v2",
url_path="/v1/stream",
fps=30,
width=1280,
height=704,
),
},
"video": {
# Canonical names
Expand Down
12 changes: 6 additions & 6 deletions tests/test_models.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,11 +45,11 @@ def test_deprecated_realtime_models() -> None:

with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
model = models.realtime("mirage_v2")
assert model.name == "mirage_v2"
model = models.realtime("lucy-2.1-vton-2")
assert model.name == "lucy-2.1-vton-2"
assert len(w) == 1
assert "deprecated" in str(w[0].message).lower()
assert "lucy-restyle-2" in str(w[0].message)
assert "lucy-vton-2" in str(w[0].message)


def test_canonical_video_models() -> None:
Expand DownExpand Up@@ -132,9 +132,9 @@ def test_deprecation_warning_only_once() -> None:

with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
models.realtime("mirage_v2")
models.realtime("mirage_v2")
models.realtime("mirage_v2")
models.realtime("lucy-2.1-vton-2")
models.realtime("lucy-2.1-vton-2")
models.realtime("lucy-2.1-vton-2")
assert len(w) == 1


Expand Down
Loading