fix: patch merger and convert

convert:
- split patch embedding
- split qkv

remove duplicate PatchMerger
This commit is contained in:
Michael Yang
2025-04-28 13:59:54 -07:00
committed by Bruce MacDonald
parent dd8c619fba
commit 7e920c8d75
7 changed files with 148 additions and 211 deletions

View File

@@ -26,13 +26,12 @@ type ImageProcessor struct {
// newImageProcessor creates a new image processor with default values
func newImageProcessor(c fs.Config) ImageProcessor {
patchSize := int(c.Uint("vision.patch_size", 14))
mergeSize := int(c.Uint("vision.spatial_merge_size", 2))
return ImageProcessor{
imageSize: int(c.Uint("vision.image_size", 560)),
numChannels: 3,
numChannels: int(c.Uint("vision.num_channels", 3)), // not set
patchSize: patchSize,
temporalPatchSize: 2,
mergeSize: mergeSize,