diff --git a/README.md b/README.md index a5b6f95..45de31d 100644 --- a/README.md +++ b/README.md @@ -120,9 +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` and `lucy-vton-3.5` / `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 emits a -warning). Omit it (the default) for standard mode. +`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. ```python from decart import DecartClient, models diff --git a/decart/models.py b/decart/models.py index 7d1bab9..23f20aa 100644 --- a/decart/models.py +++ b/decart/models.py @@ -85,8 +85,9 @@ def _warn_unsupported_speed(model: "ModelDefinition[Any]", speed: str) -> None: _warned_unsupported_speeds.add(key) 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 and " - "lucy-vton-3.5 / lucy-vton-latest only. See https://docs.platform.decart.ai/models " + "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. " + "See https://docs.platform.decart.ai/models " "for details.", UserWarning, stacklevel=3, @@ -231,7 +232,7 @@ class ImageToImageInput(DecartBaseModel): height=624, supported_speeds=("fast",), ), - # Server-side alias currently resolves to lucy-vton-3.5. + # Server-side alias currently resolves to lucy-vton-3.6. "lucy-vton-latest": ModelDefinition( name="lucy-vton-latest", url_path="/v1/stream", @@ -254,6 +255,7 @@ class ImageToImageInput(DecartBaseModel): fps=30, width=1280, height=720, + supported_speeds=("fast",), ), "lucy-restyle-latest": ModelDefinition( name="lucy-restyle-latest", @@ -322,7 +324,7 @@ class ImageToImageInput(DecartBaseModel): height=624, input_schema=VideoEdit2Input, ), - # Server-side alias currently resolves to lucy-vton-3.5. + # Server-side alias currently resolves to lucy-vton-3.6. "lucy-vton-latest": ModelDefinition( name="lucy-vton-latest", url_path="/v1/jobs/lucy-vton-latest", diff --git a/decart/realtime/types.py b/decart/realtime/types.py index d4c074b..72cf84d 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 and lucy-vton-3.5 / 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-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 e93289c..022e37d 100644 --- a/examples/README.md +++ b/examples/README.md @@ -37,9 +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` and `lucy-vton-3.5` / `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-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 f89ff16..91d23bb 100644 --- a/examples/realtime_synthetic.py +++ b/examples/realtime_synthetic.py @@ -128,8 +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-latest). US region only, billed at 2x the - # standard realtime rate; other models ignore it. Omit for standard mode. + # 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/examples/video_tryon.py b/examples/video_tryon.py index c2e88c9..5762f9c 100644 --- a/examples/video_tryon.py +++ b/examples/video_tryon.py @@ -1,8 +1,9 @@ """ Virtual Try-On Example -This example demonstrates how to use the lucy-vton-latest model to perform -virtual try-on on a video using a reference garment image. +This example demonstrates how to use the lucy-vton-latest model (currently +lucy-vton-3.6, resolved server-side) to perform virtual try-on on a video +using a reference garment image. Usage: # With reference image and prompt: diff --git a/playground/playground.py b/playground/playground.py index eb6c8f2..15237c7 100644 --- a/playground/playground.py +++ b/playground/playground.py @@ -125,8 +125,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 and their -latest aliases only, US region, billed at 2x). " - "Omit for standard mode." + "(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." ), ) 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 82814ac..37dda90 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -38,8 +38,8 @@ def test_canonical_realtime_models() -> None: assert model.fps == 30 assert model.width == 1280 assert model.height == 720 - # 3.6 is not offered on the fast tier, unlike 3.5. - assert model.supported_speeds == () + # 3.6 is served on the fast tier, like 3.5. + assert model.supported_speeds == ("fast",) def test_canonical_video_models() -> None: @@ -136,6 +136,7 @@ def test_latest_realtime_models() -> None: assert model.width == 1088 assert model.height == 624 + # Server-side alias currently resolves to lucy-vton-3.6 (same geometry). model = models.realtime("lucy-vton-latest") assert model.name == "lucy-vton-latest" assert model.url_path == "/v1/stream" @@ -159,6 +160,7 @@ def test_latest_video_models() -> None: assert model.width == 1088 assert model.height == 624 + # Server-side alias currently resolves to lucy-vton-3.6 (same geometry). model = models.video("lucy-vton-latest") assert model.name == "lucy-vton-latest" assert model.url_path == "/v1/jobs/lucy-vton-latest" @@ -199,10 +201,16 @@ def test_latest_aliases_no_deprecation_warning() -> None: assert len(w) == 0 -FAST_REALTIME_MODELS = {"lucy-2.5", "lucy-latest", "lucy-vton-3.5", "lucy-vton-latest"} +FAST_REALTIME_MODELS = { + "lucy-2.5", + "lucy-latest", + "lucy-vton-3.5", + "lucy-vton-3.6", + "lucy-vton-latest", +} -def test_realtime_fast_speed_capability_pinned_to_lucy_2_5_and_vton_3_5() -> None: +def test_realtime_fast_speed_capability_pinned_to_lucy_2_5_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 a5f3c47..0cd8500 100644 --- a/tests/test_realtime_unit.py +++ b/tests/test_realtime_unit.py @@ -230,7 +230,13 @@ async def test_realtime_connect_speed_fast_no_warning_for_supported_model(): _warned_unsupported_speeds.clear() with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") - for model in ("lucy-2.5", "lucy-latest", "lucy-vton-3.5", "lucy-vton-latest"): + for model in ( + "lucy-2.5", + "lucy-latest", + "lucy-vton-3.5", + "lucy-vton-3.6", + "lucy-vton-latest", + ): url = await _connect_and_capture_url(speed="fast", model=model) assert "&speed=fast" in url assert _speed_warnings(w) == []