Skip to content

Commit 1c5253d

Browse files
committed
Simplify DeepSeek empty control-flow branches
Pass the bound empty-branch builders directly when constructing both ONNX If subgraphs. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f96aa7b0-95a6-473f-a875-5883767c2a24 Signed-off-by: Justin Chu <[email protected]>
1 parent 9b0a2d5 commit 1c5253d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/mobius/components/_ocr_encoders.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,7 @@ def forward(
15811581
name="encode_local",
15821582
)
15831583
else_branch = op.builder.subgraph(
1584-
lambda branch_op: self._empty_local(branch_op),
1584+
self._empty_local,
15851585
inputs=[],
15861586
outputs=[ir.Value(name="empty_local_features")],
15871587
name="skip_local",
@@ -2012,7 +2012,7 @@ def forward(
20122012
name="encode_local",
20132013
)
20142014
else_branch = op.builder.subgraph(
2015-
lambda branch_op: self._empty_local(branch_op),
2015+
self._empty_local,
20162016
inputs=[],
20172017
outputs=[ir.Value(name="empty_local_features")],
20182018
name="skip_local",

0 commit comments

Comments
 (0)