Skip to content

Commit

Permalink
[Bugfix] Molmo text-only input bug fix (#9397)
Browse files Browse the repository at this point in the history
Co-authored-by: sanghol <sanghol@allenai.org>
Co-authored-by: Roger Wang <136131678+ywang96@users.noreply.github.com>
Co-authored-by: Roger Wang <ywang@roblox.com>
  • Loading branch information
4 people authored Oct 16, 2024
1 parent 717a5f8 commit ed92013
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vllm/model_executor/models/molmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,9 +946,12 @@ def pad_images(


def input_processor_for_molmo(ctx: InputContext, llm_inputs: LLMInputs):
prompt = llm_inputs["prompt"]
multi_modal_data = llm_inputs.get("multi_modal_data")
image = multi_modal_data.get("image")
prompt = llm_inputs.get("prompt", None)
multi_modal_data = llm_inputs.get("multi_modal_data", None)
if multi_modal_data is not None:
image = multi_modal_data.get("image", None)
else:
image = None
processor = cached_get_processor(ctx.model_config.model,
trust_remote_code=True,
revision=ctx.model_config.code_revision)
Expand Down

0 comments on commit ed92013

Please sign in to comment.