mirror of
https://github.com/allenai/olmocr.git
synced 2025-11-03 03:25:22 +00:00
Fix
This commit is contained in:
parent
98f4d62d1e
commit
8327da2415
@ -473,6 +473,13 @@ def main():
|
||||
trust_remote_code=True,
|
||||
)
|
||||
|
||||
# Load model
|
||||
logger.info(f"Loading model: {args.model_name}")
|
||||
if "Qwen2-VL" in args.model_name:
|
||||
model_class = Qwen2VLForConditionalGeneration
|
||||
else:
|
||||
model_class = Qwen2_5_VLForConditionalGeneration
|
||||
|
||||
model = model_class.from_pretrained(
|
||||
args.model_name,
|
||||
torch_dtype=torch.bfloat16,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user