"examples/vscode:/vscode.git/clone" did not exist on "0b7cdf5532ee36446a13a2905a880a7f4a63aa29"
Unverified Commit 63070ddf authored by KrishnanPrash's avatar KrishnanPrash Committed by GitHub
Browse files

fix: handle missing `out_hidden_size` for LLaVA models in EPD encode worker (#6759)


Signed-off-by: default avatarKrishnan Prashanth <kprashanth@nvidia.com>
parent 35a796a3
......@@ -58,7 +58,12 @@ class EncodeWorkerHandler:
self.model, trust_remote_code=True
)
self.vision_model = load_vision_model(self.model)
logger.debug(f"embedding hidden dim: {self.vision_model.out_hidden_size}")
hidden_size = getattr(self.vision_model, "out_hidden_size", None)
if hidden_size is None:
hidden_size = getattr(
getattr(self.vision_model, "config", None), "hidden_size", "unknown"
)
logger.debug(f"embedding hidden dim: {hidden_size}")
self.min_workers = 1
# Get encoder components for the model
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment