mirror of
https://github.com/allenai/olmocr.git
synced 2025-11-14 01:19:29 +00:00
Fix
This commit is contained in:
parent
98f4d62d1e
commit
8327da2415
@ -473,6 +473,13 @@ def main():
|
|||||||
trust_remote_code=True,
|
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(
|
model = model_class.from_pretrained(
|
||||||
args.model_name,
|
args.model_name,
|
||||||
torch_dtype=torch.bfloat16,
|
torch_dtype=torch.bfloat16,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user