[Misc] Remove no-op self-assignments across vLLM (#55988)

Signed-off-by: shaolila <shaolila@buaa.edu.cn> Co-authored-by: shaolila <shaolila@buaa.edu.cn>

Adababy committed Sep 16, 2026 at 17:17 UTC ceb87de065b9cbdaffd34a0e6aed86c99e772b95
4 files changed +9 -12
vllm/model_executor/layers/fused_moe/routed_experts.py
+8 -7
@@ -615,14 +615,15 @@ class RoutedExperts(PluggableLayer):
615 # compressed-tensors checkpoints with packed weights are stored flipped
616 # TODO (mgoin): check self.quant_method.quant_config.quant_format
617 # against known CompressionFormat enum values that have this quality
618 - if quant_method_name in (
619 - "CompressedTensorsWNA16MoEMethod",
620 - "CompressedTensorsW4A16FlydslMoEMethod",
618 + if (
619 + quant_method_name
620 + in (
621 + "CompressedTensorsWNA16MoEMethod",
622 + "CompressedTensorsW4A16FlydslMoEMethod",
623 + )
624 + and is_transposed
625 ):
622 - if is_transposed:
623 - loaded_weight = loaded_weight.t().contiguous()
624 - else:
625 - loaded_weight = loaded_weight
626 + loaded_weight = loaded_weight.t().contiguous()
627
628 if shard_id not in ("w1", "w2", "w3"):
629 raise ValueError(f"shard_id must be ['w1','w2','w3'] but got {shard_id}.")
vllm/model_executor/models/deepencoder.py
+1 -3
@@ -780,9 +780,7 @@ class DeepCLIPVisionEmbeddings(CLIPVisionEmbeddings):
780 self, pixel_values: torch.Tensor, patch_embeds: torch.Tensor | None = None
781 ) -> torch.Tensor:
782 batch_size = pixel_values.shape[0]
783 - if patch_embeds is not None:
784 - patch_embeds = patch_embeds
785 - else:
783 + if patch_embeds is None:
784 patch_embeds = self.patch_embedding(pixel_values)
785 patch_embeds = patch_embeds.flatten(2).transpose(1, 2)
786
vllm/model_executor/models/mimo_v2_omni.py
-1
@@ -964,7 +964,6 @@ class MiMoV2OmniMultiModalProcessor(BaseMultiModalProcessor[MiMoV2OmniProcessing
964 assert isinstance(va_item, (list, tuple)) and len(va_item) == 2
965 vid, audio_src = va_item
966 va_item = VideoAudioInput(video=vid, audio=audio_src)
967 - vid = vid
967 # Convert video frames to (TCHW, timestamps) if needed
968 if (
969 isinstance(vid, tuple)
vllm/model_executor/models/step3p5.py
-1
@@ -173,7 +173,6 @@ class Step3p5Attention(nn.Module):
173 rope_scaling = None
174
175 if sliding_window is not None and enable_sliding_window:
176 - sliding_window = sliding_window
176 if swa_num_attention_heads is not None:
177 num_heads = swa_num_attention_heads
178 self.total_num_heads = swa_num_attention_heads