from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessorfrom qwen_vl_utils import process_vision_info model_id = "aacudad/AnomalyThink-Qwen2.5-VL-7B-ArmC-GRPO"model = Qwen2_5_VLForConditionalGeneration.from_pretrained(model_id, torch_dtype="auto", device_map="auto")processor = AutoProcessor.from_pretrained(model_id) messages = [{"role": "user", "content": [ {"type": "image", "image": "file:///path/to/part.png"}, {"type": "text", "text": "Is there a defect in this product? Analyze and answer yes or no."},]}]text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)imgs, vids = process_vision_info(messages)inputs = processor(text=[text], images=imgs, videos=vids, padding=True, return_tensors="pt").to(model.device)out = model.generate(**inputs, max_new_tokens=512)print(processor.batch_decode(out[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)[0])