remove some inappropriate assertions

This commit is contained in:
unknown 2023-05-18 14:03:59 +08:00
parent d2db151df2
commit 49f6b84880
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ class ImageBindJoiner(nn.Module):
def forward(self, inputs: Dict[str, Tensor]) -> Dict[str, Tensor]:
outputs = {}
for modality_key, modality_value in inputs.items():
assert modality_key == ModalityType.VISION, "Only Vision is Currently Supported."
# assert modality_key == ModalityType.VISION, "Only Vision is Currently Supported."
if modality_value is not None:
modality_value = self.modality_pre_projectors[modality_key](modality_value)
modality_value = self.modality_qformers[modality_key](modality_value)

View File

@ -110,7 +110,7 @@ class BindGPT4(BaseModel):
Other modalities will conflict with the pre-defined prompt and wrapping strategy.
"""
embeds = self.encode_inputs(inputs)
assert "vision" in embeds, "Only Vision Input Can Be Accepted Now."
# assert "vision" in embeds, "Only Vision Input Can Be Accepted Now."
prompt = random.choice(self.prompt_list)
img_embeds, atts_img = self.prompt_wrap(embeds, ModalityType.VISION, prompt)