diff --git a/README.md b/README.md index e1bc3c0..d3d5e9b 100644 --- a/README.md +++ b/README.md @@ -120,10 +120,10 @@ code use `asyncio.run(verify_client_token(token))`. Realtime sessions accept an optional `speed` on `RealtimeConnectOptions`, alongside `resolution`. Fast mode (`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`, `lucy-vton-3.5`, and `lucy-vton-3.6` / `lucy-vton-latest` (`lucy-vton-latest` -currently resolves to `lucy-vton-3.6`), in the US region only, and is billed at 2x the standard -realtime rate for those models. Other models ignore the option (the SDK emits a warning). Omit -it (the default) for standard mode. +`lucy-latest`, `lucy-2.6`, `lucy-vton-3.5`, and `lucy-vton-3.6` / `lucy-vton-latest` +(`lucy-vton-latest` currently resolves to `lucy-vton-3.6`), in the US region only, and is billed +at 2x the standard realtime rate for those models. Other models ignore the option (the SDK emits +a warning). Omit it (the default) for standard mode. ```python from decart import DecartClient, models diff --git a/decart/models.py b/decart/models.py index f2cdf2b..d8c26c2 100644 --- a/decart/models.py +++ b/decart/models.py @@ -8,6 +8,7 @@ # Canonical names "lucy-2.1", "lucy-2.5", + "lucy-2.6", "lucy-vton-3.5", "lucy-vton-3.6", "lucy-restyle-2", @@ -20,6 +21,7 @@ # Canonical names "lucy-2.1", "lucy-2.5", + "lucy-2.6", "lucy-vton-3.5", "lucy-vton-3.6", "lucy-restyle-2", @@ -82,7 +84,7 @@ def _warn_unsupported_speed(model: "ModelDefinition[Any]", speed: str) -> None: warnings.warn( f'Model "{model.name}" does not support speed="{speed}"; the option is ignored by the ' "server for this model. Fast mode is currently available for lucy-2.5 / lucy-latest, " - "lucy-vton-3.5, and lucy-vton-3.6 / lucy-vton-latest only. " + "lucy-2.6, lucy-vton-3.5, and lucy-vton-3.6 / lucy-vton-latest only. " "See https://docs.platform.decart.ai/models " "for details.", UserWarning, @@ -199,6 +201,14 @@ class ImageToImageInput(DecartBaseModel): height=720, supported_speeds=("fast",), ), + "lucy-2.6": ModelDefinition( + name="lucy-2.6", + url_path="/v1/stream", + fps=30, + width=1280, + height=720, + supported_speeds=("fast",), + ), "lucy-restyle-2": ModelDefinition( name="lucy-restyle-2", url_path="/v1/stream", @@ -266,6 +276,14 @@ class ImageToImageInput(DecartBaseModel): height=720, input_schema=VideoEdit2Input, ), + "lucy-2.6": ModelDefinition( + name="lucy-2.6", + url_path="/v1/jobs/lucy-2.6", + fps=20, + width=1280, + height=720, + input_schema=VideoEdit2Input, + ), "lucy-vton-3.5": ModelDefinition( name="lucy-vton-3.5", url_path="/v1/jobs/lucy-vton-3.5", @@ -376,7 +394,8 @@ def video(model: VideoModels) -> VideoModelDefinition: Available models: - "lucy-2.1" - Video editing (newer, higher quality) - - "lucy-2.5" - Video editing (latest generation) + - "lucy-2.5" - Video editing + - "lucy-2.6" - Video editing (latest generation) - "lucy-restyle-2" - Video restyling with prompt or reference image """ _warn_deprecated(model) diff --git a/decart/realtime/types.py b/decart/realtime/types.py index 72cf84d..bbbf36e 100644 --- a/decart/realtime/types.py +++ b/decart/realtime/types.py @@ -23,6 +23,6 @@ class RealtimeConnectOptions: speed: Optional[RealtimeSpeed] = None """Realtime speed tier. ``"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, lucy-vton-3.5, and 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 the option. Omit it (the default) for standard mode.""" + for lucy-2.5 / lucy-latest, lucy-2.6, lucy-vton-3.5, and 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 the option. Omit it (the default) for standard mode.""" diff --git a/examples/README.md b/examples/README.md index 4c65b66..1d4f2a2 100644 --- a/examples/README.md +++ b/examples/README.md @@ -37,10 +37,10 @@ pip install decart[realtime] Fast mode: pass `speed="fast"` on `RealtimeConnectOptions` to serve 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`, `lucy-vton-3.5`, and `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. Omit it (the default) for standard mode. The -playground exposes it as +currently available for `lucy-2.5` / `lucy-latest`, `lucy-2.6`, `lucy-vton-3.5`, and +`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. Omit it (the default) for +standard mode. The playground exposes it as `python playground/playground.py --model lucy-2.5 --speed fast`. ### Running Examples diff --git a/examples/realtime_synthetic.py b/examples/realtime_synthetic.py index 91d23bb..bc17b2a 100644 --- a/examples/realtime_synthetic.py +++ b/examples/realtime_synthetic.py @@ -128,9 +128,9 @@ def on_error(error): image=Path("examples/files/image.png"), ), # Fast mode: uncomment with a supporting model (lucy-2.5 / lucy-latest, - # lucy-vton-3.5, lucy-vton-3.6 / lucy-vton-latest). US region only, billed - # at 2x the standard realtime rate; other models ignore it. Omit for - # standard mode. + # lucy-2.6, lucy-vton-3.5, lucy-vton-3.6 / lucy-vton-latest). US region + # only, billed at 2x the standard realtime rate; other models ignore it. + # Omit for standard mode. # speed="fast", ), ) diff --git a/playground/playground.py b/playground/playground.py index 15237c7..d907d12 100644 --- a/playground/playground.py +++ b/playground/playground.py @@ -59,6 +59,7 @@ def _check_deps() -> None: REALTIME_MODELS = [ "lucy-2.1", "lucy-2.5", + "lucy-2.6", "lucy-vton-3.5", "lucy-vton-3.6", "lucy-vton-latest", @@ -125,8 +126,8 @@ def parse_args() -> argparse.Namespace: choices=["fast"], help=( "Realtime speed tier. 'fast' uses a higher-compute tier for lower latency " - "(lucy-2.5, lucy-vton-3.5, lucy-vton-3.6 and their -latest aliases only, US region, " - "billed at 2x). Omit for standard mode." + "(lucy-2.5, lucy-2.6, lucy-vton-3.5, lucy-vton-3.6 and their -latest aliases only, " + "US region, billed at 2x). Omit for standard mode." ), ) parser.add_argument("--camera", "-c", type=int, default=0, help="Camera device index") diff --git a/tests/test_models.py b/tests/test_models.py index 9a22d9e..70a9c2b 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -25,6 +25,14 @@ def test_canonical_realtime_models() -> None: assert model.width == 1280 assert model.height == 720 + model = models.realtime("lucy-2.6") + assert model.name == "lucy-2.6" + assert model.url_path == "/v1/stream" + assert model.fps == 30 + assert model.width == 1280 + assert model.height == 720 + assert model.supported_speeds == ("fast",) + model = models.realtime("lucy-vton-3.5") assert model.name == "lucy-vton-3.5" assert model.url_path == "/v1/stream" @@ -57,6 +65,13 @@ def test_canonical_video_models() -> None: assert model.width == 1280 assert model.height == 720 + model = models.video("lucy-2.6") + assert model.name == "lucy-2.6" + assert model.url_path == "/v1/jobs/lucy-2.6" + assert model.fps == 20 + assert model.width == 1280 + assert model.height == 720 + model = models.video("lucy-vton-3.5") assert model.name == "lucy-vton-3.5" assert model.url_path == "/v1/jobs/lucy-vton-3.5" @@ -190,6 +205,7 @@ def test_latest_aliases_no_deprecation_warning() -> None: FAST_REALTIME_MODELS = { "lucy-2.5", + "lucy-2.6", "lucy-latest", "lucy-vton-3.5", "lucy-vton-3.6", @@ -197,7 +213,7 @@ def test_latest_aliases_no_deprecation_warning() -> None: } -def test_realtime_fast_speed_capability_pinned_to_lucy_2_5_and_vton_3_5_3_6() -> None: +def test_realtime_fast_speed_capability_pinned_to_lucy_2_5_2_6_and_vton_3_5_3_6() -> None: # Matches the JS SDK registry: only these realtime entries advertise speed="fast". fast_models = { name for name, model in _MODELS["realtime"].items() if "fast" in model.supported_speeds diff --git a/tests/test_realtime_unit.py b/tests/test_realtime_unit.py index 10800bd..bf0872c 100644 --- a/tests/test_realtime_unit.py +++ b/tests/test_realtime_unit.py @@ -232,6 +232,7 @@ async def test_realtime_connect_speed_fast_no_warning_for_supported_model(): warnings.simplefilter("always") for model in ( "lucy-2.5", + "lucy-2.6", "lucy-latest", "lucy-vton-3.5", "lucy-vton-3.6",