{"record":{"id":"45635e24fcde6a86","repo":"sgl-project/sglang","slug":"warmup-image-path-is-required-for-image-input-mode","errorCode":null,"errorMessage":"Warmup image path is required for image-input model","messagePattern":"Warmup image path is required for image-input model","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/warmup_request_builder.py","lineNumber":406,"sourceCode":"    for width, height in resolutions:\n        req_kwargs = dict(\n            data_type=task_type.data_type(),\n            width=width,\n            height=height,\n            prompt=DEFAULT_PLACEHOLDER_PROMPT,\n        )\n        req_kwargs[\"sampling_params\"] = copy(sampling_defaults)\n        req_kwargs.update(\n            negative_prompt=negative_prompt,\n            guidance_scale=sampling_defaults.guidance_scale,\n            guidance_scale_2=sampling_defaults.guidance_scale_2,\n            true_cfg_scale=sampling_defaults.true_cfg_scale,\n            num_inference_steps=sampling_defaults.num_inference_steps,\n            num_frames=warmup_num_frames,\n        )\n        if include_warmup_image:\n            if warmup_input_path is None:\n                raise RuntimeError(\n                    \"Warmup image path is required for image-input model\"\n                )\n            req_kwargs[\"prompt\"] = DEFAULT_PLACEHOLDER_PROMPT\n            req_kwargs[\"image_path\"] = [warmup_input_path]\n        if server_args.enable_cfg_parallel:\n            if not req_kwargs.get(\"negative_prompt\"):\n                req_kwargs[\"negative_prompt\"] = DEFAULT_PLACEHOLDER_PROMPT\n            req_kwargs[\"do_classifier_free_guidance\"] = True\n        elif negative_prompt is not None and cfg_scale is not None and cfg_scale > 1.0:\n            req_kwargs[\"do_classifier_free_guidance\"] = True\n\n        run_real_path_prewarm = server_based_warmup and server_args.enable_torch_compile\n        prompts = (\n            (DEFAULT_PLACEHOLDER_PROMPT,) + TORCH_COMPILE_REAL_PATH_PREWARM_PROMPTS\n            if run_real_path_prewarm\n            else (DEFAULT_PLACEHOLDER_PROMPT,)\n        )\n        for prompt_idx, prompt in enumerate(prompts):","sourceCodeStart":388,"sourceCodeEnd":424,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/warmup_request_builder.py#L388-L424","documentation":"Raised by build_warmup_reqs when the model is an image-input model (include_warmup_image is true) but no warmup_input_path was supplied. The warmup request for such models must include an image, so the builder refuses to proceed without a path.","triggerScenarios":"Calling build_warmup_reqs / build_client_warmup_reqs with an image-input model config and warmup_input_path=None (or omitting it).","commonSituations":"Server startup warmup for image-input diffusion models without a bundled warmup image; adding a new image-input model without wiring a default warmup asset; test config omitting the path.","solutions":["Pass a valid warmup_input_path pointing to a small image to build_warmup_reqs","Ship/point to a default warmup image asset for image-input models in server config","If the model truly takes no image input, fix the include_warmup_image flag / model classification"],"exampleFix":"# before\nreqs = build_warmup_reqs(server_args, model_config, warmup_input_path=None)\n# after\nreqs = build_warmup_reqs(server_args, model_config, warmup_input_path=\"assets/warmup.jpg\")","handlingStrategy":"validation","validationCode":"if include_warmup_image and not warmup_input_path:\n    raise ValueError(\"image-input model requires warmup_input_path\")\nreqs = build_warmup_reqs(server_args, model_config, warmup_input_path=warmup_input_path)","typeGuard":null,"tryCatchPattern":"try:\n    reqs = build_warmup_reqs(...)\nexcept RuntimeError as e:\n    if \"Warmup image path\" in str(e):\n        reqs = build_warmup_reqs(..., warmup_input_path=DEFAULT_WARMUP_IMAGE)\n    else:\n        raise","preventionTips":["Bundle a small default warmup image with image-input deployments","Add a config check at startup that image-input models have a warmup image path"],"tags":["warmup","image-input","server-startup","configuration"],"backgroundTag":"missing-required-config-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}