From b1a25ba41dd00e36b0f7a44c89be8b8db19b8418 Mon Sep 17 00:00:00 2001 From: Comma Device Date: Mon, 24 Aug 2026 09:12:31 +0800 Subject: [PATCH] =?UTF-8?q?modeld=5Fv2:=20spatial=20features=20=E2=80=94?= =?UTF-8?q?=20apply=20latest=20upstream=20simplification=20(remove=20resha?= =?UTF-8?q?pe=20conditional)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openpilot/sunnypilot/modeld_v2/compile_modeld.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openpilot/sunnypilot/modeld_v2/compile_modeld.py b/openpilot/sunnypilot/modeld_v2/compile_modeld.py index 05cc6b093..17687908c 100755 --- a/openpilot/sunnypilot/modeld_v2/compile_modeld.py +++ b/openpilot/sunnypilot/modeld_v2/compile_modeld.py @@ -208,8 +208,7 @@ def make_run_policy(vision_runner, policy_runners: list, features_slice: slice, vision_out_cast = next(iter(vision_runner({road_key: img, wide_key: big_img}).values())).cast('float32').realize() if 'features_buffer' not in inputs: new_feat = vision_out_cast[:, features_slice].reshape(1, -1).unsqueeze(0) - feat_buf = shift_and_sample(feat_q, new_feat, sample_skip_fn).realize() - inputs['features_buffer'] = feat_buf if len(fb := input_shapes['features_buffer']) <= 3 else feat_buf.reshape(fb) + inputs['features_buffer'] = shift_and_sample(feat_q, new_feat, sample_skip_fn).realize() policy_outs = [next(iter(pol_runner(inputs).values())).cast('float32').realize() for pol_runner in policy_runners] return (vision_out_cast, *policy_outs) if len(policy_outs) > 1 else (vision_out_cast, policy_outs[0])