Go to ultralytics/nn/modules/block.py in the Yolov12 folder. Add the following line of code to the Attn class: self.qkv = self.qk your problem should be solved.