Skip to content

Commit 7ce4936

Browse files
fix: unwrap BreakableCUDAGraphWrapper in get_model()
1 parent 5dbb2c6 commit 7ce4936

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

vllm_fl/worker/model_runner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3292,6 +3292,10 @@ def get_model(self) -> nn.Module:
32923292
if isinstance(self.model, (GraphWrapper, UBatchWrapper)):
32933293
# get raw model out of the cudagraph wrapper.
32943294
return self.model.unwrap()
3295+
# BreakableCUDAGraphWrapper (vLLM 0.24.0+) wraps the model but is not
3296+
# an nn.Module. Unwrap it so callers always get the raw model.
3297+
if isinstance(self.model, BreakableCUDAGraphWrapper):
3298+
return self.model.unwrap()
32953299
return self.model
32963300

32973301
def apply_sparse_weight_patches(self, patches: Iterable[SparseWeightPatch]) -> None:

0 commit comments

Comments
 (0)