{"record":{"id":"79d8b918b8c64246","repo":"vllm-project/vllm","slug":"mm-encoder-fp8-scale-save-path-cannot-be-used-wi","errorCode":null,"errorMessage":"'mm_encoder_fp8_scale_save_path' cannot be used with 'mm_encoder_fp8_scale_path' (saving requires dynamic scaling).","messagePattern":"'mm_encoder_fp8_scale_save_path' cannot be used with 'mm_encoder_fp8_scale_path' \\(saving requires dynamic scaling\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/multimodal.py","lineNumber":332,"sourceCode":"            raise ValueError(\n                \"'mm_shm_cache_max_object_size_mb' should only be set when \"\n                \"'mm_processor_cache_type' is 'shm'.\"\n            )\n        # Validate FP8 scale path combinations.\n        if self.mm_encoder_attn_dtype != \"fp8\" and (\n            self.mm_encoder_fp8_scale_path is not None\n            or self.mm_encoder_fp8_scale_save_path is not None\n        ):\n            raise ValueError(\n                \"'mm_encoder_fp8_scale_path' and \"\n                \"'mm_encoder_fp8_scale_save_path' require \"\n                \"'mm_encoder_attn_dtype' to be 'fp8'.\"\n            )\n        if (\n            self.mm_encoder_fp8_scale_path is not None\n            and self.mm_encoder_fp8_scale_save_path is not None\n        ):\n            raise ValueError(\n                \"'mm_encoder_fp8_scale_save_path' cannot be used with \"\n                \"'mm_encoder_fp8_scale_path' (saving requires dynamic scaling).\"\n            )\n\n        # Validate file paths exist.\n        if self.mm_encoder_fp8_scale_path is not None:\n            scale_path = Path(self.mm_encoder_fp8_scale_path)\n            if not scale_path.is_file():\n                raise FileNotFoundError(f\"FP8 scale file not found: {scale_path}\")\n        if self.mm_encoder_fp8_scale_save_path is not None:\n            save_parent = Path(self.mm_encoder_fp8_scale_save_path).parent\n            if not save_parent.is_dir():\n                raise FileNotFoundError(\n                    f\"Parent directory for FP8 scale save path not found: {save_parent}\"\n                )\n        return self\n\n    @staticmethod","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/multimodal.py#L314-L350","documentation":"MultiModalConfig forbids setting both mm_encoder_fp8_scale_path and mm_encoder_fp8_scale_save_path. mm_encoder_fp8_scale_path supplies static, pre-computed scales, while mm_encoder_fp8_scale_save_path dumps dynamically-computed scales to disk; the save feature only exists for the dynamic-scaling path, so the two are mutually exclusive.","triggerScenarios":"Passing both --mm-encoder-fp8-scale-path scales.pt and --mm-encoder-fp8-scale-save-path out.pt (with or without --mm-encoder-attn-dtype fp8; the dtype check at line 319 fires first if dtype is not fp8).","commonSituations":"A single 'do everything' launch script that keeps flags for both a calibration run (save path) and a serving run (scale path); merging two working configs into one.","solutions":["For a calibration/dump run keep only --mm-encoder-attn-dtype fp8 --mm-encoder-fp8-scale-save-path out.pt.","For serving with pre-computed scales keep only --mm-encoder-attn-dtype fp8 --mm-encoder-fp8-scale-path out.pt.","Split your launch script into a calibrate phase and a serve phase instead of one combined command."],"exampleFix":"# before\nvllm serve model --mm-encoder-attn-dtype fp8 \\\n  --mm-encoder-fp8-scale-path scales.pt \\\n  --mm-encoder-fp8-scale-save-path new.pt\n\n# after\nvllm serve model --mm-encoder-attn-dtype fp8 \\\n  --mm-encoder-fp8-scale-path scales.pt","handlingStrategy":"validation","validationCode":"def check_scale_paths(scale_path, save_path):\n    if scale_path and save_path:\n        raise SystemExit(\"Use only one of mm_encoder_fp8_scale_path (static) or mm_encoder_fp8_scale_save_path (dynamic dump)\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Separate calibration and serving launch scripts so the two flags never co-occur.","Document in-repo that save_path implies dynamic scaling and is incompatible with a static scale file."],"tags":["vllm","config","multimodal","fp8","mutually-exclusive","validation"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}