-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomplete_cidds.py
More file actions
40 lines (34 loc) 路 1.08 KB
/
Copy pathcomplete_cidds.py
File metadata and controls
40 lines (34 loc) 路 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from __future__ import annotations
import argparse
from lejit.cli import main
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser()
parser.add_argument("--model-bundle", required=True)
parser.add_argument("--prompts", required=True)
parser.add_argument("--output", required=True)
parser.add_argument("--device", default="cpu")
parser.add_argument("--samples-per-prompt", type=int)
return parser.parse_args()
if __name__ == "__main__":
args = parse_args()
extras: list[str] = []
if args.samples_per_prompt is not None:
extras = ["--samples-per-prompt", str(args.samples_per_prompt)]
raise SystemExit(
main(
[
"complete",
"--config",
"configs/cidds/complete.toml",
"--model-bundle",
args.model_bundle,
"--prompts",
args.prompts,
"--output",
args.output,
"--device",
args.device,
*extras,
]
)
)