layer 1.0.128__tar.gz → 1.0.129__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {layer-1.0.128 → layer-1.0.129}/PKG-INFO +1 -1
- {layer-1.0.128 → layer-1.0.129}/pyproject.toml +1 -1
- {layer-1.0.128 → layer-1.0.129}/pyproject.toml.orig +1 -1
- {layer-1.0.128 → layer-1.0.129}/src/layer/_api/models.py +71 -0
- {layer-1.0.128 → layer-1.0.129}/README.md +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/__init__.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/__main__.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/_api/__init__.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/_api/client.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/_cli/__init__.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/_cli/auth_commands.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/_cli/base_model_commands.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/_cli/context.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/_cli/context_commands.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/_cli/generate_commands.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/_cli/main.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/_cli/output.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/auth.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/catalog.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/config.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/credentials.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/download.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/exit_codes.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/generate.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/oauth.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/params.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/sessions.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/sse.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/uploads.py +0 -0
- {layer-1.0.128 → layer-1.0.129}/src/layer/workspaces.py +0 -0
|
@@ -1772,6 +1772,38 @@ class InferenceToolGroup(Enum):
|
|
|
1772
1772
|
edit = "edit"
|
|
1773
1773
|
|
|
1774
1774
|
|
|
1775
|
+
class InferenceToolSourceCrop(BaseModel):
|
|
1776
|
+
"""
|
|
1777
|
+
The frame of a reframe as a box over its source, in the source's pixels after its rotation.
|
|
1778
|
+
"""
|
|
1779
|
+
|
|
1780
|
+
model_config = ConfigDict(
|
|
1781
|
+
extra="forbid",
|
|
1782
|
+
)
|
|
1783
|
+
x: float = Field(
|
|
1784
|
+
...,
|
|
1785
|
+
description="The frame's left edge, in the source's pixels from the source's left edge, or from its bounding box's when `rotate` turns it. Negative where the frame starts left of the source: the model fills that area.",
|
|
1786
|
+
title="X",
|
|
1787
|
+
)
|
|
1788
|
+
y: float = Field(
|
|
1789
|
+
...,
|
|
1790
|
+
description="The frame's top edge, in the source's pixels from the source's top edge, or from its bounding box's when `rotate` turns it. Negative where the frame starts above the source: the model fills that area.",
|
|
1791
|
+
title="Y",
|
|
1792
|
+
)
|
|
1793
|
+
width: float = Field(
|
|
1794
|
+
...,
|
|
1795
|
+
description="The frame's width in the source's pixels. Where the frame reaches past the source's right edge, the model fills that area.",
|
|
1796
|
+
gt=0.0,
|
|
1797
|
+
title="Width",
|
|
1798
|
+
)
|
|
1799
|
+
height: float = Field(
|
|
1800
|
+
...,
|
|
1801
|
+
description="The frame's height in the source's pixels. Where the frame reaches past the source's bottom edge, the model fills that area.",
|
|
1802
|
+
gt=0.0,
|
|
1803
|
+
title="Height",
|
|
1804
|
+
)
|
|
1805
|
+
|
|
1806
|
+
|
|
1775
1807
|
class DurationSeconds4(RootModel[float]):
|
|
1776
1808
|
root: float = Field(
|
|
1777
1809
|
...,
|
|
@@ -1808,6 +1840,37 @@ class InferenceToolSourceSizeInput(BaseModel):
|
|
|
1808
1840
|
)
|
|
1809
1841
|
|
|
1810
1842
|
|
|
1843
|
+
class Rotate(RootModel[float]):
|
|
1844
|
+
root: float = Field(
|
|
1845
|
+
...,
|
|
1846
|
+
description="Degrees to turn the source clockwise about its center before the crop, -360 to 360. The turned source's canvas grows to its bounding box, the source centered in it, and `crop` is measured from that box's top-left corner.",
|
|
1847
|
+
ge=-360.0,
|
|
1848
|
+
le=360.0,
|
|
1849
|
+
title="Rotate",
|
|
1850
|
+
)
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
class InferenceToolSourceTransform(BaseModel):
|
|
1854
|
+
"""
|
|
1855
|
+
Where an image reframe puts its source in the frame: the source turned by `rotate`, then the frame
|
|
1856
|
+
drawn over it as `crop`. The frame's size in pixels is the run's own, so the crop's size sets how
|
|
1857
|
+
large the source is in it.
|
|
1858
|
+
"""
|
|
1859
|
+
|
|
1860
|
+
model_config = ConfigDict(
|
|
1861
|
+
extra="forbid",
|
|
1862
|
+
)
|
|
1863
|
+
crop: InferenceToolSourceCrop = Field(
|
|
1864
|
+
...,
|
|
1865
|
+
description="The frame as a box over the source, in the source's pixels after `rotate`. Its shape is the frame's, the one `input.aspect_ratio` sets, to within 1.5%; its size against the source's sets the source's scale in the frame: a crop twice the source's width shows the source at half the frame's width. On an `AUTO` aspect ratio the crop is the frame, at the size the model renders.",
|
|
1866
|
+
)
|
|
1867
|
+
rotate: Rotate | None = Field(
|
|
1868
|
+
None,
|
|
1869
|
+
description="Degrees to turn the source clockwise about its center before the crop, -360 to 360. The turned source's canvas grows to its bounding box, the source centered in it, and `crop` is measured from that box's top-left corner.",
|
|
1870
|
+
title="Rotate",
|
|
1871
|
+
)
|
|
1872
|
+
|
|
1873
|
+
|
|
1811
1874
|
class InferenceUseCase(Enum):
|
|
1812
1875
|
text_to_image = "text_to_image"
|
|
1813
1876
|
image_editing = "image_editing"
|
|
@@ -4241,6 +4304,10 @@ class EstimateInferenceToolPriceInput(BaseModel):
|
|
|
4241
4304
|
None,
|
|
4242
4305
|
description="Estimate only: the size of an image or video source in place of `source_file_id`, to price an edit before its source is uploaded. The estimate prices what it would for a file of this size. A run refuses it.",
|
|
4243
4306
|
)
|
|
4307
|
+
source_transform: InferenceToolSourceTransform | None = Field(
|
|
4308
|
+
None,
|
|
4309
|
+
description="Where an image reframe puts its source in the frame: the source turned by `rotate`, then the frame drawn over it as `crop`, in the source's pixels. The frame's size stays the one `input.aspect_ratio` sets, and the crop takes its shape. Without it, the reframe extends the source, centered, to the frame. Only on an image reframe, with `source_file_id` (or, on an estimate, `source_size`).",
|
|
4310
|
+
)
|
|
4244
4311
|
mask_file_id: UUID | None = Field(
|
|
4245
4312
|
None,
|
|
4246
4313
|
description="An image the size of the source, white where the edit may change it and black where the source stays as it is. Only where the tool's schema has `x-source.takes_mask`.",
|
|
@@ -5121,6 +5188,10 @@ class RunInferenceToolInput(BaseModel):
|
|
|
5121
5188
|
None,
|
|
5122
5189
|
description="Estimate only: the size of an image or video source in place of `source_file_id`, to price an edit before its source is uploaded. The estimate prices what it would for a file of this size. A run refuses it.",
|
|
5123
5190
|
)
|
|
5191
|
+
source_transform: InferenceToolSourceTransform | None = Field(
|
|
5192
|
+
None,
|
|
5193
|
+
description="Where an image reframe puts its source in the frame: the source turned by `rotate`, then the frame drawn over it as `crop`, in the source's pixels. The frame's size stays the one `input.aspect_ratio` sets, and the crop takes its shape. Without it, the reframe extends the source, centered, to the frame. Only on an image reframe, with `source_file_id` (or, on an estimate, `source_size`).",
|
|
5194
|
+
)
|
|
5124
5195
|
mask_file_id: UUID | None = Field(
|
|
5125
5196
|
None,
|
|
5126
5197
|
description="An image the size of the source, white where the edit may change it and black where the source stays as it is. Only where the tool's schema has `x-source.takes_mask`.",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|