From f13ecea48ac1b7eaba609b5c04481d5ac5331ddc Mon Sep 17 00:00:00 2001 From: yichao-liang Date: Tue, 3 Dec 2024 09:52:39 -0500 Subject: [PATCH] fix util.py --- predicators/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/predicators/utils.py b/predicators/utils.py index 54fea6d40..df26d1b2b 100644 --- a/predicators/utils.py +++ b/predicators/utils.py @@ -2480,8 +2480,11 @@ def query_vlm_for_atom_vals( # Query VLM. if vlm is None: vlm = create_vlm_by_name(CFG.vlm_model_name) # pragma: no cover. - vlm_input_imgs = \ - [PIL.Image.fromarray(img_arr) for img_arr in imgs] # type: ignore + if CFG.env in ["pybullet_coffee"]: + vlm_input_imgs = [img_arr for img_arr in imgs] # type: ignore + else: + vlm_input_imgs = \ + [PIL.Image.fromarray(img_arr) for img_arr in imgs] # type: ignore vlm_output = vlm.sample_completions(vlm_query_str, vlm_input_imgs, 0.0,