Skip to content

Commit c2a0274

Browse files
bump coreai-core, coreai-torch, coreai-opt versions (#78)
1 parent 1303957 commit c2a0274

14 files changed

Lines changed: 77 additions & 74 deletions

File tree

models/clap/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# /// script
77
# requires-python = ">=3.11"
88
# dependencies = [
9-
# "coreai-core==1.0.0b1",
10-
# "coreai-torch==0.4.0",
9+
# "coreai-core==1.0.0b2",
10+
# "coreai-torch==0.4.1",
1111
# "transformers==4.57.3",
1212
# ]
1313
#

models/clip/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# /// script
77
# requires-python = ">=3.11"
88
# dependencies = [
9-
# "coreai-core==1.0.0b1",
10-
# "coreai-torch==0.4.0",
9+
# "coreai-core==1.0.0b2",
10+
# "coreai-torch==0.4.1",
1111
# "transformers==4.57.3",
1212
# ]
1313
#

models/depth-anything/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# /// script
77
# requires-python = ">=3.11"
88
# dependencies = [
9-
# "coreai-core==1.0.0b1",
10-
# "coreai-torch==0.4.0",
9+
# "coreai-core==1.0.0b2",
10+
# "coreai-torch==0.4.1",
1111
# "depth-anything-3 @ git+https://github.com/ByteDance-Seed/Depth-Anything-3.git",
1212
# "scipy<1.15",
1313
# ]

models/edsr/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# /// script
77
# requires-python = ">=3.11"
88
# dependencies = [
9-
# "coreai-core==1.0.0b1",
10-
# "coreai-torch==0.4.0",
9+
# "coreai-core==1.0.0b2",
10+
# "coreai-torch==0.4.1",
1111
# "torchsr",
1212
# ]
1313
#

models/efficient-sam/export.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# /// script
77
# requires-python = ">=3.11"
88
# dependencies = [
9-
# "coreai-core==1.0.0b1",
10-
# "coreai-torch==0.4.0",
9+
# "coreai-core==1.0.0b2",
10+
# "coreai-torch==0.4.1",
1111
# "efficient-sam @ git+https://github.com/yformer/EfficientSAM.git",
1212
# "torch<=2.11.0"
1313
# ]
@@ -235,7 +235,7 @@ def main():
235235
parser.add_argument(
236236
"--num-pts",
237237
type=int,
238-
default=1,
238+
default=2,
239239
help=(
240240
"Number of points per query (P dim of batched_points). Use 1 for a single "
241241
"point prompt, or 2 with labels [2, 3] for a box prompt (top-left + "

models/pvt/export.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# /// script
77
# requires-python = ">=3.11"
88
# dependencies = [
9-
# "coreai-core==1.0.0b1",
10-
# "coreai-torch==0.4.0",
9+
# "coreai-core==1.0.0b2",
10+
# "coreai-torch==0.4.1",
1111
# "timm",
1212
# ]
1313
#
@@ -27,9 +27,11 @@
2727
from coreai_torch import TorchConverter, get_decomp_table
2828

2929

30-
def reference_inputs(dynamic: bool = False) -> dict[str, torch.Tensor]:
30+
def reference_inputs(
31+
dynamic: bool = False, dtype: torch.dtype = torch.float32
32+
) -> dict[str, torch.Tensor]:
3133
B = 2 if dynamic else 1
32-
return {"x": torch.randn(B, 3, 224, 224)}
34+
return {"x": torch.randn(B, 3, 224, 224, dtype=dtype)}
3335

3436

3537
def dynamic_shapes() -> dict:
@@ -97,7 +99,7 @@ def create_pvt(
9799
model.to(dtype)
98100
print("[INFO] Model sourced. Running torch export with decompositions...")
99101

100-
example_inputs = {k: v.to(dtype) for k, v in reference_inputs(dynamic).items()}
102+
example_inputs = example_inputs = reference_inputs(dynamic, dtype)
101103
ds = dynamic_shapes() if dynamic else None
102104

103105
with torch.autocast(device_type="cpu", dtype=dtype):

models/roberta/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# /// script
77
# requires-python = ">=3.11"
88
# dependencies = [
9-
# "coreai-core==1.0.0b1",
10-
# "coreai-torch==0.4.0",
9+
# "coreai-core==1.0.0b2",
10+
# "coreai-torch==0.4.1",
1111
# "transformers==4.57.3",
1212
# ]
1313
#

models/sam3/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# /// script
77
# requires-python = ">=3.11"
88
# dependencies = [
9-
# "coreai-core==1.0.0b1",
10-
# "coreai-torch==0.4.0",
9+
# "coreai-core==1.0.0b2",
10+
# "coreai-torch==0.4.1",
1111
# "tokenizers<0.23.0rc",
1212
# "torchvision",
1313
# "transformers>=5.5.4,<5.10.1",

models/t5/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# /// script
77
# requires-python = ">=3.11"
88
# dependencies = [
9-
# "coreai-core==1.0.0b1",
10-
# "coreai-torch==0.4.0",
9+
# "coreai-core==1.0.0b2",
10+
# "coreai-torch==0.4.1",
1111
# "transformers==4.57.3",
1212
# ]
1313
#

models/wav2vec2/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# /// script
77
# requires-python = ">=3.11"
88
# dependencies = [
9-
# "coreai-core==1.0.0b1",
10-
# "coreai-torch==0.4.0",
9+
# "coreai-core==1.0.0b2",
10+
# "coreai-torch==0.4.1",
1111
# "torchaudio",
1212
# ]
1313
#

0 commit comments

Comments
 (0)