MCPcopy Create free account
hub / github.com/Robbyant/lingbot-map / build_model

Function build_model

scripts/benchmark_gct_memory.py:144–159  ·  view source on GitHub ↗
(args: argparse.Namespace, max_frame_num: int, device: str)

Source from the content-addressed store, hash-verified

142
143
144def build_model(args: argparse.Namespace, max_frame_num: int, device: str):
145 from lingbot_map.models.gct_stream import GCTStream
146
147 model = GCTStream(
148 img_size=args.width,
149 patch_size=args.patch_size,
150 enable_3d_rope=True,
151 max_frame_num=max_frame_num,
152 kv_cache_sliding_window=args.sliding_window,
153 kv_cache_scale_frames=args.num_scale_frames,
154 kv_cache_cross_frame_special=True,
155 kv_cache_include_scale_frames=True,
156 use_sdpa=(args.backend == "sdpa"),
157 camera_num_iterations=args.camera_num_iterations,
158 )
159 return model.eval().to(device)
160
161
162def compile_model(model) -> None:

Callers 1

mainFunction · 0.85

Calls 1

GCTStreamClass · 0.90

Tested by

no test coverage detected