Skip to content

Commit ed92013

Browse files
mrsalehisangho-visionywang96
authored
[Bugfix] Molmo text-only input bug fix (#9397)
Co-authored-by: sanghol <[email protected]> Co-authored-by: Roger Wang <[email protected]> Co-authored-by: Roger Wang <[email protected]>
1 parent 717a5f8 commit ed92013

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

vllm/model_executor/models/molmo.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -946,9 +946,12 @@ def pad_images(
946946

947947

948948
def input_processor_for_molmo(ctx: InputContext, llm_inputs: LLMInputs):
949-
prompt = llm_inputs["prompt"]
950-
multi_modal_data = llm_inputs.get("multi_modal_data")
951-
image = multi_modal_data.get("image")
949+
prompt = llm_inputs.get("prompt", None)
950+
multi_modal_data = llm_inputs.get("multi_modal_data", None)
951+
if multi_modal_data is not None:
952+
image = multi_modal_data.get("image", None)
953+
else:
954+
image = None
952955
processor = cached_get_processor(ctx.model_config.model,
953956
trust_remote_code=True,
954957
revision=ctx.model_config.code_revision)

0 commit comments

Comments
 (0)