[V1] Extend beyond image modality and support mixed-modality inference with Llava-OneVision (#11685)
Signed-off-by: Roger Wang <ywang@roblox.com> Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
co-authored by
DarkLight1337
parent
e20c92bb61
commit
91b361ae89
@@ -972,8 +972,6 @@ def image_input_mapper_for_molmo(
|
||||
assert len(data) == 1, "Molmo supports only one image per prompt."
|
||||
data = data[0]
|
||||
|
||||
# Remove unused dummy PIL image
|
||||
data.pop('raw_mm_data', None)
|
||||
return MultiModalKwargs(data)
|
||||
|
||||
|
||||
@@ -1019,7 +1017,6 @@ def dummy_data_for_molmo(ctx: InputContext, seq_len: int,
|
||||
dummy_imgdata = {
|
||||
"images": out["images"],
|
||||
"image_input_idx": out["image_input_idx"],
|
||||
"raw_mm_data": dummy_image,
|
||||
}
|
||||
if "image_masks" in out:
|
||||
dummy_imgdata["image_masks"] = out["image_masks"]
|
||||
|
||||
Reference in New Issue
Block a user