from unsloth import FastVisionModelfrom PIL import Image model, tokenizer = FastVisionModel.from_pretrained( model_name="Mustafaege/Qwen3.5-0.8B-vision-LORA-16bit",)FastVisionModel.for_inference(model) image = Image.open("formula.png") messages = [ { "role": "user", "content": [ {"type": "image"}, {"type": "text", "text": "Write the LaTeX representation for this image."}, ], }] input_text = tokenizer.apply_chat_template(messages, add_generation_prompt=True)inputs = tokenizer(image, input_text, return_tensors="pt").to("cuda") outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7)result = tokenizer.decode(outputs[0], skip_special_tokens=True)print(result)# Example: \frac{d}{dx}\left(e^{x}\right) = e^{x}