model: LFM2-VL fixes (#17577)

* Adjust to pytorch

* Add antialiasing upscale

* Increase number of patches to 1024

* Handle default marker insertion for LFM2

* Switch to flag

* Reformat

* Cuda implementation of antialias kernel

* Change placement in ops.cpp

* consistent float literals

* Pad only for LFM2

* Address PR feedback

* Rollback default marker placement changes

* Fallback to CPU implementation for antialias implementation of upscale
This commit is contained in:
Tarek Dakhran 2025-11-30 21:57:31 +01:00 committed by GitHub
parent 7f8ef50cce
commit 2ba719519d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 162 additions and 13 deletions

View file

@ -304,6 +304,10 @@ struct mtmd_context {
img_beg = "<|im_start|>";
img_end = "<|im_end|>";
} else if (proj == PROJECTOR_TYPE_LFM2) {
img_beg = "<|image_start|>";
img_end = "<|image_end|>";
}
}