from transformers import AutoProcessor, AutoModelForImageTextToTextfrom peft import PeftModelfrom PIL import Image BASE = "Qwen/Qwen3-VL-4B-Instruct"proc = AutoProcessor.from_pretrained(BASE, trust_remote_code=True)model = AutoModelForImageTextToText.from_pretrained( BASE, trust_remote_code=True, torch_dtype="auto", device_map="auto")model = PeftModel.from_pretrained(model, "emirozcan16/AA-VL-4B-adapter") img = Image.open("screen.png").convert("RGB")msgs = [{"role": "user", "content": [ {"type": "image", "image": img}, {"type": "text", "text": "Instruction: Click the funnel icon right of the search bar. " "Reply with the single action line now, nothing else:"}]}]txt = proc.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)inp = proc(text=[txt], images=[img], return_tensors="pt").to(model.device)out = model.generate(**inp, max_new_tokens=64, do_sample=False)print(proc.batch_decode(out[:, inp["input_ids"].shape[1]:], skip_special_tokens=True)[0])# -> click x=<int> y=<int> (0-999 normalized scale) or refuse